On 18 October 2012 20:15, Srdjan Todorovic todorovic.s@googlemail.comwrote:
On 18 October 2012 19:13, John Woodard mail@johnwoodard.co.uk wrote:
Yesterday I had a broken super block on my boot drive sda1 which I fixed
by
finding the backup superblocks with:
mke2fs -n /dev/sda1
Then by replacing the corrupted superblock with:
e2fsck -b <backup_superblock_number>/dev/sda1
sda1 is not seen in gparted and fdisk -l doesn't show it up either.
Suggests the MBR (or GPT if that's what you use) was destroyed. Did you make a printout of the MBR when you partitioned it?
No this was just a std. Ubuntu install which used all the defaults on a single disk so I taking a copy of the MBR was way down the list of priorities which are of course headed by beer and sandwiches.
I *wonder* (but i have no idea if this is possible) if the MBR was toasted (from before) and then you ran mke2fs it would have used the wrong parts of the drive to give you the location of another superblock that would have been created had there been a partition of a different layout?
Then e2fsck would replace a superblock it thinks is there (but maybe isnt the right offset if the partitions were toast) onto a location that would not make sense? Just guessing....
When I replaced the superblock using advice from http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superbloc... worked, I had a desktop, networking was okay etc.
You'd probably want to check the MBR manually, as well as looking for the partitions, and also decoding ext[2,3,4] superblock 0 or the one you recovered from. Not sure if there are tools to do this for you....
dd and hexdump are your friends, and the layout specs for the MBR and ext[2,3,4] superblocks.
It's looking way above my head but I ought to at least give it a go. I have full access with a live cd what is the best place to start?
Cheers, BJ