ext4 bad superblocks

sjohannes

Member
Registriert
3 Nov. 2016
Beiträge
36
Hallo liebe Thinkpad Gemeinde,

das hier ist mein erster Post in eurem Forum und ich komme gleich mit einer Frage. Ich habe mit einer Fedora Installation meine vorhandene home partition verkleinern wollen (habe ich schon oft gemacht ohne Probleme mit diversen Distri Installationen). Anscheinend hat es diesmal nicht so problemlos geklappt. Ich kann die Partition nun nicht mehr mounten:pinch:

Ein Backup habe ich, dass ist aber von Februar und ein paar aktuelle Daten wären schon gut, die wieder zu bekommen. Ich hab das in Hamburg bei JustCom abgegeben und die haben mal einen Kostenvoranschlag zur Wiederherstellung gemacht (ob die Gut oder schlecht sind, keine Ahnung). Die wollen auf jedenfall 300€ für die Wiederherstellung haben (also scheint es nicht unmöglich zu sein).

Ich hab auch selbst ein bisschen versucht herum zu probieren, leider ohne Erfolg. Nun aber mal die Fehlermeldungen:

Code:
Error mounting /dev/loop0 at /media/johannes/409d9fd4-3b92-41cc-86ab-484dd5e31e54: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/loop0" "/media/johannes/409d9fd4-3b92-41cc-86ab-484dd5e31e54"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/loop0,       missing codepage or helper program, or other error
In some cases useful info is found in syslog - try dmesg | tail or so.
Code:
root@l430:/home/johannes# e2fsck -f /dev/loop0e2fsck 1.42.12 (29-Aug-2014)The filesystem size (according to the superblock) is 24488448 blocksThe physical size of the device is 21976811 blocksEither the superblock or the partition table is likely to be corrupt!
Code:
root@l430:/home/johannes# mke2fs -n /dev/loop0mke2fs 1.42.12 (29-Aug-2014)/dev/loop0 contains a ext4 file system    last mounted on /home on Fri May 12 19:59:21 2017Proceed anyway? (y,n) yCreating filesystem with 21976811 4k blocks and 5496832 inodesFilesystem UUID: cfe03453-ab9d-4019-9cad-941c826bbba0Superblock backups stored on blocks:     32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,     4096000, 7962624, 11239424, 20480000
Code:
root@l430:/home/johannes# dumpe2fs /dev/loop0 | grep -i superblockdumpe2fs 1.42.12 (29-Aug-2014)  Primary superblock at 0, Group descriptors at 1-6  Backup superblock at 32768, Group descriptors at 32769-32774  Backup superblock at 98304, Group descriptors at 98305-98310  Backup superblock at 163840, Group descriptors at 163841-163846  Backup superblock at 229376, Group descriptors at 229377-229382  Backup superblock at 294912, Group descriptors at 294913-294918  Backup superblock at 819200, Group descriptors at 819201-819206  Backup superblock at 884736, Group descriptors at 884737-884742  Backup superblock at 1605632, Group descriptors at 1605633-1605638  Backup superblock at 2654208, Group descriptors at 2654209-2654214  Backup superblock at 4096000, Group descriptors at 4096001-4096006  Backup superblock at 7962624, Group descriptors at 7962625-7962630  Backup superblock at 11239424, Group descriptors at 11239425-11239430  Backup superblock at 20480000, Group descriptors at 20480001-20480006  Backup superblock at 23887872, Group descriptors at 23887873-23887878

Code:
root@l430:/home/johannes# e2fsck -b 8193 /dev/sdbe2fsck 1.43.4 (31-Jan-2017)e2fsck: Bad magic number in super-block while trying to open /dev/sdbThe superblock could not be read or does not describe a valid ext2/ext3/ext4filesystem.  If the device is valid and it really contains an ext2/ext3/ext4filesystem (and not swap or ufs or something else), then the superblockis corrupt, and you might try running e2fsck with an alternate superblock:    e2fsck -b 8193 <device> or    e2fsck -b 32768 <device>Found a dos partition table in /dev/sdb

Ich hoffe es ihr könnt mit den Informationen schon mal was anfangen und mir ein bisschen helfen.

Beste und hoffnungsvolle Grüße :)
 
Dir sind zum einen Zeilenumbrüche verloren gegangen, zum anderen arbeitest du mal auf /dev/loop0 (wo kommt das denn her?), mal auf /dev/sdb.

Ach so, bevor du damit rumspielst: Backup der gesamten Platte machen (dd) und die gesamte Platte ausschließlich read-only nutzen.

Theorie: Du hast die Partitionsgröße geändert, nicht aber die Dateisystemgröße.
 
Zuletzt bearbeitet:
das /dev/loop0 kommt davon, dass ich zum teil von einem dd image versucht habe. Nun habe ich das auf eine externe gespiegelt. Das original liegt sicher und wird nicht angefasst.

Die Theorie hatte ich auch und hatte die Partionsgröße anzupassen. hat aber nicht geklappt. Habe aber dazu keine Meldungen mehr gespeichert.

Das mit den Zeilenumbrüchen tut mir leid. Hatte die Meldungen in einer Textdatei gespeichert. versuche da nächstesmal drauf zu achten.
 
Code:
root@l430:/home/johannes# fsck.ext4 -v /dev/sdb3
e2fsck 1.43.4 (31-Jan-2017)
The filesystem size (according to the superblock) is 24488448 blocks
The physical size of the device is 21976811 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes
root@l430:/home/johannes# fsck.ext4 -v /dev/sdb3
e2fsck 1.43.4 (31-Jan-2017)
The filesystem size (according to the superblock) is 24488448 blocks
The physical size of the device is 21976811 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no
Error reading block 22020096 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes
Force rewrite<y>? yes
Error reading block 22020112 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes
Force rewrite<y>? yes
Error reading block 22052864 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes
Force rewrite<y>? yes
Error reading block 22052879 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes
Force rewrite<y>? yes
Error reading block 22052865 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? cancelled!
fsck.ext4: Can't read a block bitmap while retrying to read bitmaps for /dev/sdb3
Error writing block 22020096 (Invalid argument).  Ignore error<y>? cancelled!
Error writing block 22020112 (Invalid argument).  Ignore error<y>? cancelled!
Error writing block 22052864 (Invalid argument).  Ignore error<y>? cancelled!
Error writing block 22052879 (Invalid argument).  Ignore error<y>? cancelled!

/dev/sdb3: ***** FILE SYSTEM WAS MODIFIED *****

/dev/sdb3: ********** WARNING: Filesystem still has errors **********

Code:
root@l430:/home/johannes# dumpe2fs /dev/sdb3 | grep superblock
dumpe2fs 1.43.4 (31-Jan-2017)
  Primary superblock at 0, Group descriptors at 1-6
  Backup superblock at 32768, Group descriptors at 32769-32774
  Backup superblock at 98304, Group descriptors at 98305-98310
  Backup superblock at 163840, Group descriptors at 163841-163846
  Backup superblock at 229376, Group descriptors at 229377-229382
  Backup superblock at 294912, Group descriptors at 294913-294918
  Backup superblock at 819200, Group descriptors at 819201-819206
  Backup superblock at 884736, Group descriptors at 884737-884742
  Backup superblock at 1605632, Group descriptors at 1605633-1605638
  Backup superblock at 2654208, Group descriptors at 2654209-2654214
  Backup superblock at 4096000, Group descriptors at 4096001-4096006
  Backup superblock at 7962624, Group descriptors at 7962625-7962630
  Backup superblock at 11239424, Group descriptors at 11239425-11239430
  Backup superblock at 20480000, Group descriptors at 20480001-20480006
  Backup superblock at 23887872, Group descriptors at 23887873-23887878

Code:
root@l430:/home/johannes# fsck -y -b 32768 /dev/sdb3
fsck from util-linux 2.29.2
e2fsck 1.43.4 (31-Jan-2017)
/dev/sdb3: recovering journal
fsck.ext4: unable to set superblock flags on /dev/sdb3


/dev/sdb3: ***** FILE SYSTEM WAS MODIFIED *****

/dev/sdb3: ********** WARNING: Filesystem still has errors **********

Dann habe ich mke2fs -S versucht

Code:
root@l430:/home/johannes# mke2fs -S /dev/sdb3
mke2fs 1.43.4 (31-Jan-2017)
/dev/sdb3 contains a ext4 file system
    last mounted on /home on Fri May 12 19:59:21 2017
Proceed anyway? (y,N) y
Creating filesystem with 21976811 4k blocks and 5496832 inodes
Filesystem UUID: 761a56cb-5c8c-4e42-9c4e-9da0fe340347
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000

Allocating group tables: done                            
/dev/sdb3 may be further corrupted by superblock rewrite
Proceed anyway? (y,N) y
Writing superblocks and filesystem accounting information: done
Code:
root@l430:/home/johannes# mount /dev/sdb3 /media/home
mount: mount /dev/sdb3 on /media/home failed: Structure needs cleaning

Das mit Zeilenumbrüchen lag an Chrome. Jetzt schreibe ich den Beitrag mit Firefox und es geht :huh:
 
Da ist mehr kaputt. Vermutung: Die Partition wurde verkleinert, aber das Dateisystem leider nicht bzw. nicht korrekt verkleinert. Daher die Diskrepanz in den Superblöcken. Ich bin nicht der Datenrettungsspezialist.

Hast Du nach dem Schreiben der Superblöcke ein fsck gemacht? Eventuell hilft es und dann kann es gemountet werden.

Außerdem solltest Du mit einem Overlay über das Filesystem arbeiten, weil dann Änderungen zurückgenommen werden können ohne daß Du das Image wieder einspielen mußt.

Ansonsten empfehle ich Dir das ubuntu-Forum. Unterforum Sicherheit. Da gibt es einige Spezialisten (frostschutz z.B.).
 
  • ok1.de
  • thinkstore24.de
  • Preiswerte-IT - Gebrauchte Lenovo Notebooks kaufen
Zurück
Oben