[SOLVED] GRUB with encrypted drive asks for password twice
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I set up a new desktop with Slackware - encrypted drive, un-encrypted /boot/efi partition, using grub2 as bootloader. I've found several threads online about dealing with entering the luks password twice, but mostly distros using initramfs and systemd.
Anyone solve this on Slackware?
Entering luks PW once (as with ELILO) would be my desired outcome.
Ah, so one can only use the first partition of the USB stick?
I was having trouble making it locate, via LABEL, the second partition of my USB stick.
I don't know, as I didn't test a usb with multiple partitions. I specified "partition 1" so that if someone came across this thread, it would be clear I used the UUID of the partition (e.g. /dev/sdb1) rather than the UUID of the USB device itself (e.g. /dev/sdb).
I didn't get it to work with LABEL at all, although after a few failures I simply switched to using UUID which is my preference in other configs anyway. In other words, I can't definitely say LABEL doesn't work, but it didn't for me.
I don't know, as I didn't test a usb with multiple partitions. I specified "partition 1" so that if someone came across this thread, it would be clear I used the UUID of the partition (e.g. /dev/sdb1) rather than the UUID of the USB device itself (e.g. /dev/sdb).
I didn't get it to work with LABEL at all, although after a few failures I simply switched to using UUID which is my preference in other configs anyway. In other words, I can't definitely say LABEL doesn't work, but it didn't for me.
Update: As it turns out for me, I can't get it to detect any USB drive, regardless if I use LABEL or UUID, whether the drive is FAT or some other filesystem type. It will detect SATA drives' partitions, though.
There is a "sleep 3" on line 620 of mkinitrd; I'm wondering if my USB drives need more time to get online so they'll be detected.
Update: As it turns out for me, I can't get it to detect any USB drive
Are you generating the initrd using the full output of mkinitrd_command_generator.sh? Remember that the -K [...] options are added to the full output of the generator script.
Are you generating the initrd using the full output of mkinitrd_command_generator.sh? Remember that the -K [...] options are added to the full output of the generator script.
Ok, well Slackware includes a handy script called mkinitrd_command_generator.sh that might help.
chroot into your slackware install and run:
Code:
sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic
This will output a customized mkinitrd command that may be quite long. Then retype that command verbatim to your prompt so you can actually execute it. Copy 'everything within the single quotes'
You can then append the -K UUID option to the end of the command.
sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic
This will output a customized mkinitrd command that may be quite long. Then retype that command verbatim to your prompt so you can actually execute it. Copy 'everything within the single quotes'
The "-m" option of my output includes many kernel modules:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.