GRUB: Adding entry for OS on different hard drive

25,687

Solution 1

I believe that Grub will automatically detect the second drive. Boot into Xubuntu and run sudo update-grub.

Solution 2

if you have live linux in a hard drive and you install anothe OS on anothe r hard disk. For ubuntu just do:

#update-grub  

os prober will properly detect other OS. If you are in gentoo run in terminal:

#grub2-mkconfig -o /boot/grub/grub.cfg 

hopefully other os will be autodetect.

Share:
25,687

Related videos on Youtube

theStandard
Author by

theStandard

Updated on September 18, 2022

Comments

  • theStandard
    theStandard over 1 year

    I've got two hard drives in my computer after I replaced one for windows. Since I love linux so much, I put a copy of Xubuntu on the one that I had initially replaced, and I now have two separate hard drives with two separate operating systems. I can boot to either one from the BIOS, and I used EasyBCD so that it will let me choose when booting to the windows drive, but I'd like to add a GRUB option for the windows drive so I can eliminate any additional software. How would I add an option for an extra hard drive?

    GParted layout on my linux drive: enter image description here

    GParted layout on the windows drive: enter image description here

  • theStandard
    theStandard over 9 years
    Just got Adding boot menu entry for EFI firmware configuration. Does that mean it will automatically show me the menu from now on, or is there a config file for that?
  • Elephant454
    Elephant454 over 9 years
    @theStandard honestly, I have no idea. Reboot and see if the menu entry shows up. If not, we will just add it to /boot/grub/grub.cfg by hand.
  • theStandard
    theStandard over 9 years
    The extra entry wasn't there, and Xubuntu did not boot to the GRUB menu by default
  • Elephant454
    Elephant454 over 9 years
    So, so sorry for kind of abandoning you for three days. Could you post your /boot/grub/grub.cfg to Pastebin? Also, what is the partition you are trying to add a menu entry for? ("/dev/sda1" for example)
  • theStandard
    theStandard over 9 years
    It's cool -- it's not like my computer won't boot -- I'll get that for you.
  • theStandard
    theStandard over 9 years
    Alright, the paste is here, and I only know that I want to boot to /dev/sdb, the drive, but I would guess that (and please double-check me on this) the "System Reserved" partition (/dev/sdb1) is the boot partition.
  • Elephant454
    Elephant454 over 9 years
    I think I misunderstood your initial question. You are booting into the Windows bootloader by default instead of GRUB. You want to boot into GRUB by default. Correct? In this case, your grub.cfg looks correct. This isn't a GRUB issue, but rather a matter of which hard drive is booting first. You can change the order of this in your BIOS, OR you might be able to simply swap the order that the two drives are plugged in.
  • theStandard
    theStandard over 9 years
    I think you're misunderstanding me -- ironically. I'm temporarily using the windows bootloader because GRUB doesn't have an entry for windows, given that it's on another drive. I am going to abandon the windows bootloader (if I can ever get this fixed) and simply boot into the GRUB.
  • pylover
    pylover almost 8 years
    not working on 16.04