[Bug 1008289] New: system does not boot with EFI and MS-DOS partition table
http://bugzilla.suse.com/show_bug.cgi?id=1008289 Bug ID: 1008289 Summary: system does not boot with EFI and MS-DOS partition table Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: jsrain@suse.com Reporter: aschnell@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- The system does not boot with EFI and MS-DOS partition table. How to reproduce: Start installation on a EFI system that has one disk and an empty MS-DOS partition table on that disk. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 Arvin Schnell <aschnell@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aschnell@suse.com Found By|--- |Development -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c1 --- Comment #1 from Arvin Schnell <aschnell@suse.com> --- Created attachment 700459 --> http://bugzilla.suse.com/attachment.cgi?id=700459&action=edit YaST logs -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c2 --- Comment #2 from Arvin Schnell <aschnell@suse.com> --- shim-install reports "GUID Partition Table Header signature is wrong: 0 != 5452415020494645". Interesting on a MS-DOS partition table. It also reports "Installation finished. No error reported.". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c3 --- Comment #3 from Arvin Schnell <aschnell@suse.com> --- Booting fails with message: "error: not a valid root device." -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c4 Arvin Schnell <aschnell@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jsrain@suse.com |mchang@suse.com --- Comment #4 from Arvin Schnell <aschnell@suse.com> --- BTW: The number is in hex and equals the GPT signature, see https://en.wikipedia.org/wiki/GUID_Partition_Table. So apparently grub2-install looks for a GPT which is not there. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c5 --- Comment #5 from Michael Chang <mchang@suse.com> --- We really has been using msdos table in UEFI for booting for a while, the example product is our openSUSE USB "hybrid" iso installation image for USB and so on, but are all created as "primary partition". I think putting EFI System partition in MSDOS extended partition is what to blame here, it's bogus for UEFI booting right now. The error "GUID Partition Table Header signature is wrong: 0 != 5452415020494645" came from efibootmgr, after that bogus boot entry created, something looked like: Boot0000* opensuse HD(5,MBR,0x4294967194,0x0,0x0)/File(\EFI\opensuse\grubx64.efi) 0x4294967194: seems to be MBR signature 0x0, 0x0: should well be partition_start and partition_size respectively, all zero is definitely wrong 5: partition number, makes sense as linux numbers it as /dev/sda5. But according to UEFI spec it's also wrong. section "9.3.6.1 Hard Drive" "Partition Number: Describes the entry in a partition table, starting with entry 1 ... Valid partition numbers for a MBR partition are [1, 4]." Finally, referring this pending pull request makes it clear that it's a missing piece in efibootmgr. https://github.com/rhinstaller/efibootmgr/pull/23 Of course, the result is a not bootable entry. 2. The "error: not a valid root device." comes from grub2's efi chainloader. I think you were trying to boot xen hypervisor ? Apart from that, the kernel boots well for me which is little surprised. Depending on how it maps grub device to underlying UEFI block_io handle, it must all count on UEFI device path for the device being booted and the target to be chainloaded to. I think something wrong in the firmware to present the extended partition path to grub2 or on the other hand grub2 fails to process the device path for the extended partition in particular. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c6 --- Comment #6 from Michael Chang <mchang@suse.com> --- Can we change our default proposal for MBR disk to use primary partition than extened/logical in UEFI ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c7 --- Comment #7 from Arvin Schnell <aschnell@suse.com> --- You mean primary partitions for / and /boot/efi or also for swap and /home? For me the installation also does not work when I put / and /boot/efi on primary partitions and swap and /home on logical partitions. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c8 --- Comment #8 from Michael Chang <mchang@suse.com> --- I mean / and /boot/efi on primary partition should work, but since I did not test it, I will do to confirm .. And meanwhile, I think I find the reason why "error: not a valid root device." happens when chainloading and am working on. I will update it and also the test result of / and /boot/efi on primary partition next Monday as I will be AFK sooner or later. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c9 --- Comment #9 from Michael Chang <mchang@suse.com> --- (In reply to Michael Chang from comment #8)
I mean / and /boot/efi on primary partition should work, but since I did not test it, I will do to confirm ..
I encountered yast2 partition warnings and errors during the installation. But after all the system boots and also chainloading xen hypvervisor works. I'll attach screen shots of errors later.
And meanwhile, I think I find the reason why "error: not a valid root device." happens when chainloading and am working on. I will update it and also the test result of / and /boot/efi on primary partition next Monday as I will be AFK sooner or later.
It is indeed related to device path. Grub2 treats the Hard Drive Media Device path as single node for a given partition. But for logical partition, it's an exception with two nodes for each one node for extended partition in mbr and the other for enclosed logical partition. That's what I got from OVMF, but did not verify on any shipped UEFI hardware. Anyway the testing package is provided in the project https://build.opensuse.org/package/show/home:michael-chang:bsc:1008289/grub2 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c10 --- Comment #10 from Michael Chang <mchang@suse.com> --- (In reply to Michael Chang from comment #5)
I applied the patch to efivar package and still does not work. Apparently it improves the boot variable by getting correct partition start and size, but still not what firmware expect. What it creates Boot0000* opensuse HD(5,MBR,0x4294967194,0x1000,0x4d800)/File(\EFI\opensuse\grubx64.efi) OTOH the OVMF firmware expect something like: HD(1,MBR,0x4294967194,0x800,0xdeadbeef)/HD(1,MBR,0x4294967194,0x1000,0x4d800)/File(\EFI\opensuse\grubx64.efi) Finally latest upstream git simply drops error message to extended partition. https://github.com/rhinstaller/efivar/blob/master/src/disk.c#L79 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c11 --- Comment #11 from Michael Chang <mchang@suse.com> --- Created attachment 701061 --> http://bugzilla.suse.com/attachment.cgi?id=701061&action=edit screenshots in yast to test msdos partition in UEFI -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|system does not boot with |system does not boot with |EFI and MS-DOS partition |EFI Sysetem Partition on |table |MS-DOS Extended Partition -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c12 --- Comment #12 from Michael Chang <mchang@suse.com> --- Hi Jiri and Arvin, For me it's beyond bug fix, but to support UEFI System Partition created on MS-DOS extended partition. I don't think it's currently work in any distro, based on the latest upstream status. I think using FATE to track is more appropriate (if at all we want to support it) as involved changes in grub2/efibootmgr/yast, or I'll simply close this one as "resolved upstream". How do you think? Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c13 --- Comment #13 from Arvin Schnell <aschnell@suse.com> --- (In reply to Michael Chang from comment #9)
I encountered yast2 partition warnings and errors during the installation.
For the pmbr-boot flag I already opened bug #1008092, fixed meanwhile. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c14 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(aschnell@suse.com | |) --- Comment #14 from Michael Chang <mchang@suse.com> --- Hi Arvin, Could you please test the grub2 and efivar package in this project ? https://build.opensuse.org/project/show/home:michael-chang:bsc:1008289 Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c15 Arvin Schnell <aschnell@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(aschnell@suse.com | |) | --- Comment #15 from Arvin Schnell <aschnell@suse.com> --- My first test (of the initial issue) did not show an improvement. What scenario do the new packages fix? Also, how can I see in the logs whether the new packages are used? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c16 --- Comment #16 from Michael Chang <mchang@suse.com> --- (In reply to Arvin Schnell from comment #15)
My first test (of the initial issue) did not show an improvement.
I think the initial issue (installation starting from an empty msdos table) should be covered by the patch in the test package as the installer will propose ESP on logical partition, which caused trouble (and that's why I changed the title to make it more obvious what the real problem is.)
What scenario do the new packages fix?
For libefivar0 package, it tries to make UEFI device path correct for MSDOS extended/logical partition on behalf of efibootmgr. In grub2, it tries to fix the chainloader command to be able to load the UEFI image on msdos extended partition without errors.
Also, how can I see in the logs whether the new packages are used?
Well I think rpm changelog of libefivar0 and grub2 package would be the first to check with. I did not add new log messages so cannot tell from it. :( But we can see if the UEFI device path is created as expected. Please help in providing the command output ? Thanks. # parted /dev/sda unit s print # efibootmgr -v FYI, the related command output on my (working) setup. linux-1cym:~ # rpm -q --changelog libefivar0 |head -n 3 * 2016 11月 14 一 mchang@suse.com - Add support-msdos-extended-partition.patch (bsc#1008289) linux-1cym:~ # rpm -q --changelog grub2 |head -n 3 * 2016 11月 07 一 mchang@suse.com - Fix is_child return true for child with more than one nodes (bsc#1008289) * add grub2-efidisk-is_child.patch linux-1cym:~ # parted /dev/sda unit s print Model: ATA QEMU HARDDISK (scsi) Disk /dev/sda: 62914560s Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 2048s 62914559s 62912512s extended lba, type=0f 5 4096s 321535s 317440s logical fat16 boot, type=83 6 323584s 3373055s 3049472s logical linux-swap(v1) type=82 7 3375104s 28194815s 24819712s logical btrfs type=83 8 28196864s 62894079s 34697216s logical xfs type=83 linux-1cym:~ # efibootmgr -v BootCurrent: 0001 Timeout: 0 seconds BootOrder: 0002,0001,0008 Boot0001* opensuse-secureboot HD(1,MBR,0x4294967194,0x800,0x3bff800)/HD(1,MBR,0x0,0x1000,0x4d800)/File(\EFI\opensuse\shim.efi) Boot0002* EFI DVD/CDROM PciRoot(0x0)/Pci(0x1,0x1)/Ata(0,1,0) Boot0008* EFI Internal Shell MemoryMapped(11,0x900000,0x11fffff)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 Arvin Schnell <aschnell@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|system does not boot with |system does not boot with |EFI Sysetem Partition on |EFI System Partition on |MS-DOS Extended Partition |MS-DOS Extended Partition -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1008289 http://bugzilla.suse.com/show_bug.cgi?id=1008289#c17 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |NORESPONSE --- Comment #17 from Michael Chang <mchang@suse.com> --- This bug is review in bug squash workshop. The patch provided was tested to fix the problem on my testing, if you still are willing to verify it again and check with the changlog, please reopen and I could build new test packages. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com