You are not logged in.
Pages: 1
Hi,
I'm running Arch on LVM on LUKS on my laptop. I use a keyfile to unlock the LUKS partitions. So, I'd like to modify the encrypt hook to not ask for a passphrase if it doesn't find any key file.
But my problem is : how can I stop the boot sequence in a hook ? I'd like to prevent it from booting up further if there's no keyfile and display an error message. I played with exit command... without success. I only manage to get a kernel panic error because the system can't go on without rootfs partition.
Thanks.
Offline
While this does not answer your question, asking for a password is pretty much what I'd call a stopped boot process. You can then ctrl+alt+del and fix the problem.
Offline
Yes, I agree with you. Asking for a password is a way to stop the boot process.
But :
- First, I don't use passphrases. So I'd prefer to directly jump to a rescue shell or stop the boot process in this case.
- Second, if I can stop the boot process, I can return an error message which won't reveal at first sight that my hard drive is encrypted. This can be important for people searching for a "plausible deniability" thing.
The only thing I managed to do now is using some sleep, pause and while to stop the boot process. Just as it does while asking for a passphrase, but without prompting for it.
Offline
Yes, I agree with you. Asking for a password is a way to stop the boot process.
But :
- First, I don't use passphrases. So I'd prefer to directly jump to a rescue shell or stop the boot process in this case.
- Second, if I can stop the boot process, I can return an error message which won't reveal at first sight that my hard drive is encrypted. This can be important for people searching for a "plausible deniability" thing.The only thing I managed to do now is using some sleep, pause and while to stop the boot process. Just as it does while asking for a passphrase, but without prompting for it.
Instead of calling the function named "launch_interactive_shell", or just launching a shell like jjakcy suggested, I would simply comment out lines in /usr/lib/initcpio/hooks/encrypt which are responsible for asking for a passphrase.
That way you'll automatically drop to the interactive shell the intended way.
edit: ... and to stop the boot completely you could perhaps add a "halt --halt --force" to make it appear like everything just froze. While you're at it you could also add this classic error message:
clear
while read ; do
echo "DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER."
sleep 1
done
Last edited by oeufcoque (2012-11-09 23:52:30)
Offline
Pages: 1