LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   LUKS partition not decrypted during boot (https://www.linuxquestions.org/questions/slackware-14/luks-partition-not-decrypted-during-boot-4175690739/)

nebulein 02-18-2021 09:00 AM

LUKS partition not decrypted during boot
 
Hi,

I am having a rather strange problem.

I just setup a laptop with slackware-current and wanted tu use an encrypted /home partition using LUKS/crypttab. I followed the instuctions in README_CRYPT.TXT. I have done this setup on multiple machines so far without any problems and it works.

The partition works, is properly decrypted and I can mount and use it normally. But Slackware does not prompt me for the password during boot.

rc.S is definitely invoked during boot, but it seems to ignore /etc/crypttab.

If I run rc.S after boot, it prompts me for the password. So rc.S is not broken.

Any ideas? Running Slackware-current from Feb 16 using the generic kernel 5.10.16. UEFI-Boot with elilo.


Thank you for your help!

Ben

GazL 02-18-2021 09:33 AM

Are you certain it's not asking you? Sometimes the prompt can be lost in amongst all the other boottime messages. I like to add 'quiet' to my kernel parameters because of this issue.

nebulein 02-18-2021 10:45 AM

Yes, I am certain. I have set a timeout of three minutes for the prompt. Booting takes like 15 seconds.

Additionally I echo some marker right before and after the crypttab section of rc.S to prevent me from missing anything. And there is just nothing in between the marker.

What strikes me is, that when invoked manually after boot, rc.S prompts me. Maybe some permission issue?

GazL 02-18-2021 11:55 AM

Fair enough, just wanted to rule out the basics.

If it's working when you run it manually, then the only thing I can think of would be some sort of timing issue, and that perhaps the device isn't ready by the time crypttab is being processed.

What sort of device is the luks container for /home stored on?

If you stick a 30 second sleep into rc.S just before crypttab does that help?

nebulein 02-19-2021 03:44 AM

Sleep doesn't help.

For now I put a little script that checks if /home is mounted into rc.local. If not it opens the decrypt dialogue and mounts it. Not nice, but functional.

Thank you for your help!


All times are GMT -5. The time now is 03:19 AM.