diff options
author | Aaron Ball <nullspoon@oper.io> | 2023-03-04 15:06:42 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2023-03-04 15:06:42 -0700 |
commit | 98b1a3fb560c8e33c89e9cc644c5ceaa6b243a21 (patch) | |
tree | f937fd0cdaeeddd378d677c49a5d2b7790d0275e /init | |
parent | 5d652eb46cab242d999db7077ee943462e71c680 (diff) | |
download | mkinitramfs-98b1a3fb560c8e33c89e9cc644c5ceaa6b243a21.tar.gz mkinitramfs-98b1a3fb560c8e33c89e9cc644c5ceaa6b243a21.tar.xz |
Support modular dm-crypt
Previously dm-crypt had to be statically compiled into the kernel, which
is cumbersome, not well documented, and makes the kernel larger.
This supports dm-crypt being an external module, adding rmmod and
modprobe to the initramfs, and copying in the relevant kernel modules
directory, stripping out graphics device support, bluetooth, sound,
virtualization, and networking support modules.
This also updates the copyright year.
Diffstat (limited to 'init')
-rwxr-xr-x | init | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -182,10 +182,12 @@ wait_dev() { # main() { # Mount the /proc and /sys filesystems. - mount -t tmpfs none /run - mount -t devtmpfs none /dev - mount -t sysfs -o nodev,noexec,nosuid sysfs /sys - mount -t proc -o nodev,noexec,nosuid proc /proc + mount -t tmpfs none /run + mount -t sysfs -o nodev,noexec,nosuid sysfs /sys + mount -t proc -o nodev,noexec,nosuid proc /proc + mount -t devtmpfs none /dev + mount -t devpts devpts /dev/pts + mount -t tmpfs shm /dev/shm local fakeroot='/mnt/root' @@ -212,6 +214,12 @@ main() { /bin/bash -i fi + # Modprobe atkbd to ensure user can type password + for i in dm-crypt i8042 atkbd; do + printf 'Loading required module [%s]\n' "${i}" + modprobe "${i}" || printf 'Failed loading %s\n' "${i}" + done + if cryptsetup isLuks "${ROOTDEV}"; then # Set new rootdev location (/dev/mapper/something). This will update it to # the decrypted block device path. |