LinuxQuestions.org
Visit Jeremy's Blog.
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 01-01-2020, 12:19 PM   #1
slkw
LQ Newbie
 
Registered: Nov 2019
Posts: 22

Rep: Reputation: Disabled
Install Slackware with hard drive encryption


Hi folks,
I've got an extra PC that I can install Slackware onto, but I'd like to set up hard drive encryption (LUKS) before the installation so that the root filesystem is encrypted from the start, like what you see is possible with Debian.
Can anyone here suggest a strategy for accomplishing this?
Thanks.
 
Old 01-01-2020, 12:31 PM   #2
cwizardone
LQ Guru
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib."
Posts: 5,295
Blog Entries: 1

Rep: Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779
Check here,

http://slackware.oregonstate.edu/sla...ADME_CRYPT.TXT
 
1 members found this post helpful.
Old 01-01-2020, 12:42 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,215

Rep: Reputation: Disabled
In addition, check there. As an aside, LUKS2 should be supported by GRUB soon, a patch set from Patrick Steinhardt is being reviewed for that, cf. its summary. For now it will allow the PBKDF2 key derival function only, hopefully Argon2i and/or Argon2id will follow suit.

As an aside, Daniel Kiper checks the patches very thoroughly, so expect no issue after this set will have been committed.

Last edited by Didier Spaier; 01-01-2020 at 12:47 PM.
 
2 members found this post helpful.
Old 01-04-2020, 08:13 PM   #4
slkw
LQ Newbie
 
Registered: Nov 2019
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cwizardone View Post
This is a pretty good primer on doing the encrypted root (which is my goal) however
I am seeing a problem when following their steps: The kernel never asks for a password
and it therefore never boots. I chose the "generic" kernel.
 
Old 01-05-2020, 04:00 AM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,851

Rep: Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505Reputation: 6505
Quote:
Originally Posted by slkw View Post
This is a pretty good primer on doing the encrypted root (which is my goal) however
I am seeing a problem when following their steps: The kernel never asks for a password
and it therefore never boots. I chose the "generic" kernel.
The kernel does not unlock your LUKS encrypted volumes... when booting with a generic kernel plus an initrd, the 'init' script in the initrd unlocks your root filesystem: https://git.slackware.nl/current/tre...itrd/init#n191 and then afterwards, the rc.S script unlocks the rest: https://git.slackware.nl/current/tre...ripts/rc.S#n99

If you never get that password prompt, what is the exact "mkinitrd" command you used to generate your initrd?
 
1 members found this post helpful.
Old 01-05-2020, 12:01 PM   #6
slkw
LQ Newbie
 
Registered: Nov 2019
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Alien Bob View Post
If you never get that password prompt, what is the exact "mkinitrd" command you used to generate your initrd?
I'm using the same as the OSU web page suggests, but modified for slackware64 current's kernel.

mkinitrd -c -k 4.4.14-smp -m ext4 -f ext4 -r lukssdx2 -C /dev/sdx2

UPDATE

I've gotten it to boot to the point that I can enter the password and unlock it. The key seems to have been to specify vmlinuz-generic as the kernel in lilo.conf.

However bizarrely whereas I specified my encrypted partition be named "rooty" the boot system wants to call it lukssda2 and therefore won't continue.

SOLUTION

I fixed it by
A) using the name they expected lukssda2.
B) specifying vmlinuz-generic in lilo.conf, leaving out the kernel version number.

Last edited by slkw; 01-05-2020 at 03:29 PM.
 
Old 01-05-2020, 02:03 PM   #7
Tonus
Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-current
Posts: 631
Blog Entries: 3

Rep: Reputation: 162Reputation: 162
Install Slackware with hard drive encryption

Edit : Do not pay attention

Last edited by Tonus; 01-05-2020 at 02:38 PM.
 
Old 01-06-2020, 04:30 AM   #8
wigums
Member
 
Registered: Oct 2013
Location: Detroit
Distribution: slackware and raspbian
Posts: 91

Rep: Reputation: Disabled
https://slackwiki.com/LVM/Luks_Encryption
 
  


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
[SOLVED] Non-system partition encryption versus container-file encryption of equal size Ulysses_ Linux - Security 13 07-17-2015 08:38 PM
I want to copy my hard drive to a larger hard drive and boot from the new drive. lpmorgan1 Ubuntu 8 09-08-2009 12:26 AM
Linux password encryption and data encryption Tux-Slack Programming 4 06-20-2007 07:46 AM
New install on new hard drive messed up old install of old hard drive. AbsoluteMonkey Linux - General 26 01-10-2007 01:21 PM
Mandrake 9.0 Wireless Works without encryption.. does not with encryption topcat Linux - Wireless Networking 3 05-04-2003 09:47 PM

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

All times are GMT -5. The time now is 04:17 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