You are not logged in.
Hello,
I did a fresh install of Arch Linux (dual booted with Windows 10). I can boot into Windows 10 normally at startup. When I boot into Arch GNU Grub starts instantly.
I can then boot into Arch with:
set root=(hd1,msdos3)
linux /boot/vmlinuz-linux-lts root=/dev/sdb3
initrd /boot/initramfs-linux-lts.img
boot
Once in Arch I've tried:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Which resulted in:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot: initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found Windows Boot Manager on /dev/sda2@/efi/Microsoft/Boot/bootmgfw.efi
done
Which it looks like it is finding everything it needs/wants. But when I reboot, same issue.
Any advice or help is greatly appreciated.
Thank you in advanced.
Last edited by Aqulaane (2020-02-05 00:25:49)
Offline
Use the set command (with no arguments) from the GRUB prompt to see the configuration.
I would try re-installing GRUB to the disk, how did you do that originally?
Jin, Jîyan, Azadî
Offline
Use the set command (with no arguments) from the GRUB prompt to see the configuration.
I would try re-installing GRUB to the disk, how did you do that originally?
Original install was done with (after mounting the /boot/EFI)
grub-install --target=x86_64-efi --bootloader-id=grub-uefi --recheck
Offline
Looks good, what is the output of
efibootmgr -v
I have to go to $DAY_JOB now, I'll be afk for ~10 hours or so.
EDIT: actually, try again but explicitly specify the ESP location with the --efi-directory option.
https://wiki.archlinux.org/index.php/GR … allation_2
Last edited by Head_on_a_Stick (2020-02-04 06:22:38)
Jin, Jîyan, Azadî
Offline
Output:
efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0000,0001,0002
Boot0000* Windows Boot Manager HD(2,GPT,7625b404-10f6-4040-b6ae-03d063e2e5a8,0xe1800,0x31800)/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.}...1................
Boot0001* ubuntu HD(2,GPT,7625b404-10f6-4040-b6ae-03d063e2e5a8,0xe1800,0x31800)/File(\EFI\UBUNTU\SHIMX64.EFI)..BO
Boot0002* Hard Drive BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........S.a.m.s.u.n.g. .S.S.D. .8.5.0. .E.V.O. .2.5.0.G.B...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.2.S.5.R.X.N.H.A.6.1.7.9.2.5. .P. . . . ........BO..NO..........S.T.9.7.5.0.4.2.0.A.S...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .W.5.4.S.1.C.1.M........BO
Tried reinstalling by declaring location and same issue.
Last edited by Aqulaane (2020-02-04 06:46:41)
Offline
Here is the output of
set
in GNU Grub.
https://imgur.com/a/JGTGcIL
Last edited by Aqulaane (2020-02-04 07:22:57)
Offline
Looks like your motherboard isn't accepting new NVRAM (boot) entries so it's still loading Ubuntu's GRUB, which doesn't work because the configuration file isn't there any more.
Try deleting Ubuntu's entry:
# efibootmgr -b 1 -B
Then use the removable loader location for Arch's GRUB:
grub-install --target=x86_64-efi --bootloader-id=grub-uefi --removable
If it doesn't work (your motherboard may just boot Windows' UEFI loader instead) then force Windows to chainload Arch instead by running this command from an Administrator prompt in Powershell:
bcdedit /set "{bootmgr}" path "\EFI\grub-uefi\grubx64.efi"
Double-check the path to grubx64.efi, it should be relative to the EFI system partition.
If that works then you will have to use the GRUB menu to start Windows.
Jin, Jîyan, Azadî
Offline
So I deleted the Ubuntu option on efibootmgr, check and it shows deleted. But when I reboot that option is still there in BIOS.
I rebooted into Arch via live usb to reinstall GRUB on /dev/sda2 (where my system efi partition is at). If I mount it
mount /dev/sda2 /mnt/boot/EFI
When I go to install again, using:
grub-install --target=x86_64-efi --efidirectory=/boot/EFI --bootloader-id=grub-uefi --removable
I recieved error:
grub-install: error: cannot find EFI directory
Offline
Mount your root partition and your ESP as they would be mounted for the installation process then arch-chroot in and run grub-install from the chroot.
If you have the ESP mounted to /boot/efi then you don't need to specify --efi-directory
EDIT: if you can't delete the Ubuntu NVRAM entry then you may have to copy $ESP/EFI/grub-uefi to $ESP/EFI/ubuntu, which is a horrible hack but not as horrible as the UEFI implementation on your motherboard.
Last edited by Head_on_a_Stick (2020-02-04 17:36:23)
Jin, Jîyan, Azadî
Offline
Mount your root partition and your ESP as they would be mounted for the installation process then arch-chroot in and run grub-install from the chroot.
If you have the ESP mounted to /boot/efi then you don't need to specify --efi-directory
EDIT: if you can't delete the Ubuntu NVRAM entry then you may have to copy $ESP/EFI/grub-uefi to $ESP/EFI/ubuntu, which is a horrible hack but not as horrible as the UEFI implementation on your motherboard.
I did everything as stated and got no errors. But now it just boots directly into GNU Grub.
Edit: It still shows (ubuntu) for whatever reason even after deleting it from efibootmgr and reinstall grub via arch.
Edit 2: Just saw your edit, mind walking me through that?
Last edited by Aqulaane (2020-02-04 17:44:11)
Offline
Just saw your edit, mind walking me through that?
# mount /dev/sda2 /mnt
# cp /mnt/EFI/grub-uefi/grubx64.efi /mnt/EFI/ubuntu
The shimx64.efi loader listed in the Ubuntu NVRAM entry should auto-load grubx64.efi in the same directory.
Jin, Jîyan, Azadî
Offline
Aqulaane wrote:Just saw your edit, mind walking me through that?
# mount /dev/sda2 /mnt # cp /mnt/EFI/grub-uefi/grubx64.efi /mnt/EFI/ubuntu
The shimx64.efi loader listed in the Ubuntu NVRAM entry should auto-load grubx64.efi in the same directory.
Tried that and no luck.
I can look into the ubuntu folder and I see both the shimx64.efi and the grubx64.efi, but still boots to GNU GRUB.
Edit: Here is what the file system looks like
https://imgur.com/a/huLBYZD
Last edited by Aqulaane (2020-02-04 18:02:50)
Offline
How about copying grubx64.efi to shimx64.efi? My heckles are rising as I type that but we're getting desperate here.
There's also the bcdedit command from Windows, that should chainload Arch's grubx64.efi from the bootmgfw.efi NVRAM entry.
Jin, Jîyan, Azadî
Offline
How about copying grubx64.efi to shimx64.efi? My heckles are rising as I type that but we're getting desperate here.
There's also the bcdedit command from Windows, that should chainload Arch's grubx64.efi from the bootmgfw.efi NVRAM entry.
I just tried:
# cp /mnt/EFI/grub-uefi/grubx64.efi /mnt/EFI/ubuntu/shimx64.efi
Same issue persists.
Offline
Did you try the bcdedit command from Windows?
There is also https://wiki.archlinux.org/index.php/Un … up_in_UEFI
The NVRAM boot entries are exposed via sysfs and you could try manually deleting /sys/firmware/efi/efivars/Boot0001* (and perhaps the /sys/firmware/efi/vars/{l,}Boot0001* directories) but that carries the risk of bricking your machine.
Jin, Jîyan, Azadî
Offline
Did you try the bcdedit command from Windows?
There is also https://wiki.archlinux.org/index.php/Un … up_in_UEFI
The NVRAM boot entries are exposed via sysfs and you could try manually deleting /sys/firmware/efi/efivars/Boot0001* (and perhaps the /sys/firmware/efi/vars/{l,}Boot0001* directories) but that carries the risk of bricking your machine.
I tried the original bcdedit command posted a few posts up. I will look into the efibootmgr link as soon as I am back at my computer (few hours).
I appreciate all the help and hopefully I come across a solution.
Offline
Making some progress. I was able to make my own boot entry by following that link. I thought I linked it to GRUB but apparently not. I can now see a GRUB boot option (which I named myself) but when I select it nothing happens. There is still Windows and Ubuntu options as well.
Offline
Finally figured it out. My fix below, in case anyone had same issue.
First I noticed I had hanging (leftover) boot files in my EFI partition. I went ahead and deleted all directories and their contents (excluding Windows files).
From there I did a fresh install of GRUB.
mount /dev/sdb3 /mnt ***this is where my / is***
arch-chroot /mnt
mount /dev/sda2 /mnt ***This is where my EFI partition is***
grub-install --target=x86_64-efi --efi-directory=/EFI --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
From there I went into my EFI partition to make sure everything was there.
I noticed it installed in /EFI/EFI/GRUB/grubx64.efi
Reboot.
Still didn't have a boot option from my BIOS.
arch-chroot back into /
efibootmgr --create --disk /dev/sda --part 2 --loader /EFI/EFI/GRUB/grubx64.efi --label "GRUB" --verbose -e 3
Tuh dah!
Good to go. Boots normally. From there I just had to make GRUB my primary boot.
Offline