0

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?

Anwar
  • 77,855

2 Answers2

2

Note: this is for older BIOS/MBR systems not newer UEFI/gpt systems.

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 them, 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.

oldfred
  • 12,583
1

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 works fine.

Anwar
  • 77,855