diff --git a/root/etc/initcpio/hooks/lukskeyfile b/root/etc/initcpio/hooks/lukskeyfile index fce69a5..4189ede 100644 --- a/root/etc/initcpio/hooks/lukskeyfile +++ b/root/etc/initcpio/hooks/lukskeyfile @@ -1,8 +1,8 @@ #!/bin/ash run_hook() { + # This is a needed kernel parameter for this hook if [ -n "$lukskeyfile" ]; then - # This is a needed kernel parameter for this hook modprobe -a -q loop dm-crypt >/dev/null 2>&1 # Refer to help from `mkinitcpio -H lukskeyfile`. IFS=: read rootKeyDev rootKey cryptkeyLoc </dev/null 2>&1; then + # Copy the keyfile present in the device into the + # ramfs filesystem to be read by dm-crypt cat "/mnt/${rootKey}" > "${cryptkeyLoc}" else echo "Failed to mount ${rootKeyDev} on /mnt"