You are not logged in.

#1 2017-09-12 20:37:47

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

[solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#2 2017-09-12 20:54:54

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

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

Post your mkinitcpio.conf and details of your partition table.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-09-12 21:20:55

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#4 2017-09-12 21:23:41

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

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

Have you tried adding the filesystem module for your root partition to the initramfs?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-09-12 21:28:32

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#6 2017-09-12 21:33:29

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

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

It is a way of guaranteeing that it is present in the initramfs.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2017-09-12 21:47:32

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

OK, I'll try that out. THX so far!

Offline

#8 2017-09-12 22:16:07

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#9 2017-09-12 22:25:58

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

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2017-09-15 21:26:53

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#11 2017-09-15 21:40:56

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#12 2017-09-22 17:59:18

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#13 2017-09-22 19:06:30

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#14 2017-09-22 20:19:27

seth
Member
Registered: 2012-09-03
Posts: 49,967

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

Offline

#15 2017-09-26 10:00:59

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

@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

#16 2017-09-26 16:04:12

seth
Member
Registered: 2012-09-03
Posts: 49,967

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

The default timeout is 10 seconds, so I'd raise that value a bit ;-)

Offline

#17 2017-10-23 16:38:10

TwUxTLi51Nus
Member
Registered: 2017-09-12
Posts: 15

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

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

#18 2017-10-24 00:06:03

maxweiss
Member
Registered: 2017-10-21
Posts: 8

Re: [solved] occasional boot error: ERROR: device not found. Skipping fsck

I finally found somebody else with my problem!!!  Thank you OP for this thread, this may be exactly what I needed.

Offline

Board footer

Powered by FluxBB