Quick and dirty partition table repair?

Tom Horsley horsley1953 at gmail.com
Sun Sep 11 14:55:51 UTC 2011


I've been rearranging a disk with gparted and it left
me with this:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb4            2048   976773119   488385536    5  Extended
/dev/sdb5            4096    51204095    25600000   83  Linux
/dev/sdb6        51206144   976771071   462782464   83  Linux

If I try to mount the partitions at boot time, something
gets very confused by the extended partition being /dev/sdb4
instead of /dev/sdb1.

Is there a quick way I can move the 4th primary partition entry
to the 1st primary partition entry?

Or is a hex edit and extreme care my only hope?

Or maybe it would all be simpler if I just DDed the one partition
I'm trying to keep to a file, reinitialize the disk from scratch,
and then DD it back (making sure to make the partition the identical
size).


More information about the users mailing list