diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-03-02 15:59:13 -0500 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-03-02 15:59:13 -0500 |
commit | 5b387f9340394c076af72890a8cd24d287f8af73 (patch) | |
tree | 01a66b877c5d0ec84396f8caa336bf9bce4a7432 | |
parent | 56948a7d5f31ed83bc9aa3ed5b977e93da4327c1 (diff) |
initrd: improve console logging
-rw-r--r-- | initramfs-tools/scripts/samizdat | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat index 71d7f17..d72ef8c 100644 --- a/initramfs-tools/scripts/samizdat +++ b/initramfs-tools/scripts/samizdat | |||
@@ -47,6 +47,12 @@ write_resolv_dot_conf() | |||
47 | fi | 47 | fi |
48 | } | 48 | } |
49 | 49 | ||
50 | get_os_name() | ||
51 | { | ||
52 | [ -r /root/etc/os-release ] && . /root/etc/os-release | ||
53 | echo -n ${PRETTY_NAME:-Debian GNU/Linux} | ||
54 | } | ||
55 | |||
50 | mountroot() | 56 | mountroot() |
51 | { | 57 | { |
52 | openvt -c 13 sh | 58 | openvt -c 13 sh |
@@ -66,14 +72,18 @@ mountroot() | |||
66 | samizdat_install_udev_rules | 72 | samizdat_install_udev_rules |
67 | bootwait samizdat-gpg | 73 | bootwait samizdat-gpg |
68 | bootwait root-mounted | 74 | bootwait root-mounted |
75 | osname=$(get_os_name) | ||
69 | write_resolv_dot_conf | 76 | write_resolv_dot_conf |
70 | chvt 1 | 77 | chvt 1 |
71 | clear >/dev/tty1 | ||
72 | cat >/dev/tty1 <<EOF | 78 | cat >/dev/tty1 <<EOF |
79 | Success! | ||
80 | |||
81 | Samizdat has mounted the rootfs. | ||
82 | |||
83 | Control now goes to ${osname}. | ||
73 | 84 | ||
74 | Success: Samizdat mounted the rootfs. | 85 | A login prompt should appear shortly. |
75 | Debian initramfs tools will now boot the rootfs. | 86 | Press alt-f9 for rescue terminal. |
76 | This should only take a minute. Press alt-f9 for rescue terminal. | ||
77 | EOF | 87 | EOF |
78 | } | 88 | } |
79 | 89 | ||