LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Initrd requires LVM option for RAID/LUKS root partition (https://www.linuxquestions.org/questions/slackware-14/initrd-requires-lvm-option-for-raid-luks-root-partition-4175589693/)

TracyTiger 09-18-2016 06:03 PM

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?

STDOUBT 09-18-2016 11:18 PM

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?

TracyTiger 09-19-2016 12:09 AM

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 (Post 5607105)
Also, is your goal to use encryption without LVM?

Yes, that's correct. I'm using LUKS on top of RAID1 without LVM.

TracyTiger 09-19-2016 12:13 AM

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?

Alien Bob 09-19-2016 02:52 AM

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.

TracyTiger 09-19-2016 03:31 AM

@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.


All times are GMT -5. The time now is 04:48 PM.