When looking at logs from a boot with an encrypted device, I see
(with unrelevant messages snipped):
[ 2.751692] systemd[1]: Started Dispatch Password Requests to Console.
[ 7.929199] systemd-cryptsetup[258]: Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/disk/by-uuid/
2d9b648a-15b1-4204-988b-
ec085089f8ce.
[ 9.499483] systemd[1]: Finished Cryptography Setup for luks-
2d9b648a-15b1-4204-988b-
ec085089f8ce.
There is a hug gap in timing without any explanatory message. If I didn't type
in the password, there would be no way to figure out why things blocked from
this log, so let's log something to the log too.
char ***ret) {
int tty_fd = -1, r;
+ const char *con = arg_device ?: "/dev/console";
if (arg_console) {
- const char *con = arg_device ?: "/dev/console";
-
tty_fd = acquire_terminal(con, ACQUIRE_TERMINAL_WAIT, USEC_INFINITY);
if (tty_fd < 0)
return log_error_errno(tty_fd, "Failed to acquire %s: %m", con);
if (r < 0)
log_warning_errno(r, "Failed to reset terminal, ignoring: %m");
+ log_info("Starting password query on %s.", con);
}
r = ask_password_tty(tty_fd, message, NULL, until, flags, flag_file, ret);
if (arg_console) {
tty_fd = safe_close(tty_fd);
release_terminal();
+
+ if (r >= 0)
+ log_info("Password query on %s finished successfully.", con);
}
return r;