You are not logged in.

#1 2023-11-13 14:34:09

Stoffe Pro
Member
Registered: 2023-11-13
Posts: 4

[SOLVED] kernel-install not copying kernel to /efi

Hello.

I think this issue has probably been present since I installed the system some time last summer, but finally bit me in my unmentionables after a system upgrade last night. For the record, the previous full system upgrade was probably a couple of weeks ago.

I've been using linux for many years, but I'm fairly new to both Arch, unified kernel images and booting using anything other than GRUB, so I'm struggling with seeing how to progress.

As far as I can tell, my issue is that kernel-install doesn't actually copy the generated kernel to /efi, even if the build apparantly works as it should.

I don't know what specific questions I should ask, so I'll attach a dump of a poking-around-session. Hoping for some pointers on how to proceed. I will of course answer all questions and provide any relevant log or piece of config.

A couple of points:

- The 6.4.3 kernels from july are probably from when I installed the system
- The 6.6.1 kernel in the weird path is from a shot in the dark last night when I ran kernel-install with --make-entry-directory=yes
- To the best of my knowledge, the system was configured as per the official install guide and https://wiki.archlinux.org/title/Unified_kernel_image
- The dump below is captured using script and semi-manually cleaned up, so please forgive me if I've missed any control characters.

[root@archiso tmp]# cd /
[root@archiso /]# find -name vmlinuz -exec '{}' \;
./usr/lib/modules/6.6.1-arch1-1/vmlinuz: Linux kernel x86 boot executable bzImage, version 6.6.1-arch1-1 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Wed, 08 Nov 2023 16:05:38 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
[root@archiso /]# ls /usr/lib/modules
6.6.1-arch1-1
[root@archiso /]# find -name vmlinuz-linux -exec '{}' \;
./boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 6.4.3-arch1-1 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Tue, 11 Jul 2023 05:13:39 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
./efi/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 6.4.3-arch1-1 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Tue, 11 Jul 2023 05:13:39 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
[root@archiso /]# cat /etc/mkinitcpio.d/linux.preset
#mkinitcpio preset file for the 'linux' package

#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/efi/vmlinuz-linux"
[[ -e /boot/amd-ucode.img ]] && cp -af /boot/amd-ucode.img /efi/

