On 19-03-10 19:34, Joe(theWordy)Philbrook wrote: [ fixing a partition table ]
I can now certify that rebuilding them with fdisk works... ;) {see below}
Good work. On a funny note; i read today that fdisk also has an option to "fix" an existing partition table (under expert options)...
It would appear that on Mar 18, Guus Snijders did say:
To be safe, first make an *exact* note (on paper) of the current partition table. If anything goes wrong, you can boot a rescue CD and recreate the partition table from this note. You could also make a copy of the first sector with dd and store that on some media (USB hdd comes to mind), but i would still make the paper note.
I did print the partition table data... I'm not good with dd. I've got explicit notes on using it to backup/restore the mbr, and have a copy of that on the usb drive (is that what you mean?) but using it back-up the rest of the partition table is beyond me.
Looks like the partition table is stored on the first sector of the disk, so restoring a copy of that sector also restores the table. But yes; storing a copy of the MBR on an external disk is what i meant.
After that, just change the end sector of the extended partition to match the end sector of your swap partition and you should be fine. (try starting cfdisk at this point to see if the error still exists). Basically that's what I did with fdisk. I had a text file with the table data in it on the usb drive. which I opened in one window while I ran fdisk in another. [...]
And it worked.
Great, that's good news.
If you're feeling brave, you could also recreate the entire partition table from scratch. It's just a table listing which partitions are where. Nothing more.
I could have done that. But why mess with the 1st 3 partitions???
You're right, it wasn't neccesary in this case, but it sometimes happens that the order of partitions get messed up. On such occasion it might be worthwhile to just recreate the whole table. mvg, Guus