You are not logged in.

#1 2022-12-14 11:13:19

aario
Member
Registered: 2022-12-14
Posts: 3

[SOLVED] Lluks lvm systemd: Timed out waiting for device /dev/mapper

Hi Folks,
I cannot boot fresh arch installed via chroot. The error is:

[TIME] Timed out waiting for device /dev/mapper/vg-root2

My HOOKS value in mkinitcpio.conf is:

HOOKS=(base udev encrypt systemd autodetect modconf kms keyboard keymap consolefont block lvm2 sd-encrypt sd-vconsole sd-lvm2 filesystems resume fsck)

These packages are among the installed:

core/cryptsetup 2.6.0-1 [installed]
core/lvm2 2.03.17-1 [installed]
core/linux 6.0.12.arch1-1 [installed]
core/systemd 252.3-1 [installed: 252.2-1]

Menu entry for arch in grub.cfg:

menuentry 'Arch Linux (on /dev/mapper/vg-root2)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-3a83365b-15ae-4b69-9b69-fe64c3e364e5' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        search --no-floppy --fs-uuid --set=root 4022bfdc-8456-4528-ab67-bc50df9b7d36
        echo    'Loading Linux ...'
        linux   /arch/vmlinuz-linux root=/dev/mapper/vg-root2 ro  quiet amd_iommu=off iommu=pt resume=UUID=0fad4cd9-b977-46d9-b20f-6763d8a1ee2b
        echo    'Loading initial ramdisk ...'
        initrd  /arch/initramfs-linux.img
}

I have also tried this line for linux in menuentry:

        linux   /arch/vmlinuz-linux root=/dev/mapper/vg-root2 ro cryptdevice=/dev/dm-2:vg-root2 quiet amd_iommu=off iommu=pt resume=UUID=0fad4cd9-b977-46d9-b20f-6763d8a1ee2b

And this:

        linux   /arch/vmlinuz-linux root=/dev/mapper/vg-root2 ro cryptdevice=/dev/vg/root2:vg-root2 quiet amd_iommu=off iommu=pt resume=UUID=0fad4cd9-b977-46d9-b20f-6763d8a1ee2b

And this:

        linux   /arch/vmlinuz-linux cryptdevice=/dev/dm-2:vg-root2 root=/dev/mapper/vg-root2 ro quiet amd_iommu=off iommu=pt resume=UUID=0fad4cd9-b977-46d9-b20f-6763d8a1ee2b

Along with this HOOKS:

HOOKS=(base udev systemd modconf block keyboard sd-vconsole autodetect sd-encrypt sd-lvm2 filesystems fsck shutdown)

None worked!
uuid of boot partition:

4022bfdc-8456-4528-ab67-bc50df9b7d36

Any ideas? Thanks  in advance.

Last edited by aario (2022-12-14 12:49:27)

Offline

#2 2022-12-14 12:48:49

aario
Member
Registered: 2022-12-14
Posts: 3

Re: [SOLVED] Lluks lvm systemd: Timed out waiting for device /dev/mapper

This line in grub.cfg:

        linux   /arch/vmlinuz-linux root=/dev/mapper/vg-root2 cryptdevice=/dev/nvme0n1p3:base ro amd_iommu=off iommu=pt resume=UUID=0fad4cd9-b977-46d9-b20f-6763d8a1ee2b

Which contains:

cryptdevice=/dev/nvme0n1p3:vg

Which is the physical partition for the luks and not the logical volume inside lvm (notice that lots of tutorials out there are assuming first an LVM and then inside it a luks partition. While in my case, there was a luks partition and then inside it an lvm) and then this line inside mkinitcpio.conf:

HOOKS=(base udev modconf kms keyboard autodetect keymap consolefont block encrypt lvm2 filesystems resume fsck)

Which does not contain systemd related hooks and also has autodetect after keyboard, fixed my problem.

Offline

#3 2022-12-14 12:51:36

saf1
Member
Registered: 2011-04-04
Posts: 17

Re: [SOLVED] Lluks lvm systemd: Timed out waiting for device /dev/mapper

it doesn't make sense to use both encrypt and sd-encrypt in the HOOKS
follow the wiki is very clear about that https://wiki.archlinux.org/title/Encryp … initcpio_2

Offline

#4 2022-12-14 13:10:11

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: [SOLVED] Lluks lvm systemd: Timed out waiting for device /dev/mapper

with the systemd hook, the non-systemd hooks will simply not run at all

also sd-encrypt needs different kernel parameter than the encrypt one

basically systemd vs. non-systemd initramfs are two very different things

Offline

#5 2022-12-17 04:15:04

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] Lluks lvm systemd: Timed out waiting for device /dev/mapper

aario wrote:

notice that lots of tutorials out there are assuming first an LVM and then inside it a luks partition. While in my case, there was a luks partition and then inside it an lvm

Another reason to use the wiki rather than unidentified 'tutorials'. The wiki covers both lvm-on-luks and luks-on-lvm. Why would you rely on a tutorial which doesn't even fit your case?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB