I have two HDD on my PC. I have installed windows 7 on first one, and today I installed ubuntu 15.10 on second one (sdb7,8,9), and selected sdb for boot loader installation. Then I rebooted and Windows came up without prompting for ubuntu. Then from BIOS I selected second HDD for booting and Ubuntu came up. There is no option in UEFI to set priority as second HDD, you can only select it for that time (is there any option?) Then I tried to install boot repair with sudo add-apt-repository ppa:yannubuntu/boot-repair but it replied many errors. Now I can boot Ubuntu only when I come to UEFI and select sencond HDD. How can I fix this to have options for booting or always boot from second HDD? Must I install Ubuntu on the same HDD with Windwos? What if I move boot loader to sda (and can I do this?) please help. thank you very much

  • Your question lacks important details. What errors did you get when you ran Boot Repair? Which boot mode(s) (BIOS/CSM/legacy or EFI/UEFI) did you use? I recommend you run the Boot Info Script. This will produce a file called RESULTS.txt. Post it to a pastebin site and post the URL it provides here. This will give us information required to answer your question. – Rod Smith Dec 6 '15 at 20:24
  • Thanks for responding. This is the file you needed: files.musicth.ir/RESULTS.txt – Sevada Aghasar Dec 7 '15 at 20:35

Your computer may have an EFI, but both your OSes are installed in BIOS mode, so EFI-specific issues are unimportant.

There should be an option to set the second disk as the default one for booting. If such an option is missing, then that's a design flaw of your firmware. I recommend you check again for such an option. (Maybe it's in a menu you've not examined, or is available only when you select some other boot-related option.)

If you can't find such an option, you have several possible solutions:

  • Install GRUB to /dev/sda with sudo grub-install /dev/sda or by using Boot Repair. This option should produce a working boot to GRUB, which should then enable you to boot either Ubuntu or Windows; however, I can't promise it will actually work as it should. There's a small chance that this operation will make matters worse.
  • Swap your disks (by swapping the cable connectors) so that /dev/sda becomes /dev/sdb and vice-versa. This should cause GRUB to come up by default, assuming the firmware is booting by device connection order rather than by identifying the disk make/model or serial number. My guess is that this option is less risky than the first, but there's a chance that Windows will become confused when its assigned disk changes.
  • Use my rEFInd boot manager:
    1. Create an EFI System Partition (ESP) on your GPT disk (/dev/sdb).
    2. Download the USB flash drive or CD-R version of rEFInd and prepare an external medium with it.
    3. Boot to the rEFInd medium. This should enable you to boot to Ubuntu.
    4. In Ubuntu, install the rEFInd PPA or Debian package.
    5. Edit /boot/efi/EFI/refind/refind.conf: Uncomment the scanfor line and add hdbios to the list of options.
    6. When you reboot, you should see a new diamond-shaped option that should boot Windows, and you should still be able to boot Ubuntu.

That last option is rather complex. I wouldn't ordinarily recommend a mixed-mode setup like that. I mention it as an option because the setup process is likely to be a little safer than installing GRUB to /dev/sda. Overall, I'd say your best bet is to swap your disk cables. If that fails, I'd recommend trying rEFInd, although that wins out to installing GRUB to /dev/sda by a rather small margin.

| improve this answer | |
  • Thank you so much. I searched in BIOS/UEFI and in advanced settings I found an option to change priority to second HDD. – Sevada Aghasar Dec 9 '15 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.