View previous topic :: View next topic |
Author |
Message |
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 2:58 am Post subject: [Solved] UEFI Dual Boot |
|
|
Hey there,
I have been trying to get my Gentoo install working for most of the day today. I have installed it multiple times before and it works great, until this new computer that I'm trying to dual boot it with windows 10. The other installs were just Gentoo by itself.
The install works great, no errors with grub or anything. Whenever I go to reboot, it just boots to windows. I go into the BIOS and it does not give me an option to switch to grub/Gentoo.
I'm not entirely sure what information to post at the moment, so whatever is needed I'll gladly give.
The install for this PC is windows on one HDD and Gentoo on a SSD. I'm not sure if that has something to do with this either. Thanks for any help!
Last edited by element432 on Thu Aug 24, 2017 6:14 pm; edited 1 time in total |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Fri Aug 04, 2017 3:59 am Post subject: |
|
|
element432, your problem is straight forward. Turn off secureboot. It is in the UEFI setup screen. I have no more specifics on its location. Happy hunting! _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 4:13 am Post subject: |
|
|
I believe I have it turned off... But I'll check again in the morning! Thanks for the reply! |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 10:40 am Post subject: Re: UEFI Dual Boot |
|
|
element432 wrote: | The install for this PC is windows on one HDD and Gentoo on a SSD. I'm not sure if that has something to do with this either. Thanks for any help! |
Make sure having an ESP (EFI System Partition) on each of HDD and SSD.
On SSD's ESP, you should have something like /boot/EFI/grub/grubx64.efi
and efibootmgr -v should display it for correct disk and correct partition (see the efibootmgr wiki article). |
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 12:13 pm Post subject: |
|
|
Alright, I checked and secure boot is off.
I do have a grubx64.efi file in that location too.
When I install grub while in chroot, efibootmgr shows it listed. When I reboot, grub won't pop up. I then chroot back into my install and efibootmgr no longer shows Gentoo. Just windows and the USB drive. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 12:23 pm Post subject: |
|
|
Please boot the computer using sysresccd and show your output of efibootmgr -v
And you could do the efibootmgr -v --create ....... from within sysresccd. Using the blkid command will tell you about disk / partition.
Be sure not to confuse /boot partition with root ("/") partition. |
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 12:42 pm Post subject: |
|
|
After rebooting, it comes up as:
Code: | BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0000,0001
Boot0000* Windows Boot Manager HD(2,GPT,941dbf48-e786-4a6e-7d3a40919441,0xe1800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS........X...B.C.D.O.B.J.E.C.T.={.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d..........
Boot0001* UEFI: SanDisk Ultra 1100 PciRoot(0x0)/Pci(0x14, 0x0)/USB(16,0)/CDROM(1,0x1ef18,0x22000)..BO
|
Then I run:
Code: | grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --boot-directory=/boot /dev/sda
|
the ssd is sda, hdd is sdb.
After that, efibootmgr comes up as:
Code: | BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0002,0000,0001
Boot0000* Windows Boot Manager HD(2,GPT,941dbf48-e786-4a6e-7d3a40919441,0xe1800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS........X...B.C.D.O.B.J.E.C.T.={.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d..........
Boot0001* UEFI: SanDisk Ultra 1100 PciRoot(0x0)/Pci(0x14, 0x0)/USB(16,0)/CDROM(1,0x1ef18,0x22000)..BO
Boot0003* grub HD(2,GPT,080eaab-235b-44ef-a464-cb5b9bfe83e4,0x408000,0x10000)/File(\EFI\grub\grubx64.efi)
|
Then after I exit chroot and reboot, it isnt there and after chrooting back in, efibootmgr reverts to the first posted one without grub. |
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 1:22 pm Post subject: |
|
|
I do notice, that in te UEFI boot settings. It does not give me the option to even select the SSD. Dont see it anywhere. So I am not sure if that is a problem that could be causing this too. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 1:38 pm Post subject: |
|
|
element432 wrote: | I do notice, that in te UEFI boot settings. It does not give me the option to even select the SSD. |
AFAIK the UEFI boot menu never lists any media. Instead, the list items are those as also seen by "efibootmgr -v".
So if you boot up with your USB-stick inserted, it should show the "Windows Boot Manager" and the efi boot entry of that USB-stick. Does it? |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 1:44 pm Post subject: |
|
|
Edit:
Code: | blkid | grep 080eaab-235b-44ef-a464-cb5b9bfe83e4 |
Does that match the ESP of your Gentoo SSD? |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 2:09 pm Post subject: |
|
|
element432 wrote: | This is what I get when just booting with sysrescue.
Code: |
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0000,0001
Boot0000* Windows Boot Manager HD(2,GPT,941dbf48-e786-4a6e-7d3a40919441,0xe1800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS........X...B.C.D.O.B.J.E.C.T.={.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d..........
Boot0001* UEFI: SanDisk Ultra 1100 PciRoot(0x0)/Pci(0x14, 0x0)/USB(16,0)/CDROM(1,0x1ef18,0x22000)..BO
|
|
Looks very promsing. Now, - do blkid
- do the efibotmgr --verbose --create --disk <and do on> with the correct details.
|
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 2:10 pm Post subject: |
|
|
Yes, that does match the ESP for Gentoo.
Okay, let me try that! |
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 2:23 pm Post subject: |
|
|
So I did
Code: | efibootmgr -c -d /dev/sda -p 2 -L "Gentoo" -l "\efi\EFI\gentoo\grub64.efi" |
and it showed it when running efibootmgr -v
Rebooted to only windows again, went back to Sysrescue cd and ran efibootmgr -v and it only showed
Code: | BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0000,0001
Boot0000* Windows Boot Manager HD(2,GPT,941dbf48-e786-4a6e-7d3a40919441,0xe1800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS........X...B.C.D.O.B.J.E.C.T.={.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d..........
Boot0001* UEFI: SanDisk Ultra 1100 PciRoot(0x0)/Pci(0x14, 0x0)/USB(16,0)/CDROM(1,0x1ef18,0x22000)..BO |
again. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 2:30 pm Post subject: |
|
|
Are you on openrc-0.28? Must have gone stable very recently There is a note in https://wiki.gentoo.org/wiki/Efibootmgr.
efivarfs might need to be mounted rw to successfully write to it.
Last edited by charles17 on Fri Aug 04, 2017 2:35 pm; edited 1 time in total |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Aug 04, 2017 2:31 pm Post subject: |
|
|
Just stepping in here to mention that I seem to recall discussion on this forum of some BIOS' wiping out everything but Windows upon boot. Try googling the situation with your mobo and BIOS number. I recall suggesting booting through Windows if Win10 still had that capability.
Personally, I wouldn't have Win10 onb my system and would wipe it. If you need Windows (I do for some applications) install Win 7 while you can.
Main point here is that there is a distinct possibility that your BIOS or Windows 10 is resetting your boot to Windows only. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 2:37 pm Post subject: |
|
|
Tony0945 wrote: | distinct possibility that your BIOS or Windows 10 is resetting your boot to Windows only. |
My guess: It could be the openrc-0.28 stuff |
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 2:58 pm Post subject: |
|
|
I am on openrc 0.28 and efivars is rw.
I may try with windows 7 haha. The reason for the windows install is games haha. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Aug 04, 2017 3:21 pm Post subject: |
|
|
element432 wrote: | I am on openrc 0.28 and efivars is rw.
I may try with windows 7 haha. The reason for the windows install is games haha. |
For windows 7 see my note here. Do you have a chance to temporarily remove the windows HDD from the computer?
Edit:
Some UEFI computers offer so-called Legacy ROM support. Be sure have have that disabled. |
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Fri Aug 04, 2017 3:40 pm Post subject: |
|
|
I believe legacy rom support is off. I believe I can get to the HDD to disconnect it. I had to leave for the weekend, won't be back till Sunday haha. I'm going to spend the next day or two looking up possible solutions and see if I can find anything.
If I can, or if I can't, I'll be able to update or provide more info when I'm back!
If you have any other ideas or info you may need, feel free to let me know, I'll get it when I can. Thanks again for the help! |
|
Back to top |
|
|
hceline n00b
Joined: 30 Aug 2015 Posts: 36
|
Posted: Sat Aug 05, 2017 11:32 am Post subject: |
|
|
Some bioses use a whitelist of filenames that are accepted.
You could try renaming grub64.efi to BOOTMGFW.EFI, or google for info on your motherboard. |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sun Aug 06, 2017 10:23 am Post subject: |
|
|
The Efi menu entry for Grub that grub-install create with efibootmgr may not available on reboot because it have been created in chroot. Binding the host efivarfs to Gentoo or mount the efivarfs inside Gentoo can cause problem. Execute the efibootmgr command for the new entry from the Sysrescuecd root shell, out of the Gentoo chroot.
Code: | efibootmgr -c -d /dev/sda -p 2 -L "Gentoo" -l "\efi\EFI\gentoo\grub64.efi" |
It will have more chance to stay over reboot. The Grub Efi executable grub64.efi is already in the Efi filesystem. Only the Efi persistent menu entry for Grub must be done with the good path to grub64.efi from the Efi filesystem root directory.
I think that you do not need to mount the Efi filesystem anywhere for the command to succeed, only the efivarfs must be mounted as read and write inside the host. efibootmgr write in the Efi firmware not in the Efi filesystem. _________________ Paul |
|
Back to top |
|
|
keyson l33t
Joined: 10 Jun 2003 Posts: 830 Location: Sweden
|
|
Back to top |
|
|
element432 n00b
Joined: 16 Dec 2016 Posts: 61
|
Posted: Thu Aug 24, 2017 6:14 pm Post subject: |
|
|
Figured it out. Whenever I've dual booted in the past, it's always been on one HDD. So I partitioned things a bit differently this time. I did a fresh install and used the windows EFI partition instead of creating a separate one. Worked fine after that! Thanks for all the help! |
|
Back to top |
|
|
|