You are not logged in.

#1 2024-06-03 20:05:46

sshaikh
Member
Registered: 2019-07-03
Posts: 64

[SOLVED] Cannot boot linux-lts via EFISTUB and LVM

I have an up to date system that boots fine using EFISTUB. The EFI entry is:

Boot0001* Arch Linux	HD(1,GPT,blah-blah,0x800,0x100000)/\vmlinuz-linuxinitrd=\initramfs-linux.img rw root=/dev/mapper/vg--default-lv--default

I am trying to use linux-lts, installed via pacman:

❯ sudo pacman -Syu linux-lts linux-lts-headers

This ran mkinitcpio as expected and initramfs-linux-lts.img appears to have been generated (I have since run mkinitcpio many times since). The EFI entry is the same as above, but with the different image:

Boot0006* Arch Linux LTS    HD(1,GPT,blah-blah,0x800,0x100000)/\vmlinuz-linuxinitrd=\initramfs-linux-lts.img rw root=/dev/mapper/vg--default-lv--default

However this doesn't seem to boot. Unfortunately it's a little difficult to capture the output so I've transcribed it:

:: running early hook [udev]
Warning: /lib/modules/6.9.3-arch1-1/modules.devname not found - ignoring
Starting systemd-udevd version 255.7-1-arch
:: running hook [udev]
:: Triggering uevents...
Waiting 10 seconds for device /dev/mapper/vg--default-lv--default ...
Waiting 10 seconds for device /dev/mapper/vg--default-lv--default ...
ERROR: device '/dev/mapper/vg--default-lv--default' not found. Skipping fsck.
:: mounting '/dev/mapper/vg--default-lv--default' on real root
mount: /new_root: fsconfig system call failed: /dev/mapper/vg--default-lv--default: Can't lookup blockdev.
...

And then I get an emergency shell. I can still boot back to the 6.9.3 kernel via the efi boot manager so this isn't critical, but I would like to get the LTS kernel working.

I can see that loading the LTS kernel seems to be doing something with the latest kernel, but I don't understand what or how to fix it. The only uncommented line in my mkinitcpio.conf is:

HOOKS=(base udev autodetect modconf block lvm2 filesystems keyboard fsck)

Any help appreciated!

Last edited by sshaikh (2024-06-04 16:56:17)

Offline

#2 2024-06-04 05:58:04

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 776

Re: [SOLVED] Cannot boot linux-lts via EFISTUB and LVM

Unfortunately it's a little difficult to capture the output so I've transcribed it:

either use scroll lock (think that works) or make a video/image.

Can you print your preset file?

The errors are because the kernel can't load the modules. And this is because it's trying to load the modules of 6.9.3 kernel. You might want to try adding the relevant kernel modules into the MODULES array in mkinitcpio.conf. This would mount it, but won't fix the root problem.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#3 2024-06-04 09:37:38

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 692

Re: [SOLVED] Cannot boot linux-lts via EFISTUB and LVM

sshaikh wrote:
Boot0006* Arch Linux LTS    HD(1,GPT,blah-blah,0x800,0x100000)/\vmlinuz-linuxinitrd=\initramfs-linux-lts.img rw root=/dev/mapper/vg--default-lv--default

You specified the wrong kernel in efibootmgr's --loader option.

Offline

#4 2024-06-04 16:56:03

sshaikh
Member
Registered: 2019-07-03
Posts: 64

Re: [SOLVED] Cannot boot linux-lts via EFISTUB and LVM

Amazing spot @nl6720. This works:

Boot0003* Arch Linux LTS	HD(1,GPT,blah-blah,0x800,0x100000)/\vmlinuz-linux-ltsinitrd=\initramfs-linux-lts.img rw root=/dev/mapper/vg--default-lv--default

@jl2 - for my information what is the preset file?

Offline

#5 2024-06-04 17:47:52

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 776

Re: [SOLVED] Cannot boot linux-lts via EFISTUB and LVM

@jl2 - for my information what is the preset file?

the files that match /etc/mkinitcpio.d/*.preset
They are used to specify how the specific images are created (mainly input/output file, that's why I asked)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#6 2024-06-04 18:12:17

sshaikh
Member
Registered: 2019-07-03
Posts: 64

Re: [SOLVED] Cannot boot linux-lts via EFISTUB and LVM

Ah yes, I did check that. Here is it for reference (although obviously not closely enough given the answer was there too):

# mkinitcpio preset file for the 'linux-lts' package

#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux-lts"

PRESETS=('default' 'fallback')

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

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-lts-fallback.img"
#fallback_uki="/efi/EFI/Linux/arch-linux-lts-fallback.efi"
fallback_options="-S autodetect"

Last edited by sshaikh (2024-06-04 18:12:53)

Offline

Board footer

Powered by FluxBB