[GLLUG] Ext2 recovery
Brad Fears
brad@mtsdev.com
Mon, 09 Sep 2002 11:07:33 -0400
'e2fsck /dev/hdc4' worked, although I was sweating bullets while it
prompted me to "fix" and "clear" things... :) On my home machine, it
recognized the zip as hdb, but would not allow me to run the e2fsck
command on the partition itself. I don't know why it worked on my other
machine, but I'm not complaining!
In the end, my files ended up in a lost+found directory, but at least I
have them. Thanks.
--Brad Fears
Matt Graham wrote:
> On Sunday 08 September 2002 23:09, after a long battle with technology,
> Brad Fears wrote:
>
>>I somehow managed to corrupt my ext2-formatted zip disk while trying
>>to access it in OS X. The machine claimed it contained no data,
>>which was when I realized it was formatted ext2.
>>
>>Then I try to mount it back on my linux machine, and it suddenly
>>thinks the partition is vfat. Thanks, OS X.
>>
>>I tried running 'e2fsck -b 8193 /dev/hdb', but it complains " Attempt
>>to read block from filesystem resulted in short read while trying to
>>open /dev/hdb. Could this be a zero-length partition?" I also tried
>>the same command with other superblock backups (24577, 40961, 57345,
>>73729), but none worked.
>
>
> First, ZIP disks are always partitioned, so /dev/hdX is not right. You
> want to e2fsck /dev/hdX4, most likely. Second, ext2 filesystems made
> using versions of mke2fs since about 2000 have always been made with
> the "sparse superblock" feature turned on. That means the backup
> superblocks are arranged differently and there are fewer of them. The
> e2fsck maintainers never bothered to switch the "try -b 8193" message
> to what's currently correct, "try -b 32768".
>
> Having ext2 filesystems on removable media is not a good idea except in
> special circumstances. UIDs, GIDs, and file permissions that are
> correct on one machine will not be correct on another machine. ext2
> has more overhead than FAT16, not good for limited-space things like
> ZIP disks. Only Linux can handle ext2 filesystems natively, making
> ext2 removable media less useful for data exchange. And as you found
> out, some OSes will attempt to "fix" removable media that don't conform
> to the de facto standards....
>