Recovering A Lost Partition Table

Oops, you messed up with fdisk. Or the actual partition table got corrupted; who cares why.

Once again, you need to boot to a rescue disk. Then command:

fdisk

Now type:

p

to perform a check of the partition table. If you get something strange, or complete gibberish, type:

x

to enter expert mode. (Yes, you’re the expert.) Now type:

c

and enter the cylinders value you wrote down from page 1 of this lesson. Then type:

h

and enter the number of heads. Then type:

s

and enter the number of sectors. Now type:

r

to return to the main menu. Type:

p

again and look for gibberish partitions. If you have any, delete them with the d option. Type:

n

and restore your original partitions. Precisely. Then type:

p

to review partitions again. If you still have a mess, it’s likely your disk is shot. Too bad. But if things are good, be sure to compare the current values to your recorded values. If necessary, try to correct them again. Finally, type:

w

to write the changes, then exit fdisk.

Can you mount your partitions now (in your rescue environment)? If not, see the next section. Otherwise, try a reboot now. Good luck; I’ve had this work, and you will too – sometimes.