Dual boot Ubuntu & Windows

We needed a dual boot Ubuntu and Windows 7 setup today, which had a few stumbling blocks.

Problem 1. – GPT Partition

Installed Windows 7 on half a 500GB drive and left 250GB free for Ubuntu. When booting to install Linux, it didn’t see Windows 7 due to the GPT partition that Windows 7 uses by default.

Solution 1.

Used Gparted from the Linux live cd to format the drive with an MBR partition layout. (Note:- This destroyed the original Windows installation.) Then installed Windows back to the drive. This time, Ubuntu saw Windows 7 during installation and was happy to install alongside it.

Problem 2. – Default Windows Dual Boot

Although the machine was now happily dual booting, it would default to Ubuntu, regardless of which changes i made to the grub config. Startup manager would make changes to grub, but it would still default to Ubuntu.

Solution 2.

Nariub on the Ubuntu forums suggested changing the os-prober number, so it loads that first. This puts Windows at the top, making it the default. Perfect for what we needed.

The command for this, which worked for us on Ubuntu 11.10 & Windows 7:

mv /etc/grub.d/30_os-prober /etc/grub.d/09_os-prober
update-grub

So now we have the machine booting as we want, with each operating system happily taking up half of the 500GB drive.

Leave a Reply

Your email address will not be published. Required fields are marked *