LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-18-2016, 06:03 PM   #1
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Initrd requires LVM option for RAID/LUKS root partition


For the last few Slackware versions I've had to add the LVM option (-L) when creating the initrd for a RAID/LUKS root partition. Previously (a few versions ago) the LVM option was not required.

The disk layer ordering when I install Slackware is the usual; working from the bottom up: partitions, RAID, LUKS, file system.

I used my shiny new official Slackware64 14.2 DVD to install Slackware on a new computer and found that the '-L' option is still required, just as it was required in the last few versions of Slackware.

If I omit the '-L' option from the mkinitrd command I get the following error messages in 14.2 just AFTER entering the LUKS passphrase.

Code:
(retyped from screen, may contain a typo)
Enter Passphrase for /dev/md12:

<type something and hit ENTER>

udevd[558]: failed to execute '/sbin/dmsetup' '/sbin/dmsetup udevflags 5125460': no such file or directory

udevd[559]:failed to execute '/sbin/dmesetup' '/sbin/dmsetup udevcomplete 5125460': no such file or directory
Why is the -L option needed to make it work? I'm not using LVM.

A few years ago I believe I found this workaround (of adding -L) somewhere on the Internet when I couldn't get the newest Slackware version to boot. But I can't find any references to it now.

The mkinitrd command I used (retyped) ...
Code:
mkinitrd -c -k 4.4.14 -f ext4 -r cryptroot -m ext4:\
xhci-pci:ohci-pci:ehci-pci:\
xhci-hcd:uhci-hcd:ehci-hcd:\
usbhid:hid_generic\
 -C /dev/md12 -R -u -L -o /boot/initrd.gz
When run on my new computer the command /usr/share/mkinitrd/mkinitrd_command_generator.sh does NOT include the LVM option (-L) with its list suggested options.

Isn't this a BUG to require LVM functionality when not using LVM to boot?

BONUS QUESTION

The command generator lists the following modules with underscores:
Code:
hid_generic
hid_multitouch
But the load_kernel_modules file in the /boot/initrd-tree directory displays them with hyphens:
Code:
hid-generic
hid-multitouch
Are underscores and hypens interchangeable in module names regarding initrd creation?
 
Old 09-18-2016, 11:18 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Hello,
I'm not sure your assumptions are correct.
I suspect there is something else in your mkinitrd command line which is calling /sbin/dmsetup.
For the sake of completeness, can you show us your whole command?
Also, is your goal to use encryption without LVM?
And for clarity:
Quote:
When run on my new computer the command /usr/share/mkinitrd/mkinitrd_command_generator.sh does NOT include the LVM option (-L) with its list suggested options.
It is the output of /usr/share/mkinitrd/mkinitrd_command_generator.sh that you are attempting to use as your mkinitrd command line?
 
Old 09-19-2016, 12:09 AM   #3
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Original Poster
Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
For the sake of completeness, can you show us your whole command?
Hello STDOUBT!

The complete mkinitrd command was included in my post. That's all there is. Am I missing something in the command?

When the command generator is used it includes the following additional modules ...
Code:
i2c-hid:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:
hid-microsoft:hid_multitouch
The rest of the options are the same as in my post, except the command generator did NOT include the "-L" option.

I also ran the mkinitrd command exactly as specified by the command generator with the same results...only works when I add the "-L" option. I've ran about 10 trials with different settings of the mkinitrd command. (and re-ran lilo each time)

Remember I've had this problem for a few releases on a dozen different computers. Of course I could be making the same mistake for several years.

Quote:
Originally Posted by STDOUBT View Post
Also, is your goal to use encryption without LVM?
Yes, that's correct. I'm using LUKS on top of RAID1 without LVM.
 
Old 09-19-2016, 12:13 AM   #4
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Original Poster
Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
I suspect there is something else in your mkinitrd command line which is calling /sbin/dmsetup.
Are you referring to the "-C /dev/md12" option in the mkinitrd command?
 
Old 09-19-2016, 02:52 AM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Yeah, the device mapper (dmsetup) is also used for LUKS encryption. And that one only gets added with the "-L" parameter, not by just providing a "-C" parameter.

So either the mkinitrd documentation & man page should be amended with the instruction to add "-L" if you want to use LUKS encryption, or else the mkinit script will have to be modified so that dmsetup is copied into the initrd image whenever LUKS support is requested.

I'll have to discuss that with Pat.

And yes, with regard to the kernel modules the underscores and hyphens are interchangable.
 
2 members found this post helpful.
Old 09-19-2016, 03:31 AM   #6
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Original Poster
Rep: Reputation: 273Reputation: 273Reputation: 273
@Alien Bob - Thanks for the explanation.

So the "-L" option stands for LUKS and LVM.

Thanks for looking for a solution. I'll mark this thread as solved.
 
  


Reply



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
custom kernel initrd for LVM on LUKS MEC75 Slackware 16 11-11-2014 10:42 AM
[SOLVED] Initrd for kernel 3.8.11 and encrypted luks root partition in current Phorize Slackware 8 06-15-2013 09:04 AM
[SOLVED] LUKS / LVM2: Root partition unable to boot, initrd errors ADX Slackware 5 01-13-2012 04:57 PM
Encrypted root with LUKS on LVM and RAID-1: How? gargamel SUSE / openSUSE 5 03-20-2010 04:30 PM
Slackware 12.2 + RAID-1 + LVM + LUKS encrypted root gargamel Slackware 35 12-17-2009 11:25 AM

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

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