LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-15-2013, 07:35 PM   #1
l0rddarkf0rce
Member
 
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149

Rep: Reputation: 33
14.1: Problems with luks encrypted / partition


Here are the steps that I followed...

Code:
created 2 luks partitions 1 for / (/dev/sda3) and 1 for /home (/dev/sda4)
/dev/sda1 will be used /boot
/dev/sda2 swap

After installing:

$ chroot /mnt
$ echo "crypthome   /dev/sda4" > /etc/crypttab
$ echo "cryptswap   /dev/sda2   none   swap" >> /etc/crypttab

Changed /etc/fstab from

/dev/sdx3   swap   swap   defaults   0   0

to

/dev/mapper/cryptswap   swap   swap   defaults   0   0


$ mkinitrd -c -k 3.10.17 -m ext4 -f ext4 -r cryptroot -C /dev/sda3

Modified /etc/lilo.conf
  removed line root = ...
  added line initrd = /boot/initrd.gz

re-ran lilo and rebooted
After I get prompted for the cryptroot password I get

Code:
udevd[211]: failed to execute '/sbin/dmsetup' '/sbin/dmsetup udevflags 5163710': No such file or directory

udevd[212]: failed to execute '/sbin/dmsetup' '/sbin/dmsetup udevcomplete 5163710': No such file or directory
Any and all help will be appreciated
 
Old 11-15-2013, 07:51 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Best to read the "Combining LUKS and LVM" section of the README_CRYPT.TXT.
Here's a link:
http://slackware.osuosl.org/slackwar...ADME_CRYPT.TXT

There is no use of crypttab with the setup described there.
 
Old 11-16-2013, 05:29 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 7,151

Rep: Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306
As a workaround try adding -L to the mkinitrd command, which will force dmsetup to be included in the initrd. (You'll get lvm support along for the ride, but it won't hurt anything).

It seems mkinitrd needs some attention. Most people who use an encrypted root will do it on top of lvm, which is why I guess this didn't show up in testing.

Last edited by GazL; 11-16-2013 at 05:32 AM.
 
Old 11-16-2013, 10:37 PM   #4
l0rddarkf0rce
Member
 
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by GazL View Post
As a workaround try adding -L to the mkinitrd command, which will force dmsetup to be included in the initrd. (You'll get lvm support along for the ride, but it won't hurt anything).

It seems mkinitrd needs some attention. Most people who use an encrypted root will do it on top of lvm, which is why I guess this didn't show up in testing.
-L almost did the trick... I had to make 2 additional changes.

1. change /etc/fstab from

Code:
/dev/mapper/cryptroot / ext4 defaults 1 1
to

Code:
/dev/mapper/lukssda3 / ext4 defaults 1 1
and the mkinitrd command was changed to

Code:
mkinitrd -c -k 3.10.17 -m ext4 -f ext4 -r /dev/sda3 -C /dev/sda3 -L
Not sure why, but it did work I stole that line minus the -L from a box that I was running 14.0 and I had saved the mkinitrd command. For some reason on that 14.0 box the -L was not needed.

In any case many thanks to GazL (looks like mkinitrd does require some attention) and STDOUBT (i'll give LVM a try the next time that I do an install)
 
Old 11-17-2013, 04:15 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 7,151

Rep: Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306Reputation: 5306
I think you're hitting another bug in the initrd that was introduced by a recent change in behaviour of the boot-loader. I suggested a patch for it in the next post down from the one linked, but it wasn't used.

Quote:
Code:
mkinitrd -c -k 3.10.17 -m ext4 -f ext4 -r /dev/sda3 -C /dev/sda3 -L
That's the first time I've seen anyone use the auto-luksification feature of the -r option. Kudos.
 
  


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] Unlock LUKS encrypted partition with USB drive yenn Slackware 4 02-26-2013 04:39 PM
changing a LUKS encrypted partition's key Cultist Slackware 1 03-20-2012 12:13 PM
Problem with Encrypted Partition using LUKS on Debian michalng Debian 1 03-18-2011 03:04 PM
Recover encrypted LUKS partition itinlopez Linux - General 3 11-30-2008 02:20 AM
mount luks encrypted partition with kdm mattydee Slackware 2 01-28-2008 12:32 AM

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

All times are GMT -5. The time now is 03:50 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
Open Source Consulting | Domain Registration