ALL_microcode=(/efi/*-ucode.img)

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
#default_image="/boot/initramfs-linux.img"
default_uki="/efi/EFI/Linux/arch-linux.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"

#fallback_config="/etc/mkinitcpio.conf"
#fallback_image="/boot/initramfs-linux-fallback.img"
fallback_uki="/efi/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"
[root@archiso /]# cat /etc/mkinitcpio.conf
#vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.	Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.	This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
#HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"
[root@archiso /]# cat /etc/kernel/install.conf
layout=uki
[root@archiso /]# kernel-install remove 6.6.1-arch1-1
[root@archiso /]# kernel-install add 6.6.1-arch1-1 /usr/lib/modules/6.6.1-arch1-1/vmlinuz
Starting build: '6.6.1-arch1-1'
  Running build hook: [base]
  Running build hook: [systemd]
  Running build hook: [autodetect]
  Running build hook: [modconf]
  Running build hook: [kms]
  Running build hook: [keyboard]
  WARNING: Possibly missing firmware for module: 'xhci_pci'
  Running build hook: [sd-vconsole]
  Running build hook: [block]
  Running build hook: [sd-encrypt]
  Running build hook: [lvm2]
  Running build hook: [filesystems]
  Running build hook: [fsck]
Generating module dependencies
  Creating zstd-compressed initcpio image: '/tmp/mkinitcpio.WYAiga'
  Image generation successful
  Creating unified kernel image: '/tmp/kernel-install.staging.P8hS4H/uki.efi'
  Using UEFI stub: '/usr/lib/systemd/boot/efi/linuxx64.efi.stub'
  Using os-release file: '/etc/os-release'
  Using cmdline file: '/etc/cmdline.d/root.conf'
  Using microcode image: '/efi/amd-ucode.img'
  Using microcode image: '/boot/amd-ucode.img'
  Unified kernel image generation successful
[root@archiso /]# find / -name vmlinuz-linux -exec -file '{}' \;
./boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 6.4.3-arch1-1 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Tue, 11 Jul 2023 05:13:39 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
./efi/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 6.4.3-arch1-1 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Tue, 11 Jul 2023 05:13:39 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
[root@archiso /]# ls -la /tmp/
totall8
drwxrwxrwt  2 root root	  60 Nov 13 14:09 .
drwxr-xr-x 19 root root 4096 Oct 13 12:49 ..
-rw-r--r--  1 root root 4096 Nov 13 14:07 typescript
[root@archiso /]# ls -la /efi/EFI/Linux/
totall210728
drwxr-xr-x 2 root root	   4096 Oct 17 23:40 .
drwxr-xr-x 5 root root	   4096 Jul 15 22:58 ..
-rwxr-xr-x 1 root root 61728256 Oct 17 23:40 6077e50973c24a5b8107bfbd7659090e-6.5.7-arch1-1.efi
-rwxr-xr-x 1 root root 93745664 Jul 11 14:01 arch-linux-fallback.efi
-rwxr-xr-x 1 root root 60293632 Jul 11 14:01 arch-linux.efi
[root@archiso /]# find efi/ -ls
      	1      4 drwxr-xr-x   6 root	 root	      4096 Jan	1  1970 efi/
       12      4 drwxr-xr-x   5 root	 root	      4096 Jul 15 22:58 efi/EFI
       16      4 drwxr-xr-x   2 root	 root	      4096 Oct 17 23:40 efi/EFI/Linux
       77  58884 -rwxr-xr-x   1 root	 root	  60293632 Jul 11 14:01 efi/EFI/Linux/arch-linux.efi
       78  91552 -rwxr-xr-x   1 root	 root	  93745664 Jul 11 14:01 efi/EFI/Linux/arch-linux-fallback.efi
       79  60284 -rwxr-xr-x   1 root	 root	  61728256 Oct 17 23:40 efi/EFI/Linux/6077e50973c24a5b8107bfbd7659090e-6.5.7-arch1-1.efi
       20      4 drwxr-xr-x   2 root	 root	      4096 Nov 12 13:29 efi/EFI/systemd
       86     92 -rwxr-xr-x   1 root	 root	     93184 Nov	9 20:56 efi/EFI/systemd/systemd-bootx64.efi
       22      4 drwxr-xr-x   2 root	 root	      4096 Nov 12 13:29 efi/EFI/BOOT
       88     92 -rwxr-xr-x   1 root	 root	     93184 Nov	9 20:56 efi/EFI/BOOT/BOOTX64.EFI
       61  12364 -rwxr-xr-x   1 root	 root	  12658688 Jul 15 22:13 efi/vmlinuz-linux
       65     80 -rwxr-xr-x   1 root	 root	     81920 Nov	1 06:27 efi/amd-ucode.img
       24      4 drwxr-xr-x   3 root	 root	      4096 Nov 12 14:47 efi/loader
       29      4 drwxr-xr-x   2 root	 root	      4096 Jul 15 22:58 efi/loader/entries
       92      4 -rwxr-xr-x   1 root	 root		30 Jul 15 22:58 efi/loader/loader.conf
       93      4 -rwxr-xr-x   1 root	 root		32 Nov 12 14:47 efi/loader/random-seed
       94      4 -rwxr-xr-x   1 root	 root		 6 Jul 15 22:58 efi/loader/entries.srel
       30      4 drwxr-xr-x   2 root	 root	      4096 Jul 16 18:32 efi/System\ Volume\ Information
       31      4 drwxr-xr-x   3 root	 root	      4096 Nov 12 15:23 efi/6077e50973c24a5b8107bfbd7659090e
       33      4 drwxr-xr-x   2 root	 root	      4096 Nov 12 15:23 efi/6077e50973c24a5b8107bfbd7659090e/6.6.1-arch1-1
[root@archiso /]# find boot/ -ls
  2883585      4 drwxr-xr-x   2 root	 root	      4096 Nov 12 15:05 boot/
  2883586     80 -rw-r--r--   1 root	 root	     81920 Nov	1 06:27 boot/amd-ucode.img
  2883587  12364 -rw-r--r--   1 root	 root	  12658688 Jul 15 21:30 boot/vmlinuz-linux
  2883588  35992 -rw-------   1 root	 root	  36854028 Jul 15 21:30 boot/initramfs-linux.img
  2883589  70912 -rw-------   1 root	 root	  72610522 Jul 15 21:30 boot/initramfs-linux-fallback.img
[root@archiso /]# date
Mon Nov 13 14:10:01 CET 2023

Please help me, you are my only hope!

Last edited by Stoffe Pro (2023-11-13 16:11:02)

Offline

#2 2023-11-13 15:20:32

cmm11
Member
Registered: 2018-02-18
Posts: 44

Re: [SOLVED] kernel-install not copying kernel to /efi

Noob guess but this very recent change to the systemd package might be related - https://gitlab.archlinux.org/archlinux/ … a13c5e1e43

Last edited by cmm11 (2023-11-13 15:20:47)


$20 Free Credit Hetzner - https://hetzner.cloud/?ref=fuVilhv403fA

Offline

#3 2023-11-13 15:40:58

Stoffe Pro
Member
Registered: 2023-11-13
Posts: 4

Re: [SOLVED] kernel-install not copying kernel to /efi

cmm11 wrote:

Noob guess but this very recent change to the systemd package might be related - https://gitlab.archlinux.org/archlinux/ … a13c5e1e43

Suspicious timing indeed. That change is too recent to be the cause, but I'm going to cling to the hope that it's the fix. I'll get to work and report back. Thanks!

Offline

#4 2023-11-13 16:10:20

Stoffe Pro
Member
Registered: 2023-11-13
Posts: 4

Re: [SOLVED] kernel-install not copying kernel to /efi

cmm11 wrote:

Noob guess but this very recent change to the systemd package might be related - https://gitlab.archlinux.org/archlinux/ … a13c5e1e43

You were right! pacman -Syu just now upgraded systemd to 254.6-2, which dropped just an hour ago, and made everything come alive again.

Thanks, mate! I owe you one!

Offline

Board footer

Powered by FluxBB