You are not logged in.

#1 2020-07-01 20:40:18

robotux
Member
Registered: 2020-07-01
Posts: 5

UEFI boot crashes before it even loads kernel

I am no longer able to boot into my linux installation which was installed on nvme0n1 device. I have only 2 partitions there - EFI and root.
When i select in BIOS boot order the Linux Boot Manager entry then the PC just freezes for half a second and restarts. The entry for Windows works fine.
There is no record about the attempted start in jounald.

I tried to execute directly /EFI/BOOT/BOOTX64.EFI and /EFI/systemd/systemd-bootx64.efi directly in UEFI shell but with the same result.

I was able to mount those 2 partitions(nvme0n1p1 and nvme0n1p2) via live cd and chroot, update the system, reinstall systemd-boot, regenerate initcpio but nothing helped.

Fast boot and secured boot are disabled in BIOS.

I am using systemd-boot boot loader.

More info:

bootctl status

System:
     Firmware: UEFI 2.50 (American Megatrends 5.12)
  Secure Boot: disabled
   Setup Mode: user

Current Boot Loader:
      Product: systemd-boot 242.29-1-arch
     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
               ✗ Boot loader sets ESP partition information
          ESP: n/a
         File: └─/EFI/BOOT/loader.efi

Random Seed:
 Passed to OS: no
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
          ESP: /boot (/dev/disk/by-partuuid/8280f0fb-a579-e74e-a44f-51826c8fad1f)
         File: └─/EFI/systemd/systemd-bootx64.efi (systemd-boot 245.6-8-arch)
         File: └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 245.6-8-arch)

Boot Loaders Listed in EFI Variables:
        Title: Linux Boot Manager
           ID: 0x0005
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/8280f0fb-a579-e74e-a44f-51826c8fad1f
         File: └─/EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI

        Title: Windows Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/8280f0fb-a579-e74e-a44f-51826c8fad1f
         File: └─/EFI/MICROSOFT/BOOT/BOOTMGFW.EFI

Boot Loader Entries:
        $BOOT: /boot (/dev/disk/by-partuuid/8280f0fb-a579-e74e-a44f-51826c8fad1f)

Default Boot Loader Entry:
        title: arch
           id: arch.conf
       source: /boot/loader/entries/arch.conf
        linux: /vmlinuz-linux
       initrd: /intel-ucode.img
               /initramfs-linux.img
      options: cryptdevice=UUID=e9d526b3-4b8f-469e-a1a4-70da9620bb02:root root=/dev/mapper/root rw

loader.conf

#timeout 3
#console-mode keep
default arch.conf
console-mode max
editor no

arch.conf

title arch
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=UUID=e9d526b3-4b8f-469e-a1a4-70da9620bb02:root root=/dev/mapper/root rw

efibootmgr -v

BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0005,0000,0001,0006,0007,0008
Boot0000* Windows Boot Manager	HD(1,GPT,8280f0fb-a579-e74e-a44f-51826c8fad1f,0x800,0x100000)/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.}...a................
Boot0001* Hard Drive	BBS(HD,,0x0)..GO..NO..........S.a.m.s.u.n.g. .S.S.D. .9.7.0. .E.V.O. .P.l.u.s. .1.T.B....................A...........................%8Y.........N..Gd-.;.A..MQ..L.S.a.m.s.u.n.g. .S.S.D. .9.7.0. .E.V.O. .P.l.u.s. .1.T.B........BO..NO........o.W.D.C. .W.D.1.0.0.2.F.A.E.X.-.0.0.Z.3.A.0....................A...........................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.T.A.C.R.1.5.4.2.9.9........BO..NO........o.W.D.C. .W.D.1.0.0.2.F.A.E.X.-.0.0.Y.9.A.0....................A...........................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.W.A.1.3.1.8.5.5.1.5........BO..NO........o.S.T.2.0.0.0.D.M.0.0.6.-.2.D.M.1.6.4....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .4.Z.B.Z.S.B.Q.S........BO..NO........o.S.a.m.s.u.n.g. .S.S.D. .8.4.0. .E.V.O. .2.5.0.G.B....................A...........................>..Gd-.;.A..MQ..L.1.S.B.D.S.N.F.A.3.6.4.0.2.1. .E. . . . ........BO
Boot0005* Linux Boot Manager	HD(1,GPT,8280f0fb-a579-e74e-a44f-51826c8fad1f,0x800,0x100000)/File(\EFI\SYSTEMD\SYSTEMD-BOOTX64.EFI)
Boot0006* UEFI OS	HD(1,MBR,0x2846e,0x800,0x1400000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0007* UEFI OS	HD(3,MBR,0x2846e,0x71ff5800,0x2710000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0008* USB	BBS(HD,,0x0)..GO..NO........s.W.D. .E.l.e.m.e.n.t.s. .1.0.4.2. .1.0.1.6....................A.......................F..Gd-.;.A..MQ..L.5.7.5.8.3.4.3.1.4.5.3.7.3.2.4.C.5.A.3.1.3.6.3.4........BO

tree /boot

/boot/
├── d4001b2bab5f46e195cc53d318e2d68f
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   ├── Linux
│   ├── Microsoft
│   │   ├── Boot
│   │   │   ├── BCD
│   │   │   ├── BCD.LOG
│   │   │   ├── BCD.LOG1
│   │   │   ├── BCD.LOG2
│   │   │   ├── bg-BG
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── bootmgfw.efi
│   │   │   ├── bootmgr.efi
│   │   │   ├── BOOTSTAT.DAT
│   │   │   ├── boot.stl
│   │   │   ├── cs-CZ
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── da-DK
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── de-DE
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── el-GR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── en-GB
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── en-US
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── es-ES
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── es-MX
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── et-EE
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── fi-FI
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── Fonts
│   │   │   │   ├── chs_boot.ttf
│   │   │   │   ├── cht_boot.ttf
│   │   │   │   ├── jpn_boot.ttf
│   │   │   │   ├── kor_boot.ttf
│   │   │   │   ├── malgun_boot.ttf
│   │   │   │   ├── malgunn_boot.ttf
│   │   │   │   ├── meiryo_boot.ttf
│   │   │   │   ├── meiryon_boot.ttf
│   │   │   │   ├── msjh_boot.ttf
│   │   │   │   ├── msjhn_boot.ttf
│   │   │   │   ├── msyh_boot.ttf
│   │   │   │   ├── msyhn_boot.ttf
│   │   │   │   ├── segmono_boot.ttf
│   │   │   │   ├── segoen_slboot.ttf
│   │   │   │   ├── segoe_slboot.ttf
│   │   │   │   └── wgl4_boot.ttf
│   │   │   ├── fr-CA
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── fr-FR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── hr-HR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── hu-HU
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── it-IT
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── ja-JP
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── kd_02_10df.dll
│   │   │   ├── kd_02_10ec.dll
│   │   │   ├── kd_02_1137.dll
│   │   │   ├── kd_02_14e4.dll
│   │   │   ├── kd_02_15b3.dll
│   │   │   ├── kd_02_1969.dll
│   │   │   ├── kd_02_19a2.dll
│   │   │   ├── kd_02_1af4.dll
│   │   │   ├── kd_02_8086.dll
│   │   │   ├── kd_07_1415.dll
│   │   │   ├── kd_0C_8086.dll
│   │   │   ├── kdstub.dll
│   │   │   ├── ko-KR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── lt-LT
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── lv-LV
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── memtest.efi
│   │   │   ├── nb-NO
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── nl-NL
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── pl-PL
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── pt-BR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── pt-PT
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── qps-ploc
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── Resources
│   │   │   │   ├── bootres.dll
│   │   │   │   └── en-US
│   │   │   │       └── bootres.dll.mui
│   │   │   ├── ro-RO
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── ru-RU
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── sk-SK
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── sl-SI
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── sr-Latn-RS
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── sv-SE
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── tr-TR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── uk-UA
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── winsipolicy.p7b
│   │   │   ├── zh-CN
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   └── zh-TW
│   │   │       ├── bootmgfw.efi.mui
│   │   │       ├── bootmgr.efi.mui
│   │   │       └── memtest.efi.mui
│   │   └── Recovery
│   │       ├── BCD
│   │       ├── BCD.LOG
│   │       ├── BCD.LOG1
│   │       └── BCD.LOG2
│   └── systemd
│       └── systemd-bootx64.efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── intel-ucode.img
├── loader
│   ├── entries
│   │   └── arch.conf
│   ├── loader.conf
│   └── random-seed
├── System Volume Information
│   ├── AadRecoveryPasswordDelete
│   └── ClientRecoveryPasswordRotation
└── vmlinuz-linux

52 directories, 146 files

uuid

total 0
drwxr-xr-x 2 root root 300 Jul  1 20:06 .
drwxr-xr-x 8 root root 160 Jul  1 20:06 ..
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0002846e-01 -> ../../sde1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0002846e-02 -> ../../sde2
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0002846e-03 -> ../../sde3
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0711fdde-b886-48be-9340-d44abded65b5 -> ../../sdd2
lrwxrwxrwx 1 root root  15 Jul  1 20:12 3b000c5e-6d69-e94a-89a9-a4dbd785807d -> ../../nvme0n1p2
lrwxrwxrwx 1 root root  10 Jul  1 20:11 4d5203c3-9d06-4722-89c0-7e241d8f9eec -> ../../sdc1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 57e87e0d-edf2-42dc-ae34-bf8702b3c234 -> ../../sdb1
lrwxrwxrwx 1 root root  15 Jul  1 20:11 8280f0fb-a579-e74e-a44f-51826c8fad1f -> ../../nvme0n1p1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 b8f34012-e08d-4c31-9fbf-1f68b1f3c63e -> ../../sdd1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-01 -> ../../sda1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-02 -> ../../sda2
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-03 -> ../../sda3
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-04 -> ../../sda4

partuuid

total 0
drwxr-xr-x 2 root root 300 Jul  1 20:06 .
drwxr-xr-x 8 root root 160 Jul  1 20:06 ..
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0002846e-01 -> ../../sde1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0002846e-02 -> ../../sde2
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0002846e-03 -> ../../sde3
lrwxrwxrwx 1 root root  10 Jul  1 20:11 0711fdde-b886-48be-9340-d44abded65b5 -> ../../sdd2
lrwxrwxrwx 1 root root  15 Jul  1 20:12 3b000c5e-6d69-e94a-89a9-a4dbd785807d -> ../../nvme0n1p2
lrwxrwxrwx 1 root root  10 Jul  1 20:11 4d5203c3-9d06-4722-89c0-7e241d8f9eec -> ../../sdc1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 57e87e0d-edf2-42dc-ae34-bf8702b3c234 -> ../../sdb1
lrwxrwxrwx 1 root root  15 Jul  1 20:11 8280f0fb-a579-e74e-a44f-51826c8fad1f -> ../../nvme0n1p1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 b8f34012-e08d-4c31-9fbf-1f68b1f3c63e -> ../../sdd1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-01 -> ../../sda1
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-02 -> ../../sda2
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-03 -> ../../sda3
lrwxrwxrwx 1 root root  10 Jul  1 20:11 e33e8b3f-04 -> ../../sda4

I have no idea what went wrong but i suspect that new /EFI/BOOT/BOOTX64.EFI and /EFI/systemd/systemd-bootx64.efi might be a problem.
systemd package where those files were updated was upgraded to version 245.6-8 8 days ago. https://git.archlinux.org/svntogit/pack … &showmsg=1

It's also hard to debug this since i have no logs or errors.

Anybody got idea what is going on or how to get more info?
Thanks!

Offline

#2 2020-07-02 08:14:46

fistrosan
Member
Registered: 2020-04-01
Posts: 172

Re: UEFI boot crashes before it even loads kernel

I think I had a similar problem a few days ago. I broke my UEFI bootloader and was able to solve it by reinstalling the grub bootloader with "grub-install". If you did not try this maybe it is worth a shot. See here: https://bbs.archlinux.org/viewtopic.php?id=256724

There is a second option to remake the bootloader with efibootmng but I did not manage to that one to work (https://wiki.archlinux.org/index.php/Un … efibootmgr)

Offline

#3 2020-07-02 08:55:12

robotux
Member
Registered: 2020-07-01
Posts: 5

Re: UEFI boot crashes before it even loads kernel

I already tried to reinstall bootloader - "bootctl install /boot && bootctl update". This returned my linux entry on the menu but it still behaves the same - restarts PC.
Yes I can mess further with efibootmng but i already tried to start efi directly from UEFI shell so i am not sure if it can even helps.

I will try to downgrade systemd and test it.

Last edited by robotux (2020-07-02 08:56:14)

Offline

#4 2020-07-02 10:47:27

robotux
Member
Registered: 2020-07-01
Posts: 5

Re: UEFI boot crashes before it even loads kernel

ok so systemd downgrade did not help.
What is interesting is that my old installation where i am using grub works fine on same PC.

Also is the ouput from "bootct status" correct? In the section Current Boot Loader

          ESP: n/a
         File: └─/EFI/BOOT/loader.efi

The n/a value for ESP and the path to the loader.efi which is not present in my boot(esp) folder.

I also tried to manually create entry into NVRAM with efibootmgr

efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "manual entry Arch" --loader /vmlinuz-linux --unicode 'cryptdevice=UUID=e9d526b3-4b8f-469e-a1a4-70da9620bb02:root root=/dev/mapper/root rw initrd=\intel-ucode.img initrd=\initramfs-linux.img' --verbose

When i try to select it, screen just blinks(i can see there's sth white there :-) but i can't read it) and PC then restarts. I can't find any option for the entry which would pause/stop on error.
So is it possible that something is wrong with my linux image or initramfs image? Is there a way how to confirm it? I successfully regenerated images with mkinitcpio -P linux command.

Last edited by robotux (2020-07-02 12:47:56)

Offline

#5 2020-07-03 13:40:05

fistrosan
Member
Registered: 2020-04-01
Posts: 172

Re: UEFI boot crashes before it even loads kernel

Sorry I did not realize that you were using systemd bootloader. I have no idea how it works as I always use grub. We need some of the gurus here to help you out.

Offline

#6 2020-07-04 07:01:55

fistrosan
Member
Registered: 2020-04-01
Posts: 172

Re: UEFI boot crashes before it even loads kernel

I have been looking at your efibootmgr command and I have the feeling that there is something wrong with it. According to https://wiki.archlinux.org/index.php/Un … efibootmgr the --loader option has to point to the _x64.efi file and not to the vmlinuz-linux. Can you have a look at the link I put here, try again with the --loader and let me know if it works ? I would like to know because I tried myself a while ago and it did not.

robotux wrote:
efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "manual entry Arch" --loader /vmlinuz-linux --unicode 'cryptdevice=UUID=e9d526b3-4b8f-469e-a1a4-70da9620bb02:root root=/dev/mapper/root rw initrd=\intel-ucode.img initrd=\initramfs-linux.img' --verbose

Offline

#7 2020-07-04 10:38:15

robotux
Member
Registered: 2020-07-01
Posts: 5

Re: UEFI boot crashes before it even loads kernel

Ok I have an update.

I recorded my screen using my phone after i selected "manual entry Arch" entry. Then went frame by frame and got error message.
I did a typo ... s/initramfs.img/initramfs-linux.img/
After i fixed that i was able to load the kernel.

You can definitely boot kernel image directly. Have a look here
https://wiki.archlinux.org/index.php/EF … I_directly

I still have no idea why my bootloader - systemd-boot stopped working sad

Offline

Board footer

Powered by FluxBB