Systemd boot not generating new initramfs when updating kernel

Hello,

I’ve performed a kernel update today (from 6.1.1 to 6.1.8) and after rebooting I noticed my system would not boot anymore. All I got was an emergency shell.
I then noticed that systemd-boot still showed the old kernel version for both the regular boot and fallback.
After arch-chrooting and downgrading to 6.1.1 the system boots fine again, but I am unable to get systemd boot to boot the latest kernel.
Any idea what is going on here?

Thanks for you help :slight_smile:

It sounds like maybe your EFI partition wasn’t properly mounted when you upgraded the kernel.

What does findmnt --real return?

TARGET                   SOURCE                                                FSTYPE      OPTIONS
/                        /dev/mapper/luks-fd466e6a-83f2-4fef-be1f-4b845c0ff35f ext4        rw,noatime
├─/run/media/unlink/77d31a9f-8d6d-48c8-bdbc-418c792e630b
│                        /dev/mapper/luks-33c1dbf1-1283-40ac-966b-24561cc74bc2 ext4        rw,nosuid,nodev,relatime,errors=remount-ro
├─/run/user/1000/doc     portal                                                fuse.portal rw,nosuid,nodev,relatime,user_id=1000,group_id=1000
└─/efi                   /dev/nvme0n1p1                                        vfat        rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-r

Currently it looks like this. I have already attempted reinstalling the update again and I still get the boot issues after.

Can you share the full output when you update the kernel?

Package (1)  Old Version    New Version    Net Change

core/linux   6.1.8.arch1-1  6.1.8.arch1-1    0,00 MiB

Total Installed Size:  164,44 MiB
Net Upgrade Size:        0,00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                            [------------------------------] 100%
(1/1) checking package integrity                          [------------------------------] 100%
(1/1) loading package files                               [------------------------------] 100%
(1/1) checking for file conflicts                         [------------------------------] 100%
:: Processing package changes...
(1/1) reinstalling linux                                  [------------------------------] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Updating module dependencies...
(3/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 6.1.8-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> 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: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 6.1.8-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: ast
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: qla2xxx
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(4/5) Check if user should be informed about rebooting after certain system package upgrades.
==> INFO: Reboot is recommended due to the upgrade of core system package(s).
(5/5) Checking which packages need to be rebuilt

Running lsinitcpio /boot/initramfs-linux.img also shows me that at the very least it generated the image correctly as it contains modules for 6.1.8, however bootctl list only shows the 6.1.1

 bootctl list

         type: Boot Loader Specification Type #1 (.conf)
        title: EndeavourOS (6.1.1-arch1-1) (default) (selected)
           id: 8a0afa9f1fc440fca5f68e58f3c212e5-6.1.1-arch1-1.conf
       source: /efi/loader/entries/8a0afa9f1fc440fca5f68e58f3c212e5-6.1.1-arch1-1.conf
     sort-key: endeavouros-6.1.1-arch1-1
      version: 6.1.1-arch1-1
   machine-id: 8a0afa9f1fc440fca5f68e58f3c212e5
        linux: /8a0afa9f1fc440fca5f68e58f3c212e5/6.1.1-arch1-1/linux
       initrd: /8a0afa9f1fc440fca5f68e58f3c212e5/6.1.1-arch1-1/initrd
      options: nvme_load=YES rw rd.luks.uuid=fd466e6a-83f2-4fef-be1f-4b845c0ff35f root=/dev/ma>

         type: Boot Loader Specification Type #1 (.conf)
        title: EndeavourOS (6.1.1-arch1-1-fallback)
           id: 8a0afa9f1fc440fca5f68e58f3c212e5-6.1.1-arch1-1-fallback.conf
       source: /efi/loader/entries/8a0afa9f1fc440fca5f68e58f3c212e5-6.1.1-arch1-1-fallback.conf
     sort-key: endeavouros-6.1.1-arch1-1-fallback
      version: 6.1.1-arch1-1-fallback
   machine-id: 8a0afa9f1fc440fca5f68e58f3c212e5
        linux: /8a0afa9f1fc440fca5f68e58f3c212e5/6.1.1-arch1-1/linux
       initrd: /8a0afa9f1fc440fca5f68e58f3c212e5/6.1.1-arch1-1/initrd-fallback
      options: nvme_load=YES rw rd.luks.uuid=fd466e6a-83f2-4fef-be1f-4b845c0ff35f root=/dev/ma>

         type: Automatic
        title: Reboot Into Firmware Interface
           id: auto-reboot-to-firmware-setup
       source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4

Update: I figured it out, turn out it was a classic case of me somehow managing to nuke the kernel-install package without noticing.
After reinstalling it and trying again everything worked fine.

Thanks for your help :slight_smile:

Yeah, I was asleep when you posted your output above but it is pretty clear that you installed eos-dracut at some point.

Installing that package will remove kernel-install-for-dracut which is probably what caused your issue.

I ran into this same issue. I had to uninstall mkinitcpio-archiso in order to install kernel-install-for-dracut because of package conflicts.
After that I ran yay again, got the kernel update and rebooted without issue.

1 Like

Yes, in the most recent ISO, we made it harder to uninstall these packages by mistake to avoid this situation in the future.