Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First let me say sorry for another one of these threads. My situation is unique or after five days of reading and trying I cant figure this out, but I am very dangerous. So if i missed it i am sorry for posting this. I am novice at Linux at very best actually probably less than.

What I have is i can load Ubuntu just fine and I can load windows just fine, but to switch between them i have to disable Ubuntu under UEFI in bios. It is like Grub is not mapped to the windows boot loader/MBR properly. By disabling Grub it will bypass it and load windows enabling it allows me to load Ubuntu. I just would like the Grub loader to work as designed. I know it is operator error.

I didn't do boot repair as most examples didn't fit my situation. After about 30 installs I need help.

This is what I have:

  • Windows 7 machine HP sandy-bridge mother board quad core I5 2.8ghz Sata with UEFI

  • 12 Gig RAM

  • 2 separate HDD Drives TB each

  • Windows 7 on one /dev/sda1

  • Ubuntu 12.10 on the other /dev/sdb1

this got me pointed and started in the right direction. Also when i put in iso.image it loads in efi mode

I Manually partitioned ubuntu on install and it looks like this

/dev/sdb1 Fat32 /boot/efi (did efi because ext4 wouldn't work do to UEFI i think)
/dev/sdb2 ext4 /
/dev/sdb3 ext4 /home
/dev/sdb4 linux-swap

Install worked as expected then rebooted. Grub loader came up I picked Ubuntu and it loaded fine. Tried to reboot into windows and got (error invalid efi file)nothing else, but Ubuntu loads fine. When the install finished it put an Ubuntu header under UEFI where there was nothing before.

bios setup looked like this before install

 Legacy Boot Sources  
 Hard Drive
 Hitachi (windows drive)  
 Stxxx(ubuntu drive)  
 Network controller  

Bios looks like this after ubuntu 12.10 install

Ubuntu                 (If i disable this windows loads)  

Legacy Boot Sources  
Hard Drive  
Stxxx(ubuntu drive)
Hitachi (windows drive)
Network controller

So I have moved the master and slave drive around and it doesn't help. I was going to use easyBCD but was scared to mess with windows hints the separate hdd. How can I get grub to load either Ubuntu or windows just be selected which one i want. My family also uses this computer and don't want them in the bios.

Hope this isn't to confusing I really appreciate any help just even pointed in the right direction. I have read just about everything i can find on UEFI and dual boot, but most is on partitioning the windows drive and not separate drives.

I have also thought about pulling the windows drive and then installing Ubuntu, but know if it will still read Live CD if i do this. Or if that would make a difference.

share|improve this question

NB: I am assuming that Windows had also been installed under UEFI, but looking at it again I'm not sure. What partitions are there on /dev/sda?

Grub doesn't seem to install the correct entries for Windows. Check out the 'Multiboot in UEFI' section here. Try booting into Ubuntu and adding a menu entry like:

menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 1ce5-7f28
    chainloader /efi/Microsoft/Boot/bootmgfw.efi

The precise setup for the 'hd0,gpt1' sections might be different for your installation, also the UUID at the end '1ce5-7f28' will be different - the guide in the page I posted gives detail on how to find it.

To add the entry to grub in Ubuntu open a terminal and enter

sudo gedit /etc/grub.d/30_custom

Or possibly 40_custom. Add the entry, save, and then in terminal again

sudo update-grub
share|improve this answer

I am also dual booting windows 7 and Linux on separate HD for each one. The way I did it....

I installed Linux on its own hard drive from a thumb drive that I burned the iso file on, I used Unetbootin to do this.

Before installing Linux onto its own hard drive, I unplugged the windows hard drive from the mother board, then booted up from the boot menu, selected the thumb drive, boot Linux from there, and use the install selection from the desktop after Linux boots up. Make sure you have other USB hard drives disconnected when you do this. Install the whole Linux program to the hard drive you select. Doing it this way, prevents the Linux boot-loader from installing onto the windows hard drive, if you leave the windows hard drive plugged in while installing to the other hard drive, the Linux boot-loader (which is superior to the windows boot-loader) will be installed on the windows hard drive, and will be the primary way your computer boots up.

When finished doing the install, shut down, go back and plug in the windows hard drive back into the mother board.

Now when you boot up... your windows hard drive is the primary drive to boot from, and just starting your computer will boot windows7.

If you want to boot Linux, when you start your computer, tap the Esc key, or whichever key will get you to the boot menu, when the boot menu appears, use the arrow keys (next to the number keypad on most keyboards), use the down arrow key to move the highlighted selection to the drive you installed Linux on, hit the Enter key, Linux will boot up.

Doing it this way, requires nothing to be changed in the BIOS, and puts Linux boot-loader away from windows, now if the boot-loader is installed in the windows drive, and for some reason you need to re-install your windows o/s, you will lose the boot-loader, and will not have any way to boot your Linux system.

I have been doing it this way for a couple years and have had no problems.

If you are going to switch from one system to another, do a complete shutdown of the system you are currently on, and NOT a restart, If you do a restart the current system you are on will still keep charge of your sound card and other devices you use, and things will not function properly, you have to do a complete shutdown and reboot to change o/s.

share|improve this answer
Sorry guys I ended up picking up another machine for $40.00. Just needed a hard drive. So I now have my own Linux machine. No kids no wife Lol my own space to play. I'm not sure if I should close this question or leave it open. – user125916 Feb 5 '13 at 17:08

Your Answer


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.