0

Possible Duplicate:
Ubuntu 12.4 and XP on Seperate Drives, Dual Boot, How?

I've never used Linux before in any form, but was always intrigued, so after a while of deciding whether to risk it I installed Ubuntu 12.04

During the installation I was asked "what would you like to do?" Install Ubuntu as the only operating system, alongside another os, or something else.

I chose something else as I wanted to format one of my old 100Gb IDE drives to serve as the partition to install ubuntu on. I formatted this drive with ext4 and made it the root directory for the installation, all ok.

I also have on a 1Tb SATA drive two partitions (splitting the disk in 2) one of these contains windows 7 and I did nothing to this drive (and was careful to do so)

After the installation finished the computer restarted and gave me no option for choosing operating systems?

what have I done wrong how can this be fixed? I would still like to be able to use Win7 for gaming.

Any help on this matter would be greatly appreciated. :)

3
  • See this askubuntu.com/q/165985/35775
    – Web-E
    Jul 20, 2012 at 17:00
  • Try running sudo update-grub in a terminal window (ctrl-alt-t) first. That should try to detect all other OSs, and hopefully will add Windows to Ubuntu's boot menu. Jul 20, 2012 at 17:34
  • I put in the cd and changed boot device priority to set cd at the top so I could go through the boot-repair procedure on the link only it desn't boot off the cd it just goes straight to my Ubuntu installation
    – Toby
    Jul 20, 2012 at 20:09

2 Answers 2

1

You say you have two drives. It seems as if your computer has given priority to the one containing Ubuntu.

Restart your computer and keep tapping F12 until you enter the menu with device selection for booting. From here, select the 1 TB drive and you'll boot into Windows.

If you want the computer to boot into Windows by default, you'll have to set the 1 TB HDD as the top priority boot device.

1
  • Thanks to you both for replying so quickly, ok so I can easily change between the big windows drive and the small linux drive using the bios. But this is not really ideal I read the link you sent web-E by the ubuntu live disc do they mean the one I installed with?
    – Toby
    Jul 20, 2012 at 17:34
0

Try This:

Try opening a terminal and running sudo update-grub. It should mention finding a windows partition. If it does, then you will have the option to boot windows.

You may also need to set the timeout on the bootloader. See 'Setting the Timout' below.

If that doesn't work...

... we need to do a little more work.

Your windows install should be (hd1) to grub (since it should be the first BIOS drive that isn't the drive grub is running from). Press alt+f2 and paste this line:

gksu gedit /etc/grub.d/40_custom

After a password prompt, a text editor should open. Put this at the end of the text file:

cat << EOF
menuentry "Windows 7" --class windows --class os {
    set root='hd1'
    drivemap -s (hd0) (hd1)
    chainloader +1
}
EOF

(P.S: I hope the above is correct... I don't have a dual boot machine here for reference, so I'm going off of memory, /boot/grub/30_os-prober, and intuition I've gained from working with a lot of messed up boots. It won't break anything though. Worst case is the menu entry doesn't work.)

Then save the file.

Open a terminal, type sudo update-grub, and press enter

You will probably also need to set the timeout, as explained below.

Setting the Timeout

Press alt+f2 and paste this line:

gksu gedit /etc/default/grub

After a password prompt, a text editor should open. Look for a line with GRUB_TIMEOUT (it should be near the second line)

If there is a # character in front of it, remove that character. Make sure the timeout is set to 5 (or higher if you want. This will be how long you have to choose an OS before the default is used). The complete line should look like

GRUB_TIMEOUT=5

Now save this file, close the text editor, and open a terminal.

In the terminal, type sudo update-grub, press enter, and reboot.

8
  • Hi undecim, after running sudo update-grub I get the following syntax error.Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-23-generic Found initrd image: /boot/initrd.img-3.2.0-23-generic Found memtest86+ image: /boot/memtest86+.bin Found Gentoo Base System version 1.6.11 on /dev/sdc1 error: syntax error. error: Incorrect command. error: syntax error. error: line no: 160 Syntax errors are detected in generated GRUB config file. Ensure that there are no errors in /etc/default/grub and /etc/grub.d/* files or please file a bug report with /boot/grub/grub.cfg.new file attached.
    – Toby
    Jul 20, 2012 at 17:43
  • Your sdc1 seems to be USB drive.
    – atenz
    Jul 20, 2012 at 17:50
  • @Toby: Have you changed /etc/default/grub or anything in /etc/grub.d? If so, can you post those files?
    – undecim
    Jul 20, 2012 at 20:51
  • @undecim most of the information in default/grub is commented out, bar the timout section etc. I did do some changed to 40 custom, as you detailed in your post above, however I removed this after it didn't work and then did a sudo update-grub. If you still want to see the files could you suggest somewhere to post them?
    – Toby
    Jul 21, 2012 at 21:33
  • @Toby: paste.ubuntu.com is a good place to paste the content of the files. It will give you a link which you can post here.
    – undecim
    Jul 22, 2012 at 0:34

Not the answer you're looking for? Browse other questions tagged .