[ale] superblock recovery?

Greg Freemyer greg.freemyer at gmail.com
Tue Apr 26 13:04:40 EDT 2005


On 4/26/05, Preston Boyington  wrote:
> I have a laptop drive in a USB enclosure that has a partition formatted FAT32.  Against my better judgment I allowed a friend to borrow it to carry some large TIFF files to his office.  Now that I have it back XP and Linux can't see anything on the partition (he assures me that it worked fine with him).
> 
> Although I (fortunately) don't have anything of great value on the drive, I was wondering if there was a way I could "rebuild" the superblock without losing the data.  Worst case I will format the drive and restore the files from my backups, but I would like to know of a better way.
> 

I would first look at the partition table and see if it is valid.

fdisk -l /dev/sda

Then you could use xxd /dev/sda1 to look at the raw partition to see
it was over-written with zeros or something.

On the vast majority of current drives, the first partition starts on
sector 63, so if the partition table is gone, you can still use xxd
/dev/sda and just skip down 63*512 bytes to see the start of the first
partition.

Basically rebuilding the partition table is doable.  Rebuilding the
FAT32 File Allocation Table is next to impossible, but FAT32 does
maintain a redundant table, so it is possible only one was corrupted.

Greg
-- 
Greg Freemyer



More information about the Ale mailing list