Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-boot does not show boot entries defined on the extended boot partition with nvme device #32535

Open
emk2203 opened this issue Apr 28, 2024 · 1 comment
Labels
bug 🐛 Programming errors, that need preferential fixing sd-boot/sd-stub/bootctl

Comments

@emk2203
Copy link

emk2203 commented Apr 28, 2024

systemd version the issue has been seen with

systemd 255 (255.5-2-arch) +PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified

Used distribution

Arch

Linux kernel version used

6.8.6-arch1-1, also 6.8.7-arch1-2

CPU architectures issue was seen on

x86_64

Component

systemd-boot

Expected behaviour you didn't see

Show menu of entries in /boot/loader/entries (XBOOTLDR partition), same way it does on my non-NVMe systems.

Unexpected behaviour you saw

Only autogenerated MSWindows, UEFI OS and firmware setup entries were shown

Steps to reproduce the problem

Setup system with ESP and XBOOTLDR partition (appropriate UUIDs) similar to

[root@archboot entries]# gdisk -l /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/nvme0n1: 488378646 sectors, 1.8 TiB
Model: WD_BLACK SN850 Heatsink 2TB             
Sector size (logical/physical): 4096/4096 bytes
Disk identifier (GUID): 2E4682FF-600C-4451-AA99-81F3C5385B4F
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 5
First usable sector is 256, last usable sector is 488378640
Partitions will be aligned on 256-sector boundaries
Total free space is 17 sectors (68.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             256           25855   100.0 MiB   EF00  EFI system partition
   2           25856           29951   16.0 MiB    0C01  Microsoft reserved ...
   3           29952        25402111   96.8 GiB    0700  Basic data partition
   4        25402112        25599999   773.0 MiB   2700  
   5        25600000        25676799   300.0 MiB   EA00  XBOOTLDR partition
   6        25676800        27571199   7.2 GiB     8200  Linux swap
   7        27571200        34124799   25.0 GiB    8304  Linux x86-64 root (/)
   8        34124800        47231999   50.0 GiB    8302  Linux /home
   9        47232000        53785599   25.0 GiB    8300  Linux filesystem
  10        53785600        60339199   25.0 GiB    8300  Linux filesystem
  11        60339200       488378623   1.6 TiB     8306  Linux /srv

Populate partitions as follows:

[root@archboot entries]# find /efi -maxdepth 2
/efi
/efi/EFI
/efi/EFI/Microsoft
/efi/EFI/Boot
/efi/EFI/systemd
/efi/loader
/efi/loader/loader.conf
/efi/loader/random-seed
/efi/shellx64.efi

[root@archboot entries]# find /boot
/boot
/boot/vmlinuz-linux
/boot/initramfs-linux.img
/boot/intel-ucode.img
/boot/loader
/boot/loader/entries
/boot/loader/entries/arch.conf
/boot/loader/entries/arch-fallback.conf
/boot/loader/entries/memtest.conf
/boot/loader/entries.srel
/boot/EFI
/boot/EFI/Linux
/boot/memtest86+
/boot/memtest86+/memtest.efi

chroot into system, `bootctl install`, reboot

### Additional program output to the terminal or log subsystem illustrating the issue

Fastboot is switched **off** in the firmware.

```sh
[root@archboot entries]# bootctl status
System:
      Firmware: n/a (n/a)
 Firmware Arch: x64
   Secure Boot: disabled
  TPM2 Support: yes
  Measured UKI: no
  Boot into FW: supported

Current Boot Loader:
      Product: n/a
     Features: ✗ Boot counting
               ✗ Menu timeout control
               ✗ One-shot menu timeout control
               ✗ Default entry control
               ✗ One-shot entry control
               ✗ Support for XBOOTLDR partition
               ✗ Support for passing random seed to OS
               ✗ Load drop-in drivers
               ✗ Support Type #1 sort-key field
               ✗ Support @saved pseudo-entry
               ✗ Support Type #1 devicetree field
               ✗ Enroll SecureBoot keys
               ✗ Retain SHIM protocols
               ✗ Menu can be disabled
               ✗ Boot loader sets ESP information
          ESP: n/a
         File: └─n/a

Random Seed:
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
          ESP: /efi (/dev/disk/by-partuuid/48dc55e3-95f8-4463-b690-55030b5e2027)
         File: ├─/EFI/systemd/systemd-bootx64.efi (systemd-boot 255.5-2-arch)
               └─/EFI/BOOT/bootx64.efi (systemd-boot 255.5-2-arch)

Boot Loaders Listed in EFI Variables:
        Title: Linux Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/48dc55e3-95f8-4463-b690-55030b5e2027
         File: └─/EFI/systemd/systemd-bootx64.efi

        Title: Windows Boot Manager
           ID: 0x0001
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/48dc55e3-95f8-4463-b690-55030b5e2027
         File: └─/EFI/MICROSOFT/BOOT/BOOTMGFW.EFI

        Title: UEFI OS
           ID: 0x0002
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/c4678a72-7419-b328-f346-eb2b55769e66
         File: └─/EFI/BOOT/BOOTX64.EFI

Boot Loader Entries:
        $BOOT: /boot (/dev/disk/by-partuuid/861f195d-ea20-4b6c-a73b-a84f53db07c8)
        token: arch

Default Boot Loader Entry:
         type: Boot Loader Specification Type #1 (.conf)
        title: Memtest86+
           id: memtest.conf
       source: /boot//loader/entries/memtest.conf
          efi: /boot//memtest86+/memtest.efi
[root@archboot entries]# 

[root@archboot entries]# bootctl list
         type: Boot Loader Specification Type #1 (.conf)
        title: Memtest86+ (default) (not reported/new)
           id: memtest.conf
       source: /boot//loader/entries/memtest.conf
          efi: /boot//memtest86+/memtest.efi

         type: Boot Loader Specification Type #1 (.conf)
        title: Arch Linux (not reported/new)
           id: arch.conf
       source: /boot//loader/entries/arch.conf
        linux: /boot//vmlinuz-linux
       initrd: /boot//intel-ucode.img
               /boot//initramfs-linux.img

         type: Boot Loader Specification Type #1 (.conf)
        title: Arch Linux (fallback) (not reported/new)
           id: arch-fallback.conf
       source: /boot//loader/entries/arch-fallback.conf
        linux: /boot//vmlinuz-linux
       initrd: /boot//intel-ucode.img
               /boot//initramfs-linux-fallback.img (No such file or directory)

[root@archboot entries]# cat /efi/loader/loader.conf 
default @saved
timeout 3
console-mode keep

[root@archboot entries]# cat /boot/loader/entries/arch.conf 
title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
#options root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rw

Output of map command in UEFI shell:

��Mapping table
      FS0: Alias(s):HD0x0b0b:;BLK1:
          PciRoot(0x0)/Pci(0x14,0x0)/USB(0x17,0x0)/USB(0x1,0x0)/HD(1,GPT,52FE17B9-E327-1199-F10F-3459C020493B,0x800,0x5B3028F)
      FS1: Alias(s):HD0x0b0c:;BLK2:
          PciRoot(0x0)/Pci(0x14,0x0)/USB(0x17,0x0)/USB(0x1,0x0)/HD(2,GPT,C4678A72-7419-B328-F346-EB2B55769E66,0x5B30A8F,0x10000)
      FS4: Alias(s):HD3b:;BLK10:
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(1,GPT,48DC55E3-95F8-4463-B690-55030B5E2027,0x100,0x6400)
      FS5: Alias(s):HD3d:;BLK14:
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(3,GPT,2D2431A2-1029-4F83-9C1E-6D1CBE016B63,0x7500,0x1832600)
      FS6: Alias(s):HD3e:;BLK15:
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(4,GPT,7B3B536E-3E3E-4188-A007-A4470CD340D6,0x1839B00,0x30500)
      FS7: Alias(s):HD3f:;BLK16:
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(5,GPT,861F195D-EA20-4B6C-A73B-A84F53DB07C8,0x186A000,0x12C00)
      FS2: Alias(s):HD1c:;BLK6:
          PciRoot(0x0)/Pci(0x1A,0x0)/Pci(0x0,0x0)/NVMe(0x1,B8-77-91-31-53-38-25-00)/HD(2,GPT,8C191AC8-FC76-4394-BB18-F47B78547AFC,0x8000,0xE8E00000)
      FS3: Alias(s):HD2b:;BLK8:
          PciRoot(0x0)/Pci(0x1D,0x0)/Pci(0x0,0x0)/NVMe(0x1,45-D8-DB-2A-01-75-A0-00)/HD(1,GPT,D38CCCAE-E7D5-46A0-8584-CD7DE407722D,0x800,0xE8E08000)
     BLK0: Alias(s):
          PciRoot(0x0)/Pci(0x14,0x0)/USB(0x17,0x0)/USB(0x1,0x0)
     BLK3: Alias(s):
          PciRoot(0x0)/Pci(0x14,0x0)/USB(0x2,0x0)
     BLK9: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)
    BLK13: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(2,GPT,41D09BE1-397A-4493-A357-B73CF986DC94,0x6500,0x1000)
    BLK17: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(6,GPT,036FC676-8762-4FC3-AFF5-40EF60BBCBB3,0x187CC00,0x1CE800)
    BLK18: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(7,GPT,D4AB315B-2AC8-44BA-B5A0-515F0CBF8DA6,0x1A4B400,0x640000)
    BLK19: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(8,GPT,4C98BD69-BBC1-43DC-AE65-3D2FA1972CB0,0x208B400,0xC80000)
    BLK20: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(9,GPT,7CE19987-4698-4C6C-A9B9-AD7BB9948CEA,0x2D0B400,0x640000)
    BLK11: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(10,GPT,398B4473-B44F-421A-8FB6-2866A8B1E1DB,0x334B400,0x640000)
    BLK12: Alias(s):
          PciRoot(0x0)/Pci(0x6,0x0)/Pci(0x0,0x0)/NVMe(0x1,F9-91-95-45-8B-44-1B-00)/HD(11,GPT,0CCB6850-7DC4-47CB-90EC-DFC7E53E1B95,0x398B400,0x19835D00)
     BLK4: Alias(s):
          PciRoot(0x0)/Pci(0x1A,0x0)/Pci(0x0,0x0)/NVMe(0x1,B8-77-91-31-53-38-25-00)
     BLK5: Alias(s):
          PciRoot(0x0)/Pci(0x1A,0x0)/Pci(0x0,0x0)/NVMe(0x1,B8-77-91-31-53-38-25-00)/HD(1,GPT,0D5E68B3-7832-443B-8F72-266704FF0820,0x22,0x7FDE)
     BLK7: Alias(s):
          PciRoot(0x0)/Pci(0x1D,0x0)/Pci(0x0,0x0)/NVMe(0x1,45-D8-DB-2A-01-75-A0-00)

This was already a bug in #23442 which was closed with 'needs-reporter-feedback'.

@emk2203 emk2203 added the bug 🐛 Programming errors, that need preferential fixing label Apr 28, 2024
@emk2203 emk2203 changed the title systemd-boot does not show boot entries defined on the extended boot partition with nvme device #23442 systemd-boot does not show boot entries defined on the extended boot partition with nvme device Apr 28, 2024
@emk2203
Copy link
Author

emk2203 commented May 1, 2024

@medhefgo : If further information is needed, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing sd-boot/sd-stub/bootctl
Development

No branches or pull requests

1 participant