can Linux repair (or restore from backup) a corrupted disk partition table?

Alan Dacey Sr. GrokIt at ajinfosearch.com
Wed Oct 7 12:57:21 BST 2009


On Wednesday 07 October 2009 02:38:03 am Joe(theWordy)Philbrook wrote:
> I'm currently down to doing all my computing on my laptop. (ever since the
> venerable old desktop died) This puts a crimp in the available drive space.
> So I put one of the larger IDE drives from the dead PC into an ide/usb
> enclosure and use it for archive, back-up, and music storage purposes.
> 
> The other day a tree fell on the power line while I was listening to music.
> Of course, the laptop kept running, but the power supply for the drive
> enclosure failed... "No big deal", I thought, "I'll just run fsck on the
>  music partition after the power company restores power..."
> 
> However, when I went to do that, neither fsck, nor fdisk could access the
> partition table of /dev/sdb. I wish I'd recorded the exact error messages
> they generated, because it's too late now.
> 
> In any event, the idea of a corrupted partition table in the mbr of that
> drive bothered me more than just the loss of my music files. I had other
> partitions on that drive with assorted back-up files on them.
> 
> I remember more as an expression of frustration than because I thought it
> could help I used the command line history function to recall and reenter
> the "fdisk /dev/sdb" command several times in rapid succession when all of
> a sudden it succeeded. And I was in... A quick look confirmed that the
> actual table was still there, with all the right info for the 13 partitions
> on that disk. I wasn't sure why it had taken so many tries to access it,
> so I did a "w" to write the table and exit. I got it all back, Nothings
> missing etc...
> 
> But it disturbs me that I might have lost it all. So I'm wondering if
> there is a way to repair such a partition table if you have the data
> previously supplied by an "fdisk -l"???
> 
> And/or is there a good way to back-up and then, if the need arises
> restore, partition table data???
> 
> And is there a good how-to somewhere???
> 
> Thanks.
> 

I had this problem a few weeks ago.  I did something I should not have and 
lost gigabytes of movies and music.  I got it all back with the tools 
described here: https://help.ubuntu.com/community/DataRecovery
If you cannot restore your partition, then you can copy the files out of it.
I wrote down what my experience was but it was too big to get on this list.  I 
will email it to you in a separately.  Just one thing, if you have to copy 
your files out of the bad partition, the owner will be root so you have to 
'chown' it back to yourself.
-- 
Alan

"When I do good, I feel good. When I do bad, I feel bad. That's my religion."
Abraham Lincoln 



More information about the kubuntu-users mailing list