You are not logged in.

#1 2013-05-12 15:25:49

uaarcher
Member
Registered: 2012-12-19
Posts: 8

Unable to find root device (for encrypted root)

Hi,

I'm using encrypted container (LUKS on LVM) for / partition. And very often (~ 60%) I can't boot my arch: after grub screen is gone there is a blank screen for a long time (30 seconds or so) and then I see this:
arch boot error

My mkinitcpio.conf has following uncommented lines:

MODULES="dm_mod dm_crypt"
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block lvm2 encrypt filesystems keyboard fsck shutdown"

Also I have following kernel boot parameter for my grub:

GRUB_CMDLINE_LINUX="cryptdevice=/dev/mapper/vg_group-lv_arch_root:eroot"

The problem happens on the laptop, which has SSD with GPT (where both /boot and / reside) and HDD with GPT (not used in arch setup). The laptop has BIOS, not UEFI.

What confuses me the most is that I have another laptop with identic arch configuration, which always boot fine o_O The only difference is that this "good" laptop has single HDD with MBR.

Any suggestion what can be wrong with my configuratuin?
Maybe its GPT that confuses the grub during boot?

Thanks in advance!


Evaluating Arch as alternative to Sabayon...

Offline

#2 2013-05-12 18:31:39

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: Unable to find root device (for encrypted root)

What do you have in /etc/fstab ?


Don't forget to mark as [SOLVED].

Offline

#3 2013-05-12 19:00:54

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Unable to find root device (for encrypted root)

ubunchu wrote:

What do you have in /etc/fstab ?

Nothing relevant to this thread.

I'm guessing this is some sort of LVM screwup and the device isn't actually ready when the encrypt hook runs. Does /dev/mapper/vg_group-lv_arch_root exist when you're in the rescue shell?

Offline

#4 2013-05-12 21:34:41

uaarcher
Member
Registered: 2012-12-19
Posts: 8

Re: Unable to find root device (for encrypted root)

falconindy wrote:

I'm guessing this is some sort of LVM screwup and the device isn't actually ready when the encrypt hook runs. Does /dev/mapper/vg_group-lv_arch_root exist when you're in the rescue shell?

As I understand the device does not exist (I hope I use correct command):

[rootfs /]# ls dev/mapper
control

Evaluating Arch as alternative to Sabayon...

Offline

#5 2013-05-13 11:23:38

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Unable to find root device (for encrypted root)

So then do the member devices of the lvm array exist?

Offline

#6 2013-05-13 21:12:24

uaarcher
Member
Registered: 2012-12-19
Posts: 8

Re: Unable to find root device (for encrypted root)

falconindy wrote:

So then do the member devices of the lvm array exist?

Not sure if I understand the question correctly.
But there is volume group "vg_group" and one of its volumes is called "lv_arch_root". After all, sometimes the arch manages to boot, just not always hmm


Evaluating Arch as alternative to Sabayon...

Offline

#7 2013-05-13 23:58:59

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Unable to find root device (for encrypted root)

The point is that devices probably called /dev/sd* need to exist before the lvm array can be assembled. Break down where the failure occurs and then it'l narrow down what the root cause is.

Offline

#8 2013-05-19 06:50:21

uaarcher
Member
Registered: 2012-12-19
Posts: 8

Re: Unable to find root device (for encrypted root)

falconindy wrote:

The point is that devices probably called /dev/sd* need to exist before the lvm array can be assembled.

I verified this. All /dev/sd* are in place. Using "lvm lvs" command I can see all my logical volumes. But! Following warning is shown before volume list:

Failed to connect to lvmetad: No such file or directory.  Falling back to internal scanning. 
falconindy wrote:

Break down where the failure occurs and then it'l narrow down what the root cause is.

To do so I replaced "quiet" with "verbose" in kernel boot parameters.
Successfull boot looks like this:

:: running early hook [udev]
:: running early hook [lvm2]
:: running hook [udev]
:: Triggering uevents...
:: running hook [encrypt]
Apassword is required to accss the eroot volume:
Enter passphrase for /dev/mapper/vg_group-lv_arch_root:

While un-successfull boot looks like this:

:: running early hook [udev]
:: running early hook [lvm2]
:: running hook [udev]
:: Triggering uevents...
:: running hook [encrypt]
Waiting 10 seconds for devide /dev/mapper/vg_group-lv_arch_root ...
Waiting 10 seconds for devide /dev/mapper/eroot ...
ERROR: device '/dev/mapper/eroot' not found Skipping fsck.

For me it looks like my logical volume is not ready.

Any suggestions? smile


Evaluating Arch as alternative to Sabayon...

Offline

#9 2013-05-19 13:01:50

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Unable to find root device (for encrypted root)

Figure out why lvmetad isn't starting.

Offline

#10 2013-05-19 13:24:03

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,496

Re: Unable to find root device (for encrypted root)

FWIW I was following up a similar issue the other day and run across the following patch in lvm2 2.2.99. It is mentioned in a Suse bug report.


The painting in my profile is "Eros" by Paul Klee. He is credited in the lower left, but that got blurry during the downscale.

Offline

#11 2013-05-19 18:08:07

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Unable to find root device (for encrypted root)

Strike0 wrote:

FWIW I was following up a similar issue the other day and run across the following patch in lvm2 2.2.99. It is mentioned in a Suse bug report.

That patch is irrelevant -- we enable udev sync on bootup (but explicitly disable on shutdown)

Offline

Board footer

Powered by FluxBB