Repair ext4 EFI GPT Filesystem

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
jackfritt
Posts: 2
Joined: 12 Nov 2013, 10:35

Repair ext4 EFI GPT Filesystem

#1 Post by jackfritt »

Hi,

with Testdisk I could copy all of my files to a new Disk. Now I want to repair the old one.
I had a problem with the partition Table but that is fixed. The only problem ist with the ext4.
Only Testdisk can use it. Thats why i copied all data :)
I already tried this:
file -s /dev/sdc1 /dev/sdd1

Code: Select all

/dev/sdc1: data
/dev/sdd1: Linux rev 1.0 ext4 filesystem data, UUID=fe8080e3-c3c6-4c03-9f32-7a9e69205198 (extents) (large files) (huge files)
So there seems to be no file system?
e2fsck /dev/sdc1

Code: Select all

e2fsck 1.41.12 (17-May-2010)
e2fsck: Superblock ungültig versuche es mit Backup-Blöcken...
e2fsck: Bad magic number in super-block beim Versuch, /dev/sdc1 zu öffnen

SuperBlock ist unlesbar bzw. beschreibt kein gültiges ext2
Dateisystem.  Wenn Gerät gültig ist und ein ext2
Dateisystem (kein swap oder ufs usw.) enthält,  dann ist der SuperBlock
beschädigt, und sie könnten e2fsck mit einem anderen SuperBlock:
    e2fsck -b 8193 <Gerät>
mkfs.ext4 -n /dev/sdc1

Code: Select all

mke2fs 1.41.12 (17-May-2010)
Die Ausrichtung von /dev/sdc1 ist um 3584 Bytes verschoben.
Das könnte zu sehr schlechter Leistung führen. Eine (Neu-)Partionierung
 wird empfohlen.
Dateisystem-Label=
OS-Typ: Linux
Blockgröße=4096 (log=2)
Fragmentgröße=4096 (log=2)
Stride=1 Blöcke, Stripebreite=0 Blöcke
134217728 Inodes, 536870911 Blöcke
26843545 Blöcke (5.00%) reserviert für den Superuser
Erster Datenblock=0
Maximale Dateisystem-Blöcke=4294967296
16384 Blockgruppen
32768 Blöcke pro Gruppe, 32768 Fragmente pro Gruppe
8192 Inodes pro Gruppe
Superblock-Sicherungskopien gespeichert in den Blöcken:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000
I tried all Superblock Backups with
fsck.ext4 -v -b SUPERBLOCK -B 4096 /dev/sdc1

Code: Select all

fsck.ext4 -v -b 512000000 -B 4096 /dev/sdc1
e2fsck 1.41.12 (17-May-2010)
fsck.ext4: Bad magic number in super-block beim Versuch, /dev/sdc1 zu öffnen

SuperBlock ist unlesbar bzw. beschreibt kein gültiges ext2
Dateisystem.  Wenn Gerät gültig ist und ein ext2
Dateisystem (kein swap oder ufs usw.) enthält,  dann ist der SuperBlock
beschädigt, und sie könnten e2fsck mit einem anderen SuperBlock:
    e2fsck -b 8193 <Gerät>
Testdisk won´t repair it after a write to the disk.
So how can I repair it?
mkfs.ext4 -S ??? But this should be my last attempt.
Maybe someone has another idea? Or should testdisk repair it but... bug?

Thx for help,

Joerg

pasc
Posts: 5
Joined: 15 Nov 2013, 22:29

Re: Repair ext4 EFI GPT Filesystem

#2 Post by pasc »

Since your log files appear to be german you might want to put this in the geman section.

BTW: how did you copy the data to another disk using testdisk anyhow ?

jackfritt
Posts: 2
Joined: 12 Nov 2013, 10:35

Re: Repair ext4 EFI GPT Filesystem

#3 Post by jackfritt »

pasc wrote:Since your log files appear to be german you might want to put this in the geman section.

BTW: how did you copy the data to another disk using testdisk anyhow ?
If testdisk finds a partition it can look into the file system if it is valid. Then show+copy all data you need.

I could post this to the german forum but I think there are more international people around ;)
But after seeing that noone was able to answer my questions i went on and now everything is fine again.

So in the future I can use testdisk to copy data to a new disk. But the repair should be done by hand.

hf

Joerg

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Repair ext4 EFI GPT Filesystem

#4 Post by cgrenier »

If fsck was needed, TestDisk wrote the information in testdisk.log file. Here is an example:

Code: Select all

recover_EXT2: "e2fsck -b 32768 -B 4096 device" may be needed
Using TestDisk text interface, you can also get the same information if you choose TestDisk, Advanced, Superblock.

Locked