backing up and restoring boot sector

toyfactory toyfactory at xsmail.com
Wed Apr 20 10:35:31 UTC 2005


On Wed, 20 Apr 2005 18:13:02 +0900, "toyfactory" <toyfactory at xsmail.com>
said:
> 
> While playing around with different multi-boot options I sometimes screw
> things up.  Things are (fingers crossed) working fine at the moment but
> I would like to be able to make a back-up of the MBR and boot sector for
> when I decide to install MS-DOS 5.0 again or whatever.  Finding out how
> to back-up the MBR was straightforward Googling:
> 
> dd if=/dev/hda of=mbr.bin bs=512 count=1
> 
> Restoring the MBR brought Grub back to life but not the Windows 2000
> boot menu.  Resurrecting that required me to hunt down the Windows CD,
> boot to the Recovery Console and run fixboot.exe to repair the partition
> boot sector.  So, my question - is there a simple way to back-up and
> restore the 'partition boot sector' in Linux.

Sort of guessing at the answer to my own question here, but if I think
of the MBR as the 'boot sector' for the whole hard disk and copy the
first 512 bytes from /dev/hda, then wouldn't the 'partition boot sector'
I'm after be the first 512 bytes copied from /dev/hda1?

Nick




More information about the ubuntu-users mailing list