mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Unlock encrypted root partition over SSH
This commit add a new feature for Debian-based distributions to unlock encrypted root partition over SSH. This feature is very handy on headless NAS or VPS cloud servers. To use this feature, you will need to install the dropbear-initramfs package. Reviewed-By: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-By: Tom Caputi <tcaputi@datto.com> Signed-off-by: Andrey Prokopenko <job@terem.fr> Signed-off-by: Richard Laager <rlaager@wiktel.com> Closes #10027
This commit is contained in:
committed by
Brian Behlendorf
parent
746d22ee02
commit
1cc635a2dd
@@ -1 +1,2 @@
|
||||
zfs
|
||||
zfsunlock
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
hooksdir = /usr/share/initramfs-tools/hooks
|
||||
|
||||
hooks_SCRIPTS = \
|
||||
zfs
|
||||
zfs \
|
||||
zfsunlock
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(top_srcdir)/contrib/initramfs/hooks/zfs.in
|
||||
$(top_srcdir)/contrib/initramfs/hooks/zfs.in \
|
||||
$(top_srcdir)/contrib/initramfs/hooks/zfsunlock.in
|
||||
|
||||
$(hooks_SCRIPTS):%:%.in Makefile
|
||||
-$(SED) -e 's,@sbindir\@,$(sbindir),g' \
|
||||
|
||||
@@ -21,6 +21,7 @@ COPY_FILE_LIST="$COPY_FILE_LIST @udevruledir@/69-vdev.rules"
|
||||
# These prerequisites are provided by the base system.
|
||||
COPY_EXEC_LIST="$COPY_EXEC_LIST /usr/bin/dirname /bin/hostname /sbin/blkid"
|
||||
COPY_EXEC_LIST="$COPY_EXEC_LIST /usr/bin/env"
|
||||
COPY_EXEC_LIST="$COPY_EXEC_LIST $(which systemd-ask-password)"
|
||||
|
||||
# Explicitly specify all kernel modules because automatic dependency resolution
|
||||
# is unreliable on many systems.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
PREREQ="dropbear"
|
||||
|
||||
prereqs() {
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
copy_exec /usr/share/initramfs-tools/zfsunlock /usr/bin
|
||||
Reference in New Issue
Block a user