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 08-16-2013, 09:53 AM   #1
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 278

Rep: Reputation: 41
Kernel 3.10.7 breaks dm-crypt/Luks root volume


Just upgraded from Kernel 3.10.5 to 3.10.7 in current and now the root volume cannot be opened at boot. I get the prompt for the key phrase to unlock the volume, however it is not accepted and there is no prompt for subsequent key phrase entries.

I'm running vanilla current x86_64 updated as of Thu Aug 15 21:23:13 UTC 2013. Was there any changes on how luks volumes are handled in the current kernel?

Here is my mkinitrd command which worked for all previous kernel releases:
Code:
mkinitrd -c -k "3.10.7" -m ext4 -f ext4 -r lukssda2 -C /dev/sda2
 
Old 08-16-2013, 10:32 AM   #2
dolphin77
Member
 
Registered: May 2009
Location: Odesa, Ukraine
Distribution: Slackware
Posts: 211

Rep: Reputation: 70
Hi, tux dude,

I am running a bit different setup (more complicated with LVM and etc). But everything works fine here. For example, I make initrd from script:

Code:
mkinitrd -c -k $1 -u -m ext4 -f ext4 -r /dev/cryptvg/root -L -C /dev/sda3 -h /dev/cryptvg/swap -o /boot/initrd-$1.gz
And I have entry in lilo (but I have to manually edit on each kernel update):
Code:
image = /boot/vmlinuz-generic-3.10.7
#  root = /dev/cryptvg/root
  initrd = /boot/initrd-3.10.7.gz
  label = Linux
  read-only  # Partitions should be mounted read-only for checking
Maybe you missed something?
 
1 members found this post helpful.
Old 08-16-2013, 10:53 AM   #3
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 278

Original Poster
Rep: Reputation: 41
Mmmm...I've never had to specify the full path to the Luks volume or the initrd output. My mkinitrd command worked with all kernels up to 3.10.5. I wonder if the default path to the Luks volume changed on 3.10.7. Here is my lilo.conf:
Code:
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/mapper/lukssda2
  label = Slackware
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Will have to try again with full paths. Will let you know how it turns out.
 
Old 08-16-2013, 11:07 AM   #4
sardinha
Member
 
Registered: Aug 2012
Location: Portugal
Distribution: Slackware, Salix OS
Posts: 55

Rep: Reputation: 10
mkinitrd_command_generator.sh

Maybe the helper command of the mkinitrd will help you:
Code:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -r
I'm currently use this example:
Code:
# mkinitrd -c -k 3.10.7 -f ext4 -r /dev/cryptvg/root -m usb-storage:usbhid:intel_agp:i915:ext4 -C /dev/sda2 -L -u -o /boot/initrd.gz -h /dev/cryptvg/swap
I noticed some warnings in the initial boot sequence of the last kernel version when initrd loaded the modules: mbcache,jbd2 and ext4. But it runs ok anyway.

My lilo.conf it is similiar:

Code:
initrd = /boot/initrd.gz
root = /dev/cryptvg/root
read-only

image = /boot/vmlinuz
  label = Linux
Hope that will can help you.
 
2 members found this post helpful.
Old 08-16-2013, 11:10 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 7,114

Rep: Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268
Slackware's initrd stores the root filesystem path internally (taken from the -r option of mkinitrd). When you use an initrd, you don't want to include root= in lilo.conf.
 
1 members found this post helpful.
Old 08-16-2013, 11:27 AM   #6
sardinha
Member
 
Registered: Aug 2012
Location: Portugal
Distribution: Slackware, Salix OS
Posts: 55

Rep: Reputation: 10
Code:
# Linux bootable partition config begins
#root = /dev/cryptvg/root
initrd = /boot/initrd.gz
read-only

image = /boot/vmlinuz-generic-3.10.7
  label = Linux
No warnings at the boot now! thank you.
 
Old 08-16-2013, 06:32 PM   #7
morr
LQ Newbie
 
Registered: Aug 2013
Distribution: NetBSD, Slackware
Posts: 1

Rep: Reputation: Disabled
Looks like with new kernel cryptsetup will wait indefinitely for dmsetup. With older kernel it passed without problem, but now it hangs. Workaround would be to add -L switch to mkinit to add dmsetup binary.
 
1 members found this post helpful.
Old 08-16-2013, 07:23 PM   #8
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 278

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by morr View Post
Looks like with new kernel cryptsetup will wait indefinitely for dmsetup. With older kernel it passed without problem, but now it hangs. Workaround would be to add -L switch to mkinit to add dmsetup binary.
Morr, you got it. There is an error that /sbin/dmsetup cannot be found and it stops there. I add -L and -u (-u for good measure) to the mkinitrd command and now I can unlock the volume on boot.

Thank you all for the great suggestions. Also updated my lilo.conf and remove "root=".
 
Old 08-16-2013, 07:28 PM   #9
GazL
LQ Veteran
 
Registered: May 2008
Posts: 7,114

Rep: Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268Reputation: 5268
If you look in /sbin/mkinitrd you'll find that UDEV=1 is hard coded, so the -u option does absolutely nothing.
 
1 members found this post helpful.
Old 08-16-2013, 07:48 PM   #10
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 278

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by GazL View Post
If you look in /sbin/mkinitrd you'll find that UDEV=1 is hard coded, so the -u option does absolutely nothing.
-u removed...in order to keep things clean
 
Old 11-15-2013, 12:21 AM   #11
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by morr View Post
Looks like with new kernel cryptsetup will wait indefinitely for dmsetup. With older kernel it passed without problem, but now it hangs. Workaround would be to add -L switch to mkinit to add dmsetup binary.
After upgrading kernel from 2.6.37.6 to 3.10.17(slackware64 13.37), I had the same problem, this only happened to LUKS+LVM setup:

Code:
bio create slab bio-1 at 1
after entering pass-phrase correctly at first try, the system just hang there, spend days to figure out, try all different options in this thread, only figured out a work around by a accident, at first prompt for pass-phrase: just press enter, try enter correct pass-phrase at 2nd time or later, the system will continue booting.

need to upgrade lvm2 and udev packages to suit new kernel.

Last edited by number22; 11-15-2013 at 01:53 AM.
 
  


Reply

Tags
dm-crypt, kernel 3.10.7, luks


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
Different between Device Mapper and DM-Crypt and Cryptsetup , LUKS saeedsssss Linux - Software 1 10-01-2012 03:57 AM
The performance of plain dm-crypt versus LUKS TwinReverb Linux - General 1 12-05-2011 04:38 AM
luks dm-crypt + dd if=/dev/urandom. post-install Molly Debian 11 04-21-2008 11:30 AM
Public key crypto with LUKS/dm-crypt? keschrich Linux - Security 0 10-31-2006 04:01 PM
System encryption with dm-crypt and luks? Zmyrgel Slackware 9 09-02-2006 11:40 AM

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

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