Web lists-archives.com

Re: Debian Stretch, no password prompt for luks-encrypted home partition during boot




I'll try your suggestion. But I think problem is not here. Password ask is after mounting all other filesystems, swapon and flush of journald:

[    9.986320] intel_rapl: Found RAPL domain uncore
[   10.203636] EXT4-fs (md0p2): mounted filesystem with ordered data mode. Opts: (null)
[   10.203981] Adding 1998844k swap on /dev/md1.  Priority:-1 extents:1 across:1998844k FS
[   10.284033] systemd-journald[314]: Received request to flush runtime journal from PID 1
[   10.677656] EXT4-fs (md2): mounted filesystem with ordered data mode. Opts: (null)
[   21.735417] NET: Registered protocol family 38
[   22.029828] XFS (dm-0): Mounting V4 Filesystem
[   22.188883] XFS (dm-0): Ending clean mount
[   22.892609] r8169 0000:05:01.0 eth1: link down
[   22.892644] r8169 0000:05:01.0 eth1: link down
[   22.895138] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   24.472245] r8169 0000:05:01.0 eth1: link up

вт, 28 мая 2019 г., 9:38 deloptes <deloptes@xxxxxxxxx>:
Sergey Belyashov wrote:

> Root partition is on mdraid but is not encrypted. Home is encrypted only.
> Modules are set to most already.
>

I have this setup on my server, but I removed all crypted entries from fstab
because obviously I can not sit infront of the server to type the password
when booting. So I can not help in this case much. I put all of this in a
script that I execute after I ssh to the server.

On the clients I have root encrypted. I had issues in the beginning after
transfering the system from dbootstrap to the disk. In that case the UUIDs
were not correct. I always did set the init=/bin/sh on the command line in
grub to get the shell and debugged. Sometimes it is useful to add
a "rootdelay" to wait for the root device to get available, but in your
setup it looks like it is not exactly what you would need.

When the system boots it would read whatever you have in your initrd. It
would load the drivers and perform the boot process. Then it will pass
control to init and run the rest from the root system. IMO mounting home
comes in this second stage, but I am not 100% sure. What do you see when
you enable debug or verbose - what does it say when booting.

Also you have the fs type in fstab set to auto for your home - what happens
if you set the exact fs type like ext4 or xfs?

Do a change at a time and test after this.

regards