preserving the master boot record
Posted 11-21-2011 at 07:54 PM by neonsignal
The master boot record (MBR) from an unmounted drive can be preserved using dd. For example, boot from a live CD and copy the master boot record of the hard drive sda to a usb key mounted at /mnt/sdb1:
The MBR can be restored in a similar way. Be very cautious at this step, because the MBR typically holds the partition table and the initial boot loader stage, so a mistake can be difficult to recover from.
dd if=/dev/sda of=/mnt/sdb1/mbr.img bs=512 count=1
dd if=/mnt/sdb1/mbr.img of=/dev/sda bs=512 count=1
Total Comments 0