[CentOS] Corrupt mbr and disk directory map
bdavis at cds-corp.com
Thu Jan 5 10:33:27 EST 2012
We are running Centos 5.6. All was fine until yesterday. I attempted
to tar a 14KB work file to a USB floppy (/dev/sdb) for transport to
another server. Unfortunately, I keyed in 'tar cvf /dev/sda filename'
instead of 'tar cvf /dev/sdb filename'. /dev/sda is our main
(boot/root/apps) scsi hard drive. I realized my mistake, but it was
too late. The system is still powered up and running, but I am sure
that I have overlaid (and trashed) the mbr and the disk directory map.
When I run the 'fdisk /dev/sda' command, the console displays:
"Device contains neither a valid DOS partition table, nor Sun, SGI or
OSF disklabel. Building a new DOS disklabel. Changes will remain in
memory only, until you decide to write them. After that, of course, the
previous content won't be recoverable."
When I run grub and enter 'find /grub/stage1', the console displays
"Error 15: File not found"
I suspect that when I power the system down, it will not reboot. I can
reinstall mbr and grub, but I don't have the original partition table
start/end values. Since the system is still running, it seems that the
partition table must still be available to it from somewhere.
Is there any way to easily restore the partition table?
The system is completely backed up and can be restored if necessary, but
I prefer a quick and simple solution, if possible.
More information about the CentOS