Slackware on lvm+luks - unavailable for unlocking
Hey, folks.
I've just installed Slackware according to this notes. My setup is elilo + full disk encryption (lvm on luks). What I did: 1. Created two partitions: 512M ESP Fat32 (/dev/sdb1) and 250G raw for LUKS (/dev/sdb2). 2. Created and opened luks. 3. Created physical, group and logical volumes (root, swap, home). 4. Installed Slackware and elilo with new efi record. 5. Without rebooting after installation was finished I chrooted and used Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -a '-o /boot/efi/EFI/Slackware/initrd.gz | tail -1 | sh 6. Checked if /boot/vmlinuz-generic-5.4.41 and /boot/efi/EFI/Slackware/vmlinuz are the same. 7. Just in case copied /boot/efi/EFI/Slackware/initrd.gz to /boot/initrd.gz So my final config setup looks like this Code:
cat /boot/efi/EFI/Slackware/elilo.conf 1. initrd.gz loads from /boot (not from /boot/efi/EFI/Slackware). 2. All modules loads without a problem (I see insmod /lib/modules/5.4.41/... on display). 3. Error Code:
LUKS device /dev/sdb2 unavailable for unlocking! My questions are: 1. Why loads /boot/initrd.gz when in elilo.conf I have initrd.gz not in /boot, but in elilo dir (/boot/efi/EFI/Slackware)? 2. Since initrd.gz in /boot and in /boot/efi/EFI/Slackware are the same and they have been created by mkinitrd_command_generator, why the problem with decryption appears? 3. How to fix it? |
Is your LUKS device still called /dev/sdb2 when you are booting that computer?
If it is, did you perform a full installation of Slackware or did you skip packages? To try whether cryptsetup in your initrd works, reboot, and then after getting the error message you will be dropped to a shell prompt. Type "cryptsetup" to see if that command is working at all, or whether it is missing any libraries. |
Thanks for reply.
In emergency shell (let's call it this way) I executed Code:
ls /dev No, I did not perform a full installation. I skipped kernel sources, KDE and XFCE packages. Cryptsetup works in emergency shell. |
Is that /dev/sdb an external USB drive? If so, it may be too slow to be recognized in time as a storage device.
The mkinitrd command has a "wait" parameter, for instance adding "-w 10" will cause the init process to wait 10 seconds which could be sufficient for the USB subsystem to recognize your disk. Like so: Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -r -a '-w 10 -o /boot/efi/EFI/Slackware/initrd.gz' | sh |
It's external sata ssd, that is connected via usb3. I've just tried to make initrd with your command, but it doesn't take any effect, except +10 seconds to boot time. I've tried 30 seconds as well - still no result.
If it matters, I've installed arch with lvm+luks on this devices exactly in the same manner. That time I didn't experience any problems. |
Btw, even with -w 30 I don't see sdb device in /dev. It looks working (led is flashing). In UEFI I can see this disk. Actually, last time initrd.gz was loaded from a proper location - /boot/efi/EFI/Slackware, therefore sdb was recognized on boot.
|
There's also the possibility that your initrd does not have the modules to support USB storage. That would explain why you never see the device nodes appear.
|
Hmm... I unpluged ssd from box and connected it to m/b sata. It was identified as sdb, however, I still get this error when I try to boot.
|
Does anybody have experience with installing Slackware on lvm+luks? Does it work?
|
Two more unsuccessful attempts to install Slackware on lvm+luks. This time I've tried to install on sata ssd and m2 ssd. Both times I get exactly the same error but with different partitions. Looks like notes I mentioned doesn't cover some necessary step or Slackware (at least current) doesn't support working from encrypted device.
|
Luks and LVM works fine here.
However, I use lilo and a manually created initrd. My mkinitrd command looks like this: Code:
mkinitrd -c -k 5.4.42 -f ext2,ext4 -r /dev/cryptvg/root -C /dev/sda2 -L -d de Code:
append=" vt.default_utf8=0" |
Quote:
|
Don't know what to say. Could be an issue of current iso I used. Will try with another one later.
|
The error you get is generated when "cryptsetup isLuks /dev/sdb2" returns false. I.e. your disk partition is not recognized as a LUKS volume.
Did you do something out of the ordinary when formatting /dev/sdb2 as a LUKS volume? Edit - well if your /dev/sdb is not visible at all, my remark is irrelevant. |
Quote:
Code:
boot |
All times are GMT -5. The time now is 05:51 AM. |