You are not logged in.
Hi!
Occasionally (around 20% +/- 10% of the times I turn on my PC), I get the following error on booting:
ERROR: device '/dev/mapper/my_volume_group-my_volume' not found. Skipping fsck.
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty: job control turned off
I have a fully encrypted setup using LUKS and LVM. '/boot' is not on a separate partition, i.e. it resides within/beneath '/'. I followed more or less the encrypted root partition (GRUB) guide, with the difference of not making a separate partition for '/boot'.
An internet search did not really turn up useful stuff. This super user self-answered question suggests it might have to do something with the order of 'HOOKS' specified in '/etc/mkinitcpio.conf'. This seemed to solve it at first, but the problem reappeared.
In case it matters: I have a keyfile embedded in initramfs to avoid entering the password twice on boot, according to this guide.
Any ideas what could be causing this / how to resolve it? Any help is appreciated. Thanks in advance!
Last edited by TwUxTLi51Nus (2017-10-23 16:41:44)
Offline
Post your mkinitcpio.conf and details of your partition table.
Offline
Here's my partition layout (hope that does it):
[root@pc /]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238,5G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 8:2 0 238G 0 part
└─luks_256GB 254:0 0 238G 0 crypt
├─MY_VG_1-VOLUME_SWAP 254:1 0 32G 0 lvm [SWAP]
├─MY_VG_1-VOLUME_SYSTEM 254:2 0 80G 0 lvm /
└─MY_VG_1-VOLUME_HOME 254:3 0 126G 0 lvm /home
sdb 8:32 0 931,5G 0 disk
└─sdb1 8:33 0 931,5G 0 part
└─luks_1TB 254:4 0 931,5G 0 crypt
├─MY_VG_2-VOLUME_TMP 254:5 0 100G 0 lvm /tmp
├─MY_VG_2-VOLUME_DATA_1 254:6 0 50G 0 lvm
├─MY_VG_2-VOLUME_DATA_2 254:7 0 50G 0 lvm
└─MY_VG_2-VOLUME_DATA_3 254:8 0 731,5G 0 lvm /data
Heres my mkinitcpio.conf (I removed most comment lines for better readability):
[root@pc /]# cat /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# [...]
MODULES=""
# BINARIES
# [...]
BINARIES=""
# FILES
# [...]
FILES="/path/to/my/keyfile"
# HOOKS
# [...]
HOOKS="base udev block autodetect modconf keyboard encrypt lvm2 filesystems fsck"
# COMPRESSION
# [...]
# COMPRESSION_OPTIONS
# [...]
Offline
Have you tried adding the filesystem module for your root partition to the initramfs?
Offline
you mean in the MODULES section?
If yes, then no, I did not do that - I thought that was/is the job of the "filesystems" hook...
Offline
It is a way of guaranteeing that it is present in the initramfs.
Offline
OK, I'll try that out. THX so far!
Offline
After a few restarts... it looks promising... however, now I got the problem that I cannot use USB devices (keyboard, mouse) for around a minute after boot. The kernel tells that:
[root@pc /]# journalctl -e -k
usb 1-5: device descriptor read/64, error -110
usb 1-5: new high-speed USB device number 3 using xhci_hcd
usb 1-5: device descriptor read/64, error -110
usb 1-5: device descriptor read/64, error -110
usb 1-5: new high-speed USB device number 4 using xhci_hcd
xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
usb 1-5: device not accepting address 4, error -62
usb 1-5: new high-speed USB device number 5 using xhci_hcd
xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
usb 1-5: device not accepting address 5, error -62
usb usb1-port5: unable to enumerate USB device
Offline
That is a separate issue: https://wiki.archlinux.org/index.php/Co … ow_to_post
Offline
Regarding the USB problem: You are right, sorry.
The issue is back, however. I put the filesystems I use (btrfs, xfs and vfat) into the MODULES section. For a few days the issue did not appear, however today it did. Any other thoughts? Is there some place to look for logs or another way to find out what is causing this?
Thanks...
Offline
ERROR: device '/dev/mapper/my_volume_group-my_volume' not found. Skipping fsck.
When the issue occurrs what is the output of ( this is to see which if any entries are missing )
# ls /dev/mapper
Offline
interesting...
# ls /dev/mapper
shows there is only one folder called "control". I can call "cryptsetup open ..." to open the encrypted disk.
Could it be that the keyfile stored in initramfs does not get handed over correctly? I tried
# dmesg
and
# journalctl -k
... but the failed boot does not show up, which again makes sense as the system did not boot. So, how to check for this?
Offline
Can you copy the output of dmesg from the rescue prompt to removable media?
It appears the encrypt runtime hook is failing but I do not know why it would be failing intermittently.
Offline
Offline
@loqs:
I got the dmesg output of a failed boot and compared it to a successful boot. There is no relevant difference. There are a few differences regarding memory maps, dates/times and performance measures.
And of course, the "successful boot version" continues ("is longer"), the next entries being about cryptsetup and lvm. However, in the failed boot version there is no message from the kernel complaining about a missing rootfs.
@seth:
I guess this makes sense: sometimes, cryptsetup/lvm are not done at the time the kernel tries to boot, so it fails. I'll try adding the rootdelay parameter (5s should do it, right?).
THX!
Offline
The default timeout is 10 seconds, so I'd raise that value a bit ;-)
Offline
I set the value to 20. Haven't had the issue since. So I am marking this as solved. Somehow, I cannot believe to having been the first in encountering this issue - or is my setup really unusual? Anyway, does it make sense adding in the troubleshooting section of the respective article(s) in the wiki?
Offline
I finally found somebody else with my problem!!! Thank you OP for this thread, this may be exactly what I needed.
Offline