You are not logged in.

#1 2019-06-02 15:56:52

konaya
Member
Registered: 2017-11-13
Posts: 6

dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

I got a shiny new SSD for my laptop! Good times. Trying to install Arch has proven troublesome, though.

I am more or less following this and this, with the exception that I mount the EFI partition as /boot. It worked on my work computer, so it should work now, right?

The error I get on boot is the following:

[    0.000000] [Firmware Bugl: TSC_DEADLINE disabled due to Errata; please updat
e microcode to version: 0x20 (or later)
[    0.030033] mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 6: ae00000000
40110a
[    0.030039] mce: [Hardware Error]: TSC 0 ADDR ffb05880 MISC b8a0000086
[    0.030044] mce: [Hardware Error]: PROCESSOR 0:40651 TIME 1559488188 SOCKET 0
 APIC 0 microcode 16
[    0.426490] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.426579] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.1.5-archl-2-ARCH #1
[    0.426645] Hardware name: LENOVO 20266/Yoga2, BIOS 76CN31WW 10/31/2013
[    0.426708] Call Trace:
[    0.426749] dump_stack+0x5c/0x80
[    0.426789] panic+0x101/0x2a7
[    0.426831] mount_block_root+0x2c2/0x2e6
[    0.426892] prepare_namespace+0x130/0x166
[    0.426937] ? rest_init+0xbf/0xbf
[    0.426975] kernel_init+0xa/0x101
[    0.427015] ret_from_fork+0x35/0x40
[    0.427075] Kernel Offset: 0x18800000 from 0xffffffff81000000 (relocation range: Oxfffffffi80000000-0xffffffffbfffffff)
[    0.427179] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknoun-block(0,0) ]---

I have tried the following boot parameters (the intel-ucode image is present and accounted for):

efibootmgr /dev/sda --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'cryptdevice=UUID=86ba9193-d025-4304-8fea-ccd92ce67631:cryptroot root=/dev/mapper/cryptroot rw initrd=\intel-ucode.img initrd=\initramfs-linux.img' --verbose
efibootmgr /dev/sda --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'cryptdevice=UUID=86ba9193-d025-4304-8fea-ccd92ce67631:cryptroot root=UUID=9d8c58fa-c94f-4021-8829-317f5733789a rw initrd=\intel-ucode.img initrd=\initramfs-linux.img' --verbose
efibootmgr /dev/sda --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'cryptdevice=PARTUUID=7d70eb82-2e61-48aa-b90d-c1fcefd4be00:cryptroot root=UUID=9d8c58fa-c94f-4021-8829-317f5733789a rw initrd=\intel-ucode.img initrd=\initramfs-linux.img' --verbose

My blkid:

/dev/sda1: UUID="ED7E-7830" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="bb0fcd75-0036-4071-8d6b-c08695fcaa91"
/dev/sda2: UUID="86ba9193-d025-4304-8fea-ccd92ce67631" TYPE="crypto_LUKS" PARTLABEL="Linux filesystem" PARTUUID="7d70eb82-2e61-48aa-b90d-c1fcefd4be00"
/dev/sdb1: UUID="2019-05-02-15-52-35-00" LABEL="ARCH_201905" TYPE="iso9660" PTUUID="122aa3b3" PTTYPE="dos" PARTUUID="122aa3b3-01"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="ARCHISO_EFI" LABEL="ARCHISO_EFI" UUID="21C8-EA6A" TYPE="vfat" PARTUUID="122aa3b3-02"
/dev/loop0: TYPE="squashfs"
/dev/mapper/cryptroot: UUID="9d8c58fa-c94f-4021-8829-317f5733789a" TYPE="ext4"

The relevant line of my mkinitcpio.conf:

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

… and my initramfs is built with these hooks in effect:

==> 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: 5.1.5-arch1-2-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [lvm2]
  -> Running build hook: [encrypt]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful

I'm at a bit of a loss on how to proceed. The fact that I managed to do more or less the exact same setup on another Lenovo laptop six months ago leaves me particularly stumped. Does anyone have any idea what's wrong?

Offline

#2 2019-06-02 16:50:50

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,992
Website

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

Do you really use LUKS on an LVM Volume or LVM on a LUKS container? If the latter is the case, you need to adjust your hook order.


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#3 2019-06-02 17:10:16

konaya
Member
Registered: 2017-11-13
Posts: 6

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

I'm not actually using LVM at all – I added it in pure desperation after every sane thing I could come up with failed to work. /dev/mapper/cryptroot is formatted as ext4 and mounted as /.

Offline

#4 2019-06-05 07:53:28

konaya
Member
Registered: 2017-11-13
Posts: 6

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

Well, I didn't have the time to troubleshoot it any further, so I went with systemd-boot and it worked. Same initramfs, same boot parameters, same everything, just with systemd-boot.

Offline

#5 2019-06-05 08:07:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2019-06-05 08:14:56

konaya
Member
Registered: 2017-11-13
Posts: 6

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

jasonwryan wrote:

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

It's not, though. The problem remains: dm-crypt + LUKS + EFISTUB doesn't work. Changing to another bootloader is a workaround, not a solution.

The worst thing in the world when googling a solution to a problem is the elation of finding a thread marked [SOLVED] followed by the sourness of not finding a solution to the problem as described.

Offline

#7 2019-06-05 08:20:28

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

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

From your first post, it seems like the initrd is not loaded at all. (microcode is not updated and initramfs does not appear)

Perhaps the path is not correct after all?

Offline

#8 2019-06-05 08:34:44

konaya
Member
Registered: 2017-11-13
Posts: 6

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

Yeah, that was my initial gut feeling as well, but then the same paths worked using another boot loader.

Offline

#9 2019-06-05 09:17:46

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

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

Are you sure it was the same path?

Other bootloaders might look relative to /boot directory, efi is relative to esp

Above you were creating /boot/initramfs-linux.img so that would only work if /boot actually was your esp - which is possible, but not necessarily the case

Last edited by frostschutz (2019-06-05 09:19:47)

Offline

#10 2019-06-05 09:19:23

konaya
Member
Registered: 2017-11-13
Posts: 6

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

As mentioned (somewhat unclearly, sorry about that) in the thread start, they're one and the same on my system.

Last edited by konaya (2019-06-05 09:20:18)

Offline

#11 2019-06-05 09:20:30

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

Re: dm-crypt + LUKS + EFISTUB – initrd can't find the root partition

then it's a mystery, sorry

Offline

Board footer

Powered by FluxBB