nav-left cat-right
cat-right
Home > Blog > Linux > Save and Restore MBR and Partition

Save and Restore MBR and Partition

Recently I had a problem with my Windows Installation on the second disk which writes its own MBR in the disk. I had reinstalled Windows and several applications but after one day of work and one of those reboots the computer only reponded with the message “no disk found” or similar. I checked with the other disk containing the linux system, but the harddisk was there and all files seemed to be ok. So somehow the mbr was damaged by – what ever. It could be fixed with the command fixmbr from the Windows Recovery System (booted with the installation cd) To habe the MBR backuped I found the following solution using dd.
dd if =/dev/hda count=1 bs=512 of=/Imagename
Other uses of dd are to delete the MBR
dd if=/dev/zero of=/dev/hda1 bs=1 count=446 conv=notrunc
Backup a Partition
dd if=/dev/hda1 | bzip2 >/home/backup/hda1.img
Restore the Partition
bzip2 -dc /home/backup/hda1.img >/dev/hda1

Einen Kommentar schreiben

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*


*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Spam Protection by WP-SpamFree