diff options
author | Aaron Ball <nullspoon@oper.io> | 2023-03-05 10:06:29 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2023-03-05 10:06:29 -0700 |
commit | 641531cb671f9a172cb60cd2b47a23a3f1a37f83 (patch) | |
tree | 18a962e0124b1e935269423eb098cca43efbb310 | |
parent | 66652740eee85b4a82e9e4b19aadbbeb5faf2d1a (diff) | |
download | mkinitramfs-641531cb671f9a172cb60cd2b47a23a3f1a37f83.tar.gz mkinitramfs-641531cb671f9a172cb60cd2b47a23a3f1a37f83.tar.xz |
init:Remove cryptroot option
This option existed previously to handle luks encrypted root volumes.
However, recent changes allow the init process to detect at runtime
encrypted root volumes that are set with the `root` option, so this
option is no longer needed and effectively does nothing at this point
besides break encrypted device detection when used next to `root`. It is
required to only use `root` now.
-rwxr-xr-x | init | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -19,7 +19,6 @@ export DEBUG=0 export QUIET=0 export INTERACTIVE=0 export ROOTDEV='' -export CRYPTROOT='' export MOUNTOPTS=() screen_init() { @@ -78,18 +77,6 @@ parse_cmdline() { ROOTDEV="${i##*=}" fi ;; - cryptroot=*) - if [ "${i:10:4}" == 'UUID' ]; then - # mount by uuid - CRYPTROOT="/dev/disk/by-uuid/${i##*=}" - elif [ "${i:10:5}" == 'LABEL' ]; then - # mount by label - CRYPTROOT=/dev/disk/by-partlabel/${i##*=} - else - # mount by dev - CRYPTROOT="${i##*=}" - fi - ;; subvol=*) MOUNTOPTS+=(-o subvol=${i#*=}) ;; @@ -144,13 +131,11 @@ udev_populate() { # Start udevd if not already running pidof -s udevd > /dev/null || /sbin/udevd --daemon - /sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add --subsystem-match=block /sbin/udevadm trigger --type=devices --action=add --subsystem-match=input /sbin/udevadm settle - # Shut down udevd once devices are populated so main init can handle udevd to - # finish booting + # Stop udevd once devices are populated so main udevd can finish booting kill $(pidof udevd) } @@ -204,11 +189,6 @@ main() { log INFO "New rootdev: ${ROOTDEV}" fi - if [ ! -z "${CRYPTROOT}" ]; then - log INFO "Cryptroot defined. Changing rootdev to '${CRYPTROOT}'" - ROOTDEV="${CRYPTROOT}" - fi - # Drop to interactive shell if requested if [ "${INTERACTIVE}" == 1 ]; then log INFO "Interractive shell requested. Type 'exit' to continue boot sequence." |