LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   whats a good program to backup my master boot record (http://www.linuxquestions.org/questions/linux-general-1/whats-a-good-program-to-backup-my-master-boot-record-301865/)

FocusedWolf 03-15-2005 09:54 AM

whats a good program to backup my master boot record
 
Hi, i need to reinstall my windows xp on its partition without having to reinstall my linux, and this is on a dual boot system.

I think the master boot record is what i want to backup...then restore after installing the windows...so whats a good and easy program to do this? does the xp cd have one?

XavierP 03-15-2005 10:03 AM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

Skazi 03-15-2005 10:12 AM

With Slackware, the installation ISO doubles as a recover disk. So, I can use my CD to boot into my linux installation on my slave drive. I assume Fedora must be similar.

After installing XP (make sure it doesn't touch your Linux partitions), just boot from the recover/installation CD, then run Lilo.

Before doing that though, test out booting from the CD into your current Linux installation to make sure it works.

soulstace 03-15-2005 10:13 AM

I use Active@ Partition Recovery. You can make a backup of the MBR of each of your hard disks to a floppy disk

Windows XP cd has a utility to restore the MBR but I don't think it has one to back it up afaik. Boot from the cd, enter recovery console and type fixmbr. That command restores the master boot code without destroying the partition table already in place.

If you boot Linux with grub then it may help to make a boot disk just in case;

1. boot from the linux cd enter rescue mode by typing linux rescue at the boot prompt

once you get a command prompt, type

chroot /mnt/sysimage

and then

grub-install /dev/fd0

after that you can leave windows boot record on the mbr and always boot linux from the floppy disk.

Hope this helped :)

Matir 03-15-2005 10:21 AM

Of course, dd is the easiest option for backing up your MBR.
Let's assume you want to back up to a floppy. You can also do it to a file, just replace /dev/fd0 with the filename. This also assumes /dev/hda is the hard drive containing the mbr in question.
Code:

dd if=/dev/hda of=/dev/fd0 bs=512 count=1
To restore:
Code:

dd if=/dev/fd0 of=/dev/hda bs=512 count=1

FocusedWolf 03-15-2005 10:46 AM

Quote:

Originally posted by soulstace

If you boot Linux with grub then it may help to make a boot disk just in case;

1. boot from the linux cd enter rescue mode by typing linux rescue at the boot prompt

once you get a command prompt, type

chroot /mnt/sysimage

and then

grub-install /dev/fd0

after that you can leave windows boot record on the mbr and always boot linux from the floppy disk.

Hope this helped :) [/B]
Looking at your instructions sorta gives me an idea.

Situation: windows just installed and totally bashed mbr so it loads by default.

So if i used the linux rescue cd, i could just install grub using those commands and specifying my hd instead and reinstall grub good as new? maybe i should backup my grun.conf file instead :P

soulstace 03-15-2005 10:50 AM

I suppose that could work but then how would you go about loading Windows? Is there a way to load Windows from grub? I have never tried it myself.

FocusedWolf 03-15-2005 10:59 AM

Quote:

Originally posted by soulstace
Is there a way to load Windows from grub? I have never tried it myself.
Yes...you can add windows to the list, and probably other os's, along with your list of installed kernals

Matir 03-15-2005 11:05 AM

In theory, virtually any OS should be loadable from GRUB, due to the nature of bootloaders.

soulstace 03-15-2005 11:12 AM

Cool.

In that case you might find this helpful. I did :)

http://www.fedoraforum.org/forum/sho...+/mnt/sysimage

FocusedWolf 03-15-2005 09:46 PM

Wow thats one hell of a post on installing grub :)

soulstace 03-15-2005 09:55 PM

Yeah I found it quite helpful. The only thing it was missing was the instructions on how to lock the OS from loading. Set a grub password and type lock underneath each OS in the grub.conf file. Like so;

password --md5 <md5 hash>

Code:

title Windows Media Center Edition
lock
        rootnoverify (hd0,0)
        chainloader +1

Then the only way to load the OS is by first pressing "p" and then providing the password :) Good way to protect against that insecure mess of a Windows operating system :-\

lol


All times are GMT -5. The time now is 02:34 AM.