You are not logged in.

#1 2023-02-21 06:59:39

klugja
Member
Registered: 2023-02-20
Posts: 19

[SOLVED]Initramfs cannot find LVM/Raid1

I saw the instructions that said to add the lvm2 hook and raid, and so I set the following in /etc/mkinitcpio.conf:

MODULES=(dm-raid dm_integrity raid0 raid1 raid10 raid456)
HOOKS=(base systemd  udev autodetect modconf kms keyboard keymap consolefont block lvm2 filesystems fsck

I did see this in the mkinitcpio output:

-> Running build hook: [lvm2]

In chroot environment, I see:

/dev/mapper/ArchLinux-root / ext4 rw,relatime 0 0

But on the screen when booting the kernel I see:

[  TIME  ] Timed out waiting for device /dev/mapper/ArchLinux-root.
[DEPEND] Dependency failed for Initrd Root Devices.
[DEPEND] Dependency failed for /sysroot.
[DEPEND] Dependency failed for Initrd Root File System.
   ...
Cannot open access to console, the root account is locked.
  ...

What am I missing?

Last edited by klugja (2023-02-23 13:33:27)

Offline

#2 2023-02-22 01:50:08

jonno2002
Member
Registered: 2016-11-21
Posts: 850

Re: [SOLVED]Initramfs cannot find LVM/Raid1

according to this: https://wiki.archlinux.org/title/Mkinit … mmon_hooks
"systemd" and "udev" hooks are conflicting, remove the systemd one and try again.

Offline

#3 2023-02-23 11:50:55

klugja
Member
Registered: 2023-02-20
Posts: 19

Re: [SOLVED]Initramfs cannot find LVM/Raid1

I switched from grub to systemd-boot, because the Arch grub didn't work, and I want to remove Ubuntu, which is how I was booting.  So now I get a shell and can examine things.

Doing lsmod, I see both raid1, dm_raid, dm_bufio, dm_integrity, dm_mod, md_mod, but there are no /dev/dm- devices, and /dev/mapper is empty.

Does /etc/mdadm.conf need to be copied onto the initramfs somehow?  Or should it just assemble all the drives it knows about?  The drives all appear under /dev/disk, so that part is populated, but without dm devices this can't work.

The boot screen says:

:: running early hook [udev]
Starting systemd-udevd version 253-1-arch
:: running hook [udev]
:: Triggering uevents
:: running hook [keymap]
:: Loading keymap...done.
Waiting 10 seconds for device /dev/mapper/ArchLinux-root
ERROR: device '/dev/mapper/ArchLinux-root'  not found. Skipping fsck.
...

Offline

#4 2023-02-23 12:30:10

jonno2002
Member
Registered: 2016-11-21
Posts: 850

Re: [SOLVED]Initramfs cannot find LVM/Raid1

Offline

#5 2023-02-23 12:42:24

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

Re: [SOLVED]Initramfs cannot find LVM/Raid1

add the mdadm hook if you are using raid

`cat /proc/partitions` to see if block devices were detected at all

you can also use `lvm pvs` (lvm vgs, lvm lvs) to see what lvm detects... with --verbose flags to see what lvm is doing more specifically

Offline

#6 2023-02-23 13:31:52

klugja
Member
Registered: 2023-02-20
Posts: 19

Re: [SOLVED]Initramfs cannot find LVM/Raid1

Thanks.

Got it working.  Not sure if both of these are essential but I added BINARIES, and mdadm_udev to HOOKS:

/etc/mkinitcpio.conf:

BINARIES=(mdmon)
MODULES=(dm-raid dm_integrity raid0 raid1 raid10 raid456)
HOOKS=(base udev mdadm_udev autodetect modconf kms keyboard keymap consolefont block lvm2 filesystems fsck)

Offline

Board footer

Powered by FluxBB