You are not logged in.

#1 2018-05-04 16:31:21

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

[SOLVED] ERROR cryptroot device not found

After an update this morning, my machine fails to boot with the following error(s).

ERROR: device '/dev/mapper/cryptroot' not found. Skipping fsck.
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.

I found this post where someone experienced similar errors, but I am in an emergency shell and don't have access to the same commands. 

I have never ran into this issue, so I am unsure on how to proceed in troubleshooting it. 

Can someone offer some advice?

Edit:
Solution summary:  Added appropriate hooks (keyboard and encrypt) back to mkinitcpio.conf and re-generated initramfs.

Last edited by tlawren (2018-05-07 17:24:57)

Offline

#2 2018-05-04 16:47:47

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] ERROR cryptroot device not found

tlawren wrote:

I found this post where someone experienced similar errors, but I am in an emergency shell and don't have access to the same commands.

The commands cryptsetup and mount are not present in the emergency shell?
Edit:
Is the initrd using the sd-encrypt hook instead of the encrypt hook?

Last edited by loqs (2018-05-04 16:49:50)

Offline

#3 2018-05-04 17:23:09

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: [SOLVED] ERROR cryptroot device not found

Mount is certainly available, but cryptsetup is not.

With regards to the hooks, I don't remember.  Is there a way for me to look this up from the emergency shell?

Offline

#4 2018-05-04 17:29:46

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] ERROR cryptroot device not found

You would need to use install media then mount the root filesystem to check /etc/mkinitcpio.conf.
While you have the root filesystem mounted could you please post the pacman.log for the update that triggered this issue onwards.

Offline

#5 2018-05-04 18:32:58

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: [SOLVED] ERROR cryptroot device not found

From mkinitcpio.conf

HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

I don't recall what I originally setup, but neither encrypt or sd-encrypt are listed.  This is probably the problem. 

The things I updated this morning was

[2018-05-04 06:39] [PACMAN] Running 'pacman -Syu'
[2018-05-04 06:39] [PACMAN] synchronizing package lists
[2018-05-04 06:39] [PACMAN] starting full system upgrade
[2018-05-04 06:41] [ALPM] transaction started
[2018-05-04 06:41] [ALPM] upgraded bazel (0.12.0-1 -> 0.13.0-1)
[2018-05-04 06:41] [ALPM] upgraded cmake (3.10.3-1 -> 3.11.1-1)
[2018-05-04 06:41] [ALPM] upgraded libidn (1.33-2 -> 1.34-2)
[2018-05-04 06:41] [ALPM] upgraded dhcpcd (7.0.1-1 -> 7.0.4-1)
[2018-05-04 06:41] [ALPM] upgraded file (5.32-1 -> 5.33-1)
[2018-05-04 06:41] [ALPM] upgraded mesa (18.0.1-1 -> 18.0.2-1)
[2018-05-04 06:41] [ALPM] upgraded gcr (3.28.0-2 -> 3.28.0-3)
[2018-05-04 06:41] [ALPM] upgraded graphicsmagick (1.3.28-2 -> 1.3.29-1)
[2018-05-04 06:41] [ALPM] upgraded lib32-mesa (18.0.1-1 -> 18.0.2-1)
[2018-05-04 06:41] [ALPM] upgraded libaio (0.3.110-1 -> 0.3.111-1)
[2018-05-04 06:41] [ALPM] upgraded libwbclient (4.8.0-2 -> 4.8.1-1)
[2018-05-04 06:41] [ALPM] upgraded libzip (1.5.0-1 -> 1.5.1-1)
[2018-05-04 06:41] [ALPM] upgraded linux-firmware (20180314.4c0bf11-1 -> 20180416.b562d2f-1)
[2018-05-04 06:41] [ALPM] upgraded linux (4.16.5-1 -> 4.16.6-1)
[2018-05-04 06:41] [ALPM] upgraded man-pages (4.15-1 -> 4.16-1)
[2018-05-04 06:41] [ALPM] upgraded nvidia (390.48-11 -> 390.48-12)
[2018-05-04 06:41] [ALPM] upgraded pacman (5.0.2-2 -> 5.0.2-3)
[2018-05-04 06:41] [ALPM] upgraded python-numpy (1.14.2-1 -> 1.14.3-1)
[2018-05-04 06:41] [ALPM] upgraded python2-numpy (1.14.2-1 -> 1.14.3-1)
[2018-05-04 06:41] [ALPM] upgraded qtcreator (4.6.0-1 -> 4.6.1-1)
[2018-05-04 06:41] [ALPM] upgraded rxvt-unicode-terminfo (9.22-5 -> 9.22-6)
[2018-05-04 06:41] [ALPM] upgraded rxvt-unicode (9.22-5 -> 9.22-6)
[2018-05-04 06:41] [ALPM] upgraded smbclient (4.8.0-2 -> 4.8.1-1)
[2018-05-04 06:41] [ALPM] warning: directory permissions differ on /var/lib/samba/private/
[2018-05-04 06:41] [ALPM] upgraded samba (4.8.0-2 -> 4.8.1-1)
[2018-05-04 06:41] [ALPM] transaction completed
...

Offline

#6 2018-05-04 19:12:04

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] ERROR cryptroot device not found

Yes the absense of either encrypt hoook explains the issue Mkinitcpio#HOOKS although it does not explain how the hook came to be absent.

Offline

#7 2018-05-07 10:50:56

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: [SOLVED] ERROR cryptroot device not found

I added the hooks back, but still can't boot with the same error.   To be sure, my mkinitcpio hooks are now the following

HOOKS=(base udev autodetect keyboard modconf block encrypt filesystems fsck)

I also checked my crypttab file and noticed it was empty?  Should it be empty?  I don't recall ever configuring it.  My setup is simple ... just this

Last edited by tlawren (2018-05-07 10:51:35)

Offline

#8 2018-05-07 13:39:04

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] ERROR cryptroot device not found

tlawren wrote:

My setup is simple ... just this

Encrypting_an_entire_system#Configuring_the_boot_loader
Is the bootloader passing the cryptdevice option to the kernel.  Is cryptsetup now available in the rescue shell?
crypttab does not matter at this stage as it is stored on / so can not be used yet.

Offline

#9 2018-05-07 16:30:57

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: [SOLVED] ERROR cryptroot device not found

I think my bootloader is configured correctly.  The relevant line from my grub.cfg is the following:

linux	/vmlinuz-linux root=UUID=bf72466e-578e-4745-ad52-6c49aeeaf3c5 rw cryptdevice=/dev/sda2:cryptroot root=/dev/mapper/cryptroot quiet

The listed UUID is the UUID of the root partition after it has been decrypted.  Is this correct?  Do I need two root options?

Edit:
With regards to cryptsetup in the emergency shell.  It is still not available after adding the encrypt hook back.

Last edited by tlawren (2018-05-07 16:32:19)

Offline

#10 2018-05-07 16:35:18

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] ERROR cryptroot device not found

After you altered /etc/mkinitcpio.conf did you regenerate the initrd?

Last edited by loqs (2018-05-07 16:35:32)

Offline

#11 2018-05-07 17:01:25

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: [SOLVED] ERROR cryptroot device not found

That would be a good idea.  I am up and running now.  However, now I get a warning after on boot that states my root partition was not configured for read or write operations, and that it can be fsck'ed again later.  Any idea on why this is occurring?

Offline

#12 2018-05-07 17:07:32

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] ERROR cryptroot device not found

I would start a separate thread about that issue.  See the link from the fsck hook on the wiki page for mkinicpio I already linked to.
As the rw option is present I am unsure why that message appears.  You should also check the output of /proc/cmdline

Last edited by loqs (2018-05-07 17:07:50)

Offline

#13 2018-05-07 17:22:07

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: [SOLVED] ERROR cryptroot device not found

fsck issue is now resolved.  I booted with a temporary grub.cfg file (one I was poking around with while troubleshooting the above).  Fixing it resolved, the fsck issue.  I am marking the post as solved now.

Edit:

Many thanks loqs!

Last edited by tlawren (2018-05-07 17:25:38)

Offline

Board footer

Powered by FluxBB