I'm on Slackware 15.0 using a custom compiled Linux kernel 6.3 (6.3.8 to be more precise).
I just upgraded from Linux kernel 6.2 to 6.3 (using "make oldconfig" to make a .config as close as possible to Slackware's kernel .config) and booting reliably fails with "ERROR: No /sbin/init found on rootdev (or not mounted)." Dropping back to kernel 6.2 booting works fine. However, if I manually mount the root drive and type "exit" the boot process resumes and boots normally. Here is a portion of the boot console, including commands typed by me (in bold):
Code:
[ 14.763250] scsi 8:0:0:0: Direct-Access SanDisk U3 Contour 4.04 PQ: 0 ANSI: 2
[ 14.765212] sd 8:0:0:0: [sdi] 8027793 512-byte logical blocks: (4.11 GB/3.83 GiB)
[ 14.766210] sd 8:0:0:0: [sdi] Write Protect is off
[ 14.766734] sd 8:0:0:0: [sdi] Mode Sense: 03 00 00 00
[ 14.767062] sd 8:0:0:0: [sdi] No Caching mode page found
[ 14.767554] sd 8:0:0:0: [sdi] Assuming drive cache: write through
[ 14.784381] sdi: sdi1 sdi2 sdi3
[ 14.785569] sd 8:0:0:0: [sdi] Attached SCSI removable disk
[ 16.365082] EXT4-fs (sdi3): mounted filesystem <redacted UUID> with ordered data mode. Quota mode: none.
>>> Using LUKS key file: 'LABEL=LIVESLAK:/persistence/luks_keys/nvme0n1p5.luks'
Unlocking LUKS encrypted device '/dev/nvme0n1p5' as luks mapped device 'luksnvme0n1p5' with '--allow-discards':
[ 21.047074] EXT4-fs (sdi3): unmounting filesystem <redacted UUID>.
[ 21.061384] /dev/mapper/luksnvme0n1p8: Can't open blockdev
mount: mounting /dev/mapper/luksnvme0n1p8 on /mnt failed: No such file or directory
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try to fix it. Type 'exit' when things are done.
/bin/sh: can't access tty; job control turned off
/ # mount -o ro /dev/mapper/luksnvme0n1p5 /mnt
[ 42.457027] EXT4-fs (dm-0): mounted filesystem <redacted UUID> with ordered data mode. Quota mode: none.
/ # exit
After typing "exit" the boot continues normally (since I mounted the root filesystem successfully manually).
Taking a look at init in the initrd there is:
Code:
# Switch to real root partition:
/sbin/udevadm settle --timeout=10
echo 0x0100 > /proc/sys/kernel/real-root-dev
mount -o ro${ROOTFLAGS:+,$ROOTFLAGS} -t $ROOTFS $ROOTDEV /mnt
if [ ! -r /mnt/sbin/init ]; then
echo "ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead."
echo " You can try to fix it. Type 'exit' when things are done."
echo
/bin/sh
fi
So my best guess is that the "udevadm settle" command isn't waiting long enough for /dev/mapper/luksnvme0n1p5 to be available. After it drops to a shell and I mount manually it works (so enough time has elapsed). I have not tried editing init (add a "sleep" command) and rebuilding the initrd to test this theory.
Here is my drive layout:
Code:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 1.8T 0 disk
├─nvme0n1p1 259:1 0 1010M 0 part /boot/efi
├─nvme0n1p2 259:2 0 3.5G 0 part /recovery
├─nvme0n1p3 259:3 0 279.4G 0 part
├─nvme0n1p4 259:4 0 4G 0 part
│ └─cryptswap 253:1 0 4G 0 crypt [SWAP]
└─nvme0n1p5 259:5 0 1.5T 0 part
└─luksnvme0n1p5 253:0 0 1.5T 0 crypt /
# mount | grep luksnvme0n1p5
/dev/mapper/luksnvme0n1p5 on / type ext4 (rw,relatime,discard)
/ is an ext4 partition on a LUKS partition on /dev/nvme0n1p5.
Has anyone else seen this with Linux kernel 6.3? Is adding a "sleep" command before mounting root in init the best solution?