[SOLVED] How do I backup grub2 prior to a windows 7 install

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] How do I backup grub2 prior to a windows 7 install

Postby akbrian » May 10th, '14, 22:26

I would like to install Windows 7 on my unused sda2 partition.

sda1 /boot
sda2 unused and existing, windows 7 target
sda5 /
sda6 /home
numerous other logical partitions follow...

I'm currently using mageia's version of grub2. I probably should have stuck to legacy grub, but thought grub2 would be more compatible with other current distros I try out on my test "beta" partitions. I've never dealt with win7 before, but I'm "assuming" it carries on the XP tradition of writing over any existing boot manager. In the past I'd boot the mageia install dvd after a windows install and reinstall grub or lilo using the rescue gui. Does the rescue gui support grub2 ? Google shows me that Ubuntu has a tool on their live CD to reinstall a previously saved grub2 backup. Is there a similar Mageia 4 tool?

Before I install windows 7, what steps should I take to make the grub2 reinstall/restore the easiest, assuming it does get overwritten?
Last edited by akbrian on May 11th, '14, 10:09, edited 1 time in total.
akbrian
 
Posts: 60
Joined: Sep 10th, '11, 01:56

Re: How do I backup grub2 prior to a windows 7 install

Postby linuxero » May 11th, '14, 01:04

Of course you can always use the Mageia Insatllation Media to boot into rescue mode and I think you can recover GRUB2 from there easily..

In case you want to have a sure copy of your GRUB2 MBP you can save it as follows:

Code: Select all
# dd if=/dev/sda of=/PATH/TO/YOUR/STASH bs=440 count=1


Then after Windows 7 satisfactorily destroys your GRUB2 MBP you can boot into either rescue mode or a live session and rewrite it back as follows:

Code: Select all
# dd of=/dev/sda if=/PATH/TO/YOUR/STASH bs=440 count=1


You must be root, obviously!

After that you should reconfigure GRUB2 in order for you to boot Windows ;)
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: How do I backup grub2 prior to a windows 7 install

Postby akbrian » May 11th, '14, 10:08

Thanks for the help. I ended up doing a quick "upgrade" install with nothing to upgrade, so it just took a couple minutes. Then I reinstalled grub2 at the configure screen. It picked up Win 7 on it's own. The rescue gui "reinstall bootloader" on the Mageia 4 install disk didn't work for grub2, it failed with errors. I didn't see the response soon enough to do the elegant save a backup of grub solution, I'm embarassed to say. Thanks again, sorry for the delayed reply.
akbrian
 
Posts: 60
Joined: Sep 10th, '11, 01:56


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest