You are not logged in.

#1 2025-04-26 01:13:07

Mrkd1904
Member
Registered: 2023-11-08
Posts: 68

New install - issues with boot cmdlines (i'm assuming)

Hello,

I recently rebuilt a RAID array with news disks on my PC. I'm having issues now with booting into this new system.

Here's the output of

lsblk
root@archiso ~ # lsblk
NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0                   7:0    0 824.9M  1 loop  /run/archiso/airootfs
sda                     8:0    1  57.3G  0 disk
├─sda1                  8:1    1   999M  0 part
└─sda2                  8:2    1   180M  0 part
nvme3n1               259:0    0   1.8T  0 disk
├─md126                 9:126  0   3.6T  0 raid5
│ └─mdroot            254:0    0   3.6T  0 crypt
│   ├─mdroot1         254:1    0     1T  0 part
│   │ └─vgroot        254:3    0  1024G  0 crypt
│   │   ├─linux0-root 254:4    0   124G  0 lvm   /var/local/mount/00
│   │   ├─linux0-home 254:5    0   256G  0 lvm   /var/local/mount/00/home
│   │   ├─linux0-var  254:6    0    64G  0 lvm   /var/local/mount/00/var
│   │   ├─linux0-opt  254:7    0    64G  0 lvm   /var/local/mount/00/opt
│   │   └─linux0-srv  254:8    0   512M  0 lvm   /var/local/mount/00/srv
│   └─mdroot2         254:2    0     1T  0 part
└─md127                 9:127  0     0B  0 md
nvme1n1               259:1    0   1.8T  0 disk
├─md126                 9:126  0   3.6T  0 raid5
│ └─mdroot            254:0    0   3.6T  0 crypt
│   ├─mdroot1         254:1    0     1T  0 part
│   │ └─vgroot        254:3    0  1024G  0 crypt
│   │   ├─linux0-root 254:4    0   124G  0 lvm   /var/local/mount/00
│   │   ├─linux0-home 254:5    0   256G  0 lvm   /var/local/mount/00/home
│   │   ├─linux0-var  254:6    0    64G  0 lvm   /var/local/mount/00/var
│   │   ├─linux0-opt  254:7    0    64G  0 lvm   /var/local/mount/00/opt
│   │   └─linux0-srv  254:8    0   512M  0 lvm   /var/local/mount/00/srv
│   └─mdroot2         254:2    0     1T  0 part
└─md127                 9:127  0     0B  0 md
nvme4n1               259:2    0   1.8T  0 disk
├─nvme4n1p1           259:4    0    16M  0 part
├─nvme4n1p2           259:5    0 495.8G  0 part
├─nvme4n1p3           259:6    0     1G  0 part
├─nvme4n1p4           259:7    0   100M  0 part
├─nvme4n1p5           259:8    0 496.1G  0 part
└─nvme4n1p6           259:9    0   822M  0 part
nvme2n1               259:3    0   1.8T  0 disk
├─md126                 9:126  0   3.6T  0 raid5
│ └─mdroot            254:0    0   3.6T  0 crypt
│   ├─mdroot1         254:1    0     1T  0 part
│   │ └─vgroot        254:3    0  1024G  0 crypt
│   │   ├─linux0-root 254:4    0   124G  0 lvm   /var/local/mount/00
│   │   ├─linux0-home 254:5    0   256G  0 lvm   /var/local/mount/00/home
│   │   ├─linux0-var  254:6    0    64G  0 lvm   /var/local/mount/00/var
│   │   ├─linux0-opt  254:7    0    64G  0 lvm   /var/local/mount/00/opt
│   │   └─linux0-srv  254:8    0   512M  0 lvm   /var/local/mount/00/srv
│   └─mdroot2         254:2    0     1T  0 part
└─md127                 9:127  0     0B  0 md
nvme0n1               259:10   0 931.5G  0 disk
├─nvme0n1p1           259:11   0     1G  0 part  /var/local/mount/00/boot/efi
└─nvme0n1p2           259:12   0 930.5G  0 part

The issue is that I'm having to manually run

partprobe

to get /dev/mapper/mdroot{1,2} to populate. At boot, it'll prompt to open /dev/mapper/mdroot but then hang on finding /dev/mapper/mdroot1 and /dev/mapper/linux0-root and then tell me the root account is locked therefor not getting me to the rescue screen.

Here's the output of /etc/kernel/cmdline:

nvme_load=yes rd.luks.uuid=luks-c3fe5524-cd73-4fa4-8d83-0b37a217cb9b rd.luks.uuid=luks-5954dac1-0544-4f9f-ad76-9a4c07d71727 rd.lvm.lv=linux0/root rd.md.uuid=74061e02:80b9df06:af6faf0c:1118aa96 luks.rd.option=fido2-device=auto root=/dev/mapper/linux0-root rootfstype=f2fs lockdown=integrity module.sig_enfore

Here's my /etc/mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=(vmd dm_mod dm_crypt md_mod f2fs xfs vfat)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=(mdadm lvm partprobe)

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=(/etc/mdadm.conf)

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base systemd udev autodetect microcode modconf kms keyboard keymap sd-vconsole sd-encrypt mdadm_udev lvm2 consolefont block filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

Here's the output of crypttab:

GNU nano 8.4                                             crypttab                                             Restricted
# Configuration for encrypted block devices.
# See crypttab(5) for details.

# NOTE: Do not list your root (/) partition here, it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf).

# <name>       <device>                                     <password>              <options>
# home         UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37    /etc/mypassword1
# data1        /dev/sda3                                    /etc/mypassword2
# data2        /dev/sda5                                    /etc/cryptfs.key
# swap         /dev/sdx4                                    /dev/urandom            swap,cipher=aes-cbc-essiv:sha256,size=2>
# vol          /dev/sdb7                                    none

mdroot UUID=2651b5d8-f3bc-437a-a192-30018dcb3c9c
mdroot1 UUID=5954dac1-0544-4f9f-ad76-9a4c07d71727
vgroot UUID=nVAeln-cHPe-7K2A-NRo9-Gihp-O2uR-rUtyHl

output of blkid:

root@archiso ~ # blkid
/dev/mapper/mdroot1: UUID="5954dac1-0544-4f9f-ad76-9a4c07d71727" TYPE="crypto_LUKS" PARTLABEL="Linux filesystem" PARTUUID="921aa5a6-7f32-4e3a-8233-8f761bab1bfe"
/dev/nvme0n1p1: UUID="C9F4-EE24" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI" PARTUUID="ccebed9c-5aef-4161-87a5-a2f0ce7e42ff"
/dev/nvme0n1p2: UUID="e597408e-6437-40ee-9274-a82956a50424" TYPE="crypto_LUKS" PARTLABEL="endeavouros" PARTUUID="ab2720f0-ba6b-478d-a36e-1369250fecfa"
/dev/nvme3n1: TYPE="isw_raid_member"
/dev/mapper/linux0-srv: UUID="4134c8d9-6fff-4fb5-90c6-0369a45a8dae" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/linux0-var: UUID="ee488e2d-ae44-47f3-8e1f-3fdf55ef1703" BLOCK_SIZE="512" TYPE="xfs"
/dev/mapper/linux0-root: UUID="2bfb62c3-bfbd-45fc-8024-ebb090b88d7f" BLOCK_SIZE="4096" TYPE="f2fs"
/dev/nvme2n1: TYPE="isw_raid_member"
/dev/mapper/mdroot2: PARTLABEL="Linux filesystem" PARTUUID="8d534fc6-5bcc-4c7a-a899-ce7559c33fa1"
/dev/loop0: BLOCK_SIZE="1048576" TYPE="squashfs"
/dev/mapper/mdroot: PTUUID="2651b5d8-f3bc-437a-a192-30018dcb3c9c" PTTYPE="gpt"
/dev/md126: UUID="c3fe5524-cd73-4fa4-8d83-0b37a217cb9b" TYPE="crypto_LUKS"
/dev/mapper/linux0-opt: UUID="d4d70520-58a9-421f-b102-9e0129b2f762" BLOCK_SIZE="4096" TYPE="ext4"
/dev/nvme1n1: TYPE="isw_raid_member"
/dev/sda2: LABEL_FATBOOT="ARCHISO_EFI" LABEL="ARCHISO_EFI" UUID="679D-DB59" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="5f3bc01a-02"
/dev/sda1: BLOCK_SIZE="2048" UUID="2025-02-01-08-29-13-00" LABEL="ARCH_202502" TYPE="iso9660" PARTUUID="5f3bc01a-01"
/dev/mapper/linux0-home: UUID="3d5a6643-0e38-4394-8657-e85af31b0af7" UUID_SUB="e44fb6d3-0ee7-4324-9a1c-c61b5d84f478" BLOCK_SIZE="4096" TYPE="btrfs"
/dev/nvme4n1p5: BLOCK_SIZE="512" UUID="C612BA6612BA5ADF" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="b3cd2dcf-3fd6-4ab6-9733-5737f8d636cc"
/dev/nvme4n1p3: UUID="C4AB-B63E" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Microsoft basic data" PARTUUID="130e4512-8879-43d8-971e-dca67dc7eba1"
/dev/nvme4n1p1: PARTLABEL="Microsoft reserved partition" PARTUUID="f672395e-7418-44ab-aa1f-bb2c49c9c94b"
/dev/nvme4n1p6: BLOCK_SIZE="512" UUID="4288C23A88C22C6B" TYPE="ntfs" PARTUUID="0d7d1a81-605d-4624-81da-82176acb5a6c"
/dev/nvme4n1p4: UUID="AEB9-10A8" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="bb5a34f0-1e3a-40c2-abbd-fdf49f373214"
/dev/nvme4n1p2: BLOCK_SIZE="512" UUID="7E743011742FCAAB" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="36c6fc2c-149c-40fe-871c-1b36d68b2d3e"
/dev/mapper/vgroot: UUID="nVAeln-cHPe-7K2A-NRo9-Gihp-O2uR-rUtyHl" TYPE="LVM2_member"

I think what I'm missing here is a function to be able to add an initramfs script to run partprobe. Any help is appreciated.

Offline

#2 2025-04-26 06:52:39

seth
Member
Registered: 2012-09-03
Posts: 63,637

Re: New install - issues with boot cmdlines (i'm assuming)

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

https://wiki.archlinux.org/title/Mkinit … mmon_hooks
Choose systemd XOR busybox, not both (and probably try either)

Offline

#3 2025-04-28 19:37:44

Mrkd1904
Member
Registered: 2023-11-08
Posts: 68

Re: New install - issues with boot cmdlines (i'm assuming)

seth wrote:

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

https://wiki.archlinux.org/title/Mkinit … mmon_hooks
Choose systemd XOR busybox, not both (and probably try either)

So just to be clear; it's either base, or systemd. Not both, correct? Going to try tonight. I was under the impression you needed base no matter the situation.

Offline

#4 2025-04-28 19:39:45

seth
Member
Registered: 2012-09-03
Posts: 63,637

Re: New install - issues with boot cmdlines (i'm assuming)

base is optional for systemd, mandatory for busybox - the overlap in your hooks is udev/systemd

Offline

#5 2025-04-30 21:53:49

Mrkd1904
Member
Registered: 2023-11-08
Posts: 68

Re: New install - issues with boot cmdlines (i'm assuming)

seth wrote:

base is optional for systemd, mandatory for busybox - the overlap in your hooks is udev/systemd

Removing systemd and adding base & udev gets me to a rescue screen finally. After having to add usbhid to MODULES and cryptsetup to BINARIES I'm able to bail out, unlock the first disk, partprobe, and then unlock the second disk and vgchange -a y to finally populate my root partition. BUT, am either rusty or ignorant as even after adding all partitions to /new_root and hitting 'exit' I'm getting the "/sbin/init is not found" warning and then kernel panic if 'exit' is prompted again. I'm having trouble remembering how to run-init manually. Normally I'd just add the root partitions to /new_root and exit. So, almost there.

I remember at some point in the past I was in a similar situation and was able to chroot into /new_root, add all of the necessary sysfs, devtmpfs, etc and somehow use systemctl to either run init or somehow initialize the system. But I'm sure there's an easier way.

Offline

#6 2025-05-01 07:54:54

seth
Member
Registered: 2012-09-03
Posts: 63,637

Re: New install - issues with boot cmdlines (i'm assuming)

If you're going for busybox, sd-encrypt and sd-vconsole are wrong, https://wiki.archlinux.org/title/Dm-cry … mkinitcpio

Offline

Board footer

Powered by FluxBB