How can I stop windows from always booting first?

Solution 1:

What's happened is that Windows 7 has overridden Grub (the Linux boot loader) with its own bootloader. This is fixable, it just takes a little bit of work. Here's how to fix it. You'll need an Ubuntu 10.10 live cd.

Boot into the live session Open a terminal (Applications > Accessories > Terminal) and become root by running

sudo su -

Next you'll need to inspect your disk and look at the partitioning. Run

fdisk -l

You'll need to do a little bit of detective work, but you want to identify the Ubuntu root partition. you will get output that looks like this

   Device    Boot      Start         End      Blocks   Id  System
   /dev/sda1   *           1       18663   149903360   83  Linux
   /dev/sda2           18663       19458     6384641    5  Extended
   /dev/sda5           18663       19458     6384640   82  Linux swap / Solaris

With another for your windows setup. The /dev/sda1 line, and the numbers will probably be different, but you want to find the one that is listed as System: Linux.

Now you'll mount that, and install grub.

mount /dev/sda1 /mnt
grub-install --root-directory=/mnt/ /dev/sd1

replacing /dev/sda1 with what yours said.

That should be it, reboot and you should be able to boot Ubuntu and Windows.

Solution 2:

You need to install grub on the correct hard drive (the drive that boots first). To find detailed info on how to do it: here

Solution 3:

You haven't installed grub to your second hdd (Contains ubuntu). Just install grub to this hdd. if you feel difficult to do it, just reinstall the ubuntu ( Be sure that you are opted to install grub). And make this hdd to boot first.