systemd, luks, initrd

After an upgrade failed due to insufficient disk space in /boot, I created a new initrd (many thanks to whoever put the info in the man page about recovery when booted from distribution). Everything works OK now, except every few minutes I get messages like this in all terminal windows:

Broadcast message from root@Socrates (Wed, 2014-01-15 10:28:13 MST):

Password entry required for ‘Please enter passphrase for disk HGST_HTS721010A9E630 (cr_ata-HGST_HTS721010A9E630_JG40006PG2WE2C-part1)!’ (PID 10989).
Please enter password with the systemd-tty-ask-password-agent tool!

I am using LUKS with LVM, and the partitions are properly mounted at boot time; there is nothing needed to do with them (regarding passphrases) after the system is up.

What do I need to change in my mkinitrd command line to solve this problem?



Look at “/dev/mapper”, to see what is there. You probably unlocked the LVM under some different name (different from “cr_ata-HGST_HTS721010A9E630_JG40006PG2WE2C-part1”). Perhaps it is unlocked as something like “cr_lvm”. And note that this is the virtual name used for the unlocked device.

Once you have found what name you are using, then edit “/etc/crypttab”, and change the name to what you are currently using. After doing that, I suggest a reboot to test that the problem is fixed.

If you are not sure what name it is, then list the content of “/dev/mapper” here, and I’ll try to guess.

Here is what almost certainly happened:

You went into rescue mode to repair the “initrd” problem. So you manually opened the LUKS partition, then opened the LVM and mounted the file systems.

When you ran “mkinitrd”, it did not look at “/etc/crypttab” to decide what to mount. Instead, it looked at how the root partition was mounted at the time you ran “mkinitrd”.

The easy way to fix the problem is what I described above. That is, modify “crypttab” to match how the partition is being accessed. The hard way is to redo all of the rescue mode stuff, but this time be sure to unlock the partition under the name used in “crypttab”.

Note that when I am doing such a rescue (fortunately not often), I unlock the LUKS partition, mount the root file system, and look in “/etc/crypttab” to get the name. Then I unmount the file system, close the LUKS partition, and do it all over again using the name that I had picked up from “crypttab”.

You are seeing that “systemd” message, because “systemd” is looking for the partition under a different name from the one that you are using.

I hope this helps.

Hello and welcome here.

Please always tel us which version of openSUSE you use.

I see you tried toformat the compute text you copied/pasted as good as possible. The best way to do this (next time) however if to paste it between CODE tags. You get the CODE tags by clicking on the # button in the tool bar of the post editor.

This is exactly what happened. I used simple, short names rather than the long names used by the system.


For the other post and anybody coming by later, I am using OpenSUSE 12.3