LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-01-2016, 10:15 AM   #1
dab1414
Member
 
Registered: May 2011
Location: OK, USA
Distribution: Slackware 14.1_64
Posts: 71

Rep: Reputation: 51
slackware-current encryption ??


So I have been playing with LUKS and LVM for the first time. I stupidly did not install the x86_64 version, so I will be redoing install later. So I did get everything to install correctly and working, following this. 2 separate drives, both encrypted except the boot partiton. My data partition (sdb1) I was able to create a keyfile, add entry into /etc/crypttab, and it works automatically when booting up.

I want to have option to have a keyfile on a usb thumb drive, and when booting that will unlock the encrypted root partition (sda2).

So far I have created a keyfile and placed on usb drive
Code:
cryptsetup luksAddKey /dev/sda /path
and verified I added the slot
Code:
cryptsetup luksDump /dev/sda
then in lilo added
Code:
append = "cryptdevice=/dev/sda2:root cryptkey=/dev/disk/by-uuid/XXXX-XXXX:vfat:cph
the X's are replaced with actual uuid, and on usb drive there is nothing on there except the keyfile that i named cph.
using the generic kernel 4.4.11 with initrd

ran lilo
when reboot it just hangs until i manually type in a passphrase. but I did notice that the usb drive gets loaded after my encrypted root.

not sure if I missed a step or maybe its just pebkac, but would like to try and figure out what I need to do to make this work.
 
Old 06-01-2016, 11:27 AM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,135

Rep: Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831Reputation: 3831
What did your mkinitrd command look like? Maybe it isn't loading all the needed modules for your USB drive and has to wait until the drive is unlocked before it can access those additional modules.
 
Old 06-01-2016, 11:56 AM   #3
dab1414
Member
 
Registered: May 2011
Location: OK, USA
Distribution: Slackware 14.1_64
Posts: 71

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by bassmadrigal View Post
What did your mkinitrd command look like? Maybe it isn't loading all the needed modules for your USB drive and has to wait until the drive is unlocked before it can access those additional modules.
I dont remember exactly but i used

Code:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -r
But the result had the options for luks, lvm, and other stuff like the keyboard


Here is the, to me, odd thing, so in boot it gives me prompt for the passphrase for root partition, when I leave it alone it looks like it loaded up all remaining partions. It listed for sure my external NTFS drive and the fat32 thumb drive (that has the keyfile) both usb.

I am probably going to install the slackware64-current tonight, then i could to share logs and such. Just trying to see if there was something I might have forgot to do.
 
Old 06-02-2016, 05:40 PM   #4
dab1414
Member
 
Registered: May 2011
Location: OK, USA
Distribution: Slackware 14.1_64
Posts: 71

Original Poster
Rep: Reputation: 51
So I just did some digging around, determined that what I needed was to do this in initrd not as kernel parameters in lilo. So looking in the manpage for mkinitrd is the answer: with the mkinitrd_comman_generator.sh result I added following to it
Code:
-K UUID=XXXX:XXXX:/path/to/file
ran that then lilo and reboot and all is good
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware ARM (current) epic mistake: the current Android kernels are kicked out! Darth Vader Slackware 16 08-25-2013 04:36 PM
Is quantum computing a threat to current encryption technology? sneakyimp Linux - Security 5 06-11-2013 11:16 AM
[SOLVED] setup fails on most current Slackware-current March 26, 2012 AlleyTrotter Slackware 15 04-09-2012 06:05 AM
[SOLVED] Script to build always a current ISO image of Slackware (slackware-current) robertjinx Slackware 2 12-09-2010 02:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration