Timed out waiting for device /dev/mapper/luks-…

Yesterday, Bluetooth and WLAN suddenly didn’t work, which is probably an unrelated problem. I tried the usual for that, it didn’t work, I rebooted, still not, so I installed updates, cleaned up .pacnew files, which seem to all be unrelated to either Bluetooth/WLAN or boot, used by laptop normally for a while and then rebooted. Or at least tried to.

Now I get this error:

[  OK  ] Started show Plymouth boot screen.
[  OK  ] Started forward password requests to Plymouth directory watch.
[  OK  ] Reached target basic system.
         Starting check battery level during eary boot...
[  OK  ] Finished check battery level during eary boot.
[  OK  ] Started display boot-time emergency messages in full screen.
[ TIME ] Timed out waiting for device /dev/mapper/luks-5f8bee24-4ef7-4133-a91d-725356237ac9.
[DEPEND] Dependency failed for /sysroot.
[DEPEND] Dependency failed for Initrd root file system.
[DEPEND] Dependency failed for mountpoints configured in the real root.
[DEPEND] Dependency failed for Initrd root device.
[DEPEND] Dependency failed for file system check on /dev/mapper/1uks-5f8bee24-4ef7-4133-a91d-725356237ac9.
[  OK  ] Stopped target basic system.
[  OK  ] Reached target Initrd file systems.
[  OK  ] Stopped target system initialization.
[  OK  ] Started emergency shell.
[  OK  ] Reached target emergency mode.
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot or "exit" to continue bootup.

Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.

Press Enter to continue.

It takes 90 seconds, then “Timed out waiting for device /dev/mapper/luks-…”

I’ve tried a couple mkinitcpio combinations, none of them changed anything. Currently I have:

HOOKS=(systemd autodetect modconf kms keyboard sd-vconsole plymouth sd-encrypt block filesystems fcks)

I also tried grub-mkconfig and booting into Linux 6.12 and 6.6, which were both installed (even though don’t know why, because I use LTS).

The suggestion on screen to look into journalctl doesn’t work, there’s nothing at the relevant time in the live system or the chroot system.

I’m using single-boot Manjaro, encrypted main drive.

I remember to have changed some configuration file recently, containing a syntax with curly brackets and lists of short words, where I’ve merged new and old to keep all entries, I think that was boot-related, but that must have been before the first reboot yesterday, which still worked fine. I also can’t find anything relevant in my command history, quite weird.

I could try to downgrade some packages from that update, but that usually causes more issues than it fixes.

What causes this issue, how to fix it and does the mentioned log exist anywhere?

This is good, although if your keyboard does not have the typical US American layout, then I would move the keyboard hook in front of the autodetect hook.

However, with the new systemd hooks, the syntax has changed for mounting encrypted filesystems, and the old syntax will no longer work. See this post below. :backhand_index_pointing_down:

While much is made of the changes required to the HOOKS line in mkinitcpio.conf, it’s almost kept top secret that if you use encryption, you also have to change the GRUB_CMDLINE_LINUX_DEFAULT= line in /etc/default/grub . I had that same sinking feeling you experienced when I first rebooted. Then I did the same thing on a second computer… (I’m a slow learner.) Fortunately, I have multiple computers I could keep using while I pieced together the cure.

The link @Aragorn posted above has the details. I found it’s easiest to copy-and-paste the line I indicated and @Nachlese shows, comment-out the original, and modify the copy. If you have any other issues, I can post mine for you to compare.

1 Like

I completely agree with brucew. They suggest an mkinitcpio.conf.pacnew but do not suggest a grub.pacnew with the changes to be applied.

The mkinitcpio line should look like this:

HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block plymouth sd-encrypt filesystems)

Pay attention to sd-crypt if you don’t have an encrypted system.

The GRUB line should look like this:

GRUB_CMDLINE_LINUX_DEFAULT=“rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=luks-rd.luks. name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rd.luks.key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx root=/dev/mapper/luks-rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \[…\]”

Here is an example

Grub PostInstall:

GRUB_CMDLINE_LINUX_DEFAULT=‘quiet cryptdevice=UUID=abd96eac-5ac6-4d54-9dc8-1a8e1a8a950f: luks-abd96eac-5ac6-4d54-9dc8-1a8e1a8a950f root=/dev/mapper/luks-abd96eac-5ac6-4d54-9dc8-1a8e1a8a950f splash apparmor=1 security=apparmor udev.log_priority=3’

New Grub:

GRUB_CMDLINE_LINUX_DEFAULT=‘rd.luks.name=abd96eac-5ac6-4d54-9dc8-1a8e1a8a950f=luks-abd96eac-5ac6-4d54-9dc8-1a8e1a8a950f rd.luks.key=luks -abd96eac-5ac6-4d54-9dc8-1a8e1a8a950f=/crypto_keyfile.bin root=/dev/mapper/luks-abd96eac-5ac6-4d54-9dc8-1a8e1a8a950f splash apparmor=1 security=apparmor’

Please note that this is for an encrypted disk and BTRFS system.

I hope this helps.:slightly_smiling_face:

The UUIDs are from a VM.


Mod edit:- Corrected pre-formatted text as per forum guidelines.
No charge. In future, you are expected to handle this yourself.
See How to Post Command Output as Preformatted Text :eyes:


[MiniHowTo] Present code or command output

Note: Grave accent (or, backtick) characters are used. :eyes:

For inline code or to show a single command:

  • please follow this simple example: code here.

For multi-line command output:

  • place text beween two rows of three (```) backtick characters to form a scrollable text box, or …
  • use the </> button in the Compose window to achieve the same result.

The empty row between these rows of backtick characters is where to paste any multi-line command output (such as inxi).

An example of a pre-formatted text enclosure:

What is a Quark?

A. In Physics, an elementary particle and fundamental constituent of matter. 
B. A character from the Star Trek: "Deep Space Nine" television series.
C. A soft, creamy, usually unsalted cheese traditional to central Europe.

1 Like

For the sake of completeness, no matter which bootloader you use, you must make a similar change.

My Arch laptops use systemd as their bootloader. I found it much easier to troubleshoot and fix things under systemd than grub, because where grub uses a single configuration file for all installed kernels, systemd uses a separate /boot/loader/entries/[kernelname].conf file for each kernel.

This meant I could reboot to a different kernel with an unmodified conf file to fix things if I made a mistake (or for additional testing), rather than having to chroot in after booting from a USB. Much easier.

For the systemd bootloader, the change needs to be made to the options line in the conf file for each kernel you have installed. I suggest doing them one at a time. From the conf file for Arch’s linux-zen kernel on my laptop:

# options cryptdevice=PARTUUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:root root=/dev/mapper/root rw rootfstype=ext4

options rd.luks.name=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx=root root=/dev/mapper/root rw rootfstype=ext4

I commented-out the original line. You can see the changes to be made are very similar to those required if you’re usung grub for your bootloader. I imagine, it would be similar for other bootloaders–limine, refind, et. al. I use only grub or systemd, so I’m unable to test the others.

NOTE: All of the above changes are for systems with a single encrypted partition. If you have multiple encrypted partitions, you’ll get a separate password prompt for each one, UNLESS you also add rd.luks.key=/crypto_keyfile.bin to the GRUB_CMDLINE_LINUX_DEFAULT= line, or the options line if using systemd as your bootloader. I’ve given Manjaro’s default location in the example. You should double-check and use your system’s location if it’s different.

Someone edited my post, removed the photo and replaced it with a text that didn’t actually contain any of the relevant parts. If someone actually wants to transcribe all of it, feel free to, but don’t remove relevant information.

For the record: I didn’t remove whatever screenshot or picture there was.

See, this is the “problem”:

You could transcribe (or copy/paste) the content
(you likely still have the picture).

If it needs to be a picture, post it to some image sharing platform and share the link to it here.

The one I know off the top of my head is 0x0.st - there are many others which might be more convenient to use.

My system booted! :tada:

But it now asks me for my password, then goes partway through the boot, then asks for the password again, but this time with my German keyboard layout, which means I have to enter a slightly different password, quite confusing.

Now that I can copy properly from system to the forum, I can list my entire /etc/mkinitcpio.conf:

MODULES=()
BINARIES=()
FILES=(/crypto_keyfile.bin)
HOOKS=(base systemd keyboard autodetect modconf block sd-vconsole sd-encrypt filesystems fsck)

(plus comments)

And same for /etc/default/grub:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.name=5f8bee24-4ef7-4133-a91d-725356237ac9=luks-5f8bee24-4ef7-4133-a91d-725356237ac9 luks.key=luks-5f8bee24-4ef7-4133-a91d-725356237ac9=/crypto_keyfile.bin root=/dev/mapper/luks-5f8bee24-4ef7-4133-a91d-725356237ac9 splash snd-hda-intel.model=clevo-p950"
GRUB_CMDLINE_LINUX=""
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
GRUB_TIMEOUT_STYLE=menu
GRUB_TERMINAL_INPUT=console
GRUB_GFXMODE=auto
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_DISABLE_RECOVERY=true
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"
GRUB_SAVEDEFAULT=true
GRUB_DISABLE_OS_PROBER=false
GRUB_ENABLE_CRYPTODISK=y

And of course always mkinitcpio -P and update-grub after changes.

I put this together from all the comments and links, thank you!

How do I now get rid of the second password request?

Try changing luks.key=luks-5f8bee24-4ef7-4133-a91d-725356237ac9=/crypto_keyfile.bin to rd.luks.key=/crypto_keyfile.bin.

Now that I can use my system, I’ve used OCR and then fixed it up manually. But why is there an image button if I’m not supposed to use it? If an external service is preferred, there could be a feature similar to StackExchange (except they now have their own internal system, previously that button uploaded to Imgur).

Thank you, that worked!

Also, not sure why, but I can now see some warnings related to NVidia and my laptop’s manufacturer’s driver (fan, keyboard backlight, power profiles, …). I don’t know if they’re new or just have been invisible before. Backlight, screen recording etc. work, so they don’t seem too bad, but it’s probably better to not ignore them. I’ll make a new post for those.

Thanks everyone for the help!

probably like this:

The different keymap can also be resolved, but that is a little more involved, as grub assumes a standard english keyboard by default.
A proper keymap can be added, the process is not trivial (some would say)
and is described elswhere here and certainly in the Arch wiki.

Another option would be to use systemd-boot instead of grub.
(I don’t recall whether you also would need to convert your Luks1 encrypted partitions to Luks2 encryption for this)

The standard Grub can’t handle Luks2 decryption, that is why Luks1 is used.

I have originally just used the Manjaro installer. In my fixing yesterday and today, usually anything systemd-related tended to work and that word is now in the “HOOKS” line. There are two encrypted partitions, main and Swap. But /boot/loader doesn’t exist. So I’m not actually sure what I’m using now. :smiley:

At this point, I don’t want to fix the keymap, because I have built up muscle memory for how I have to enter it. I have even converted the intended password into what I end up typing with US keyboard layout if I press the keys for the German layout and then set that as the disk encryption password. So the actual password is some nonsense that I don’t actually have in my head. Fixing the layout now would make it extremely confusing! :smiley:

/boot/loader exists only if you use systemd-boot, which is an alternative to grub, refind and other boot loaders.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.