Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How does grub2 work on existing dual boots?

On a 2 disk system, with a dual boot with windows, I want to do a new install of 13.04 to refresh the current one.

In the install, if I put a grub2 boot loader on the 2nd disk, will I still be able to boot into Win XP? Does the 2nd boot loader link up with the first?

Hans

share|improve this question
    
Thanks @oldfred, some clarifications: I use grub2 already, and I have /sdb as the active bootdisk, and it contains both Win XP and Ubuntu. The current grub2 boot is working fine, but 13.04 is not. /sda is virgin space. I am tempted to a new installation from the livecd, using /sda for the new grub2 bootloader. Does this sound OK? –  Hans12345 Jul 29 '13 at 17:56
    
I stopped booting my XP in sda and with many test installs just let it default to sda even though my install is in sdc. I can then use BIOS to choose drive or use grub menu to choose to boot. But I now have so many test installs (need to houseclean old ones.) that I manually edit 40_custom to maintain my regular grub boot in sdc. –  oldfred Jul 29 '13 at 18:03
add comment

2 Answers

Do you know which drive's MBR grub is installed into now? It is better to have the Windows boot loader on the Windows drive and grub on the Linux drive.

If you do a new install the old grub will not match and not work.

You can install grub2's boot loader to the Linux drive with this, Then change BIOS to boot from Ubuntu drive:

reinstall from working (not liveCD/DVD/USB) system - first find Ubuntu drive (example is drive sdb but use your drive not partitions): sudo fdisk -l
if it's "/dev/sdb" then just run:
sudo grub-install /dev/sdb
If that returns any errors run:
sudo grub-install --recheck /dev/sdb
sudo update-grub

You can also install a Windows boot loader to the Windows drive if you have grub in it. How to restore the Ubuntu/XP/Vista/7 bootloader

https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

You can also manually install just the lilo boot loader to the MBR as it works just like the Windows boot loader.

Restore basic windows boot loader - universe enabled if error on lilo not found Simply open Synaptic and Settings > Repositories and tick the box against the Universe repo in the Ubuntu Software tab. Close that window and click on reload before installing lilo with Synaptic or command line. sudo apt-get install lilo sudo lilo -M /dev/sda mbr May show error messages about the rest of lilo missing, ignore, we just want MBR with bootloader to boot partition with boot flag (Windows).

If you have grub in sdb, then change BIOS to boot from that drive. When you reinstall a LInux system, use Something else and on manual partitioning screen choose the Linux drive from combo box at bottom of that screen to make sure grub is in the Linux drive.

share|improve this answer
    
Thanks @oldfred, some clarifications: –  Hans12345 Jul 29 '13 at 17:37
    
Thanks again @oldfred. Very comprehensive answer. I went for a simple approach and it worked. I backed up my data, and went ahead with the LiveCD and did a full clean install. My fear about losing the WIN XP boot loader did not materialise. All works fine. –  Hans12345 Aug 1 '13 at 9:28
add comment

As noted in the last comment, I went for a simple approach and it worked. I backed up my data, and went ahead with the 13.04 LiveCD and did a full clean install. My fear about losing the WIN XP boot loader did not materialise. 13.04 and Win XP both work fine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.