Re: [Clonezilla-live] How to recover partition table w/out restoring rest of disk?
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
From: Jorge F. <jor...@gm...> - 2009-08-06 11:41:44
|
On Wednesday 05 August 2009 07:25:02 pm Kevin W. Wall wrote: > ONLY RESTORE THE PARTITION TABLE, but NOT any of the partitions. It's been a while since I used Clonezila but if I remember correctly, when you perform the cloning...in the directory where the actual image is stored, there will be a file called sda-mbr (assuming sda drive). That's the Master Boot Record (first 512 bytes of drives) and the last 64 bytes there contains the actual partition table. You need to boot with a Live CD (I guess you can use Clonezilla and bring up the shell) and do this: # If you have a USB jump drive put in...so we can backup the current MBR # just in case... dd if=/dev/sda of=/mnt/usbdrive/sda-crippled.mbr bs=512 count=1 # Now we're going to try to restore the actual partition table. I would # restore the whole MBR but here's this way to restore ONLY the p.table DISCLAIMER: You use this at entirely your own risk! cd /to/original/backup/directory/ dd if=sda-mbr of=/dev/sda bs=1 count=64 skip=446 seek=446 If you want to restore the whole MBR: dd if=sda-mbr of=/dev/sda bs=512 count=1 HTH, Jorge |