[Bug 1174412] New: Boot entry pointing to the wrong partition
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412 Bug ID: 1174412 Summary: Boot entry pointing to the wrong partition Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.2 Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: screening-team-bugs@suse.de Reporter: andresbs2000@protonmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I have Windows in a HDD and Leap 15.2 in a SSD, both have separate EFI partitions. I had some trouble getting the Leap installer started so I installed using the DVD iso as a repository in the live enviroment (somehow, that did boot properly). I am using secure and trusted boot. When I update any bootloader settings in Yast, the new boot entry in the UEFI points to Windows EFI, so it looks for a grub/shim .efi file that does not exist. Manually loading .../boot/bootx64.efi, creating a custom boot entry in the UEFI, pops up an error saying something about boot order, boots successfully but in the process creates a boot entry poiting, again, to Windows EFI partition, which fails to boot. This bug/misconfiguration does not happen if I disable the HDD; editing from Yast Bootloader or booting from bootx64, both create the right boot entry. If I enable the hard drive again, bootx64 says the same boot order error and creates a new boot entry with the same problem as before. Currently, I boot directly from shim.efi, through a custom UEFI entry. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c2
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c3
--- Comment #3 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c4
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c5
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c6
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c7
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c8
--- Comment #8 from Fabian Vogt
Created attachment 839979 [details] Shim log and efibootmgr output
efibootmgr appears to speak the truth, the partition uuid is wrong.
Looking at shim's log... four lines caught my attention:
+ rootdir= + efidir= + install_device= + efibootdir=
They're empty.
Attached requested logs as logs.zip.
That's actually just the initialization of variables at the beginning. shim-install fails because neither /boot/efi nor /boot/EFI exist as directory, which is weird. Can you confirm that? What's /etc/fstab, the output of findmnt and systemctl status /boot/efi (as root)? When YaST ran shim-install, /boot/efi was mounted and it finished successfully. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c9
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c10
--- Comment #10 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c11
--- Comment #11 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c12
Fabian Vogt
You're right! Aparantely there is /boot/efi/EFI...
That's normal - /boot/efi is the mountpoint of the ESP, which has everything below /EFI. So if /boot/efi/EFI exists, why does test -d /boot/efi in shim-install fail? Maybe this helps: findmnt test -d /boot/efi && echo "exists" grub2-probe --target=disk --device-map= /boot/efi grub2-probe --target=drive --device-map= /boot/efi bash -x shim-install --efi-directory /boot/efi AFAICT this is an unrelated issue though. Either /boot/efi is mounted as the wrong partition (which AFAICT is unlikely), grub2-probe is returning the wrong device or libefiboot translates the path wrong. Does this result in a working boot entry? efibootmgr -c -d /dev/nvme0n1 -p 1 -w -L efibootmgr-manual -l '\EFI\opensuse\shim.efi' -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c13
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c14
Fabian Vogt
After running the other commands, the new boot entry "efibootmgr-manual" does not work either. It also points to the hard disk.
Ok, so it's efibootmgr or efivar doing something weird, reassigning. For completeness, what does blkid say? blkid /dev/sda /dev/sda1 /dev/nvme0n1 /dev/nvme0n1p1 blkid -p /dev/sda /dev/sda1 /dev/nvme0n1 /dev/nvme0n1p1
=drive shows:
(hostdisk//dev/nvme0n1,gpt1)
=disk shows:
/dev/nvme0n1
That confirms grub2-probe is working correctly.
Considering I had to do so many workarounds to get the Leap installer going... neither Balenaetcher, dd, or Rufus worked on Windows. Imagewriter on Leap did work and the installer now loads.
How did I start the installer? Somehow, the live iso did boot, so I added the DVD iso as a repository and the installer worked, business as usual from there.
Probably that confused something in the install process.
Possibly, but that would still be a bug and it's also reproduable manually apparently - AFAICT the system is configured correctly and there's nothing weird going on like duplicate UUIDs.
Anyways, now that I can load the installer, I might reinstall, just for the sake of it. I still want to see what went wrong in case there is actually a bug lying behind or it happens again.
FWICT, it does actually look like a bug. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c15
--- Comment #15 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c16
--- Comment #16 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c17
--- Comment #17 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c18
--- Comment #18 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c19
--- Comment #19 from Gary Ching-Pang Lin
So... it looks like efivar was not installed at all. Ah sorry. Pasted the wrong link. It should be libefivar1.
Installed efivar 37 and updated libefivar1 to version 37, and it did not get fixed (didn't break anything either).
Thanks for testing! So the bug is still hiding somewhere inside efivar... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c20
--- Comment #20 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c21
--- Comment #21 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c22
--- Comment #22 from Gary Ching-Pang Lin
Created attachment 840054 [details] 1
Attached log.
efibootmgr.log was empty.
I did not think too much about the command, just ran it as su and ignored warnings about signatures for the rpms.
¯\_(ツ)_/¯
Urghh, my silly typo. "2&>1" should be "2>&1". The correct version: sudo efibootmgr -v -v -c -d /dev/nvme0n1 -p 1 -w -L efibootmgr-manual -l '\EFI\opensuse\shim.efi' 2>&1 | tee efibootmgr.log -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c23
--- Comment #23 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c24
--- Comment #24 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c25
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c26
--- Comment #26 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c27
--- Comment #27 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c28
--- Comment #28 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c29
--- Comment #29 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c30
--- Comment #30 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c31
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c32
--- Comment #32 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c33
--- Comment #33 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c34
--- Comment #34 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c35
--- Comment #35 from Gary Ching-Pang Lin
BootCurrent: 0002 Timeout: 0 seconds BootOrder: 0003,0002,0001
Boot0000* Windows Boot Manager HD(1,GPT,006a637d-39b9-4d5d-be5a-e770db71c27f,0x800,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. }...t................
Boot0001* Windows PciRoot(0x0)/Pci(0x17,0x0)/Sata(1,65535,0)/HD(1,GPT,006a637d-39b9-4d5d-be5a- e770db71c27f,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot0002* OpenSUSE PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-1B-44-8B-46-D1-0C-40)/ HD(1,GPT,4aaad53c-5ec2-4c59-a48d-981c60d11db4,0x800,0xfa000)/ File(\EFI\opensuse\shim.efi)
Boot0003* opensuse-secureboot HD(1,GPT,4aaad53c-5ec2-4c59-a48d-981c60d11db4,0x800,0xfa000)/ File(\EFI\opensuse\shim.efi)
I did not install the custom software you posted above, should I do it and then update the logs?
There is no need to install efibootmgr I've posted. Just want to check the content of the boot entry.
Now that I look closer, as you suggest, it is indeed sending an incomplete boot entry, since appending "PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-1B-44-8B-46-D1-0C-40)/" seems to make Boot0003 match Boot0002.
The short device path is convenient in some cases. For example, moving hdd from SATA1 to SATA2 won't break the boot entry since the UUID doesn't change. A boot entry with a full device path is restricted to the specific bus. It seems the firmware doesn't like the short device path :-(
What looks so weird to me is the fact that Windows boot entry, despite being on the hard drive, has "PciRoot(0x0)/Pci(0x17,0x0)/Sata(1,65535,0)/" appended. It does say sata instead of nvme, but it still seems odd to see PCI thrown in there.
It just means SATA1 is wired to PCI bus and is common in x86 systems.
By the way, I erased the SSD's GPT when reinstalling.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c36
--- Comment #36 from Gary Ching-Pang Lin
One thing I'd like to add that might be useful (or not!). When I was using Tumbleweed (between March and July 2020) on my SSHD, everything worked fine and the boot entry was created properly whenever I changed any settings or updated. The SSHD had Manjaro, Ubuntu, Windows and TW, all in single separate partitions. If it was my EFI, it would have failed there as well, I guess. What other software is invovled in the process of making the boot entry, apart from efibootmgr and libefivar1? Could it be something already fixed?
So did the boot entry created by TW work for you? TW and 15.2 use the same efibootmgr version while TW uses efivar 37 already, it would be interesting if the TW boot entry actually works. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c37
--- Comment #37 from Gary Ching-Pang Lin
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c38
Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c39
--- Comment #39 from Gary Ching-Pang Lin
Well well... there was a firmware upadate, but it didn't solve it (just security). I didn't get any notifications so something is wrong with Dell.
So the idea that if I install Leap on my hard drive the issue should happen there as well is not off...
If it is the UEFI, I am wondering why did it start happening until now? The only different thing is that the UEFI has a master password now and USB boot locked. I think the same as the forum guys, I can't tell if it's the UEFI or Linux, but it seems like they're not talking to each other properly.
Yup, -e 3 did it. Thanks!
That's good to know :)
Boot0003* opensuse-manual PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-1B-44-8B-46-D1-0C-40)/ HD(1,GPT,4aaad53c-5ec2-4c59-a48d-981c60d11db4,0x800,0xfa000)/ File(\EFI\opensuse\shim.efi)
Should I edit the title so it refelcts the actual problem or I leave it like that?
Just keep it since we cannot reproduce the boot entry in comment#5 anymore... Feel free to reopen this bug if you find a reliable way to reproduce it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c40
--- Comment #40 from Andrés Barrantes Silman
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412
http://bugzilla.opensuse.org/show_bug.cgi?id=1174412#c41
--- Comment #41 from Andrés Barrantes Silman
participants (1)
-
bugzilla_noreply@suse.com