You are not logged in.

#1 2020-05-07 01:12:43

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

[Solved] boot loader kernel parameter device naming convention

Hi Guys,

I may have come across a possible inconsistency in the resume (hibernation) kernel parameter device name, or perhaps I've simply misunderstood it. Regardless, I need assistance in which way to go. Thanks.

I'm planning on installing Arch soon, and currently collating the instructions.
System will be using systemd-boot and LVM on LUKS.

Disk layout will be:
/dev/nvme0n1p1   Boot partition
/dev/nvme0n1p2   LVM LUKS partition
/dev/volgroup0/lv_root
/dev/volgroup0/lv_home
/dev/volgroup0/lv_swap


Wiki instructions
Wiki page 1. Boot loader wiki page
https://wiki.archlinux.org/index.php/Dm … oot_loader

In the Boot loader section, instructions state:

root
the device mapper for it will be in the general form of root=/dev/volumegroup/logicalvolume

resume
it will be in the form of /dev/mapper/swap

Wiki page 2. Power Management wiki page
https://wiki.archlinux.org/index.php/Po … ibernation

In the Hibernation/Required kernel parameters section, instructions state:

resume=/dev/archVolumeGroup/archLogicalVolume -- if swap is on a LVM logical volume

Generally, it is preferred to use the same naming method for both the resume and root parameters. 

Question 1:
Does it matter which naming convention I use for the swap volume?  dev/mapper/swap  or  /dev/archVolumeGroup/archLogicalVolume
I suspect it doesn't matter, therefore either is fine.
I'd prefer: /dev/volgroup0/lv_swap
If I had to use /dev/mapper, I assume the correct name for this would be: /dev/mapper/volgroup0-lv_swap



Question2: (unrelated)
https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS

In the LVM on LUKS/Configuring mkinitcpio section:

The HOOKS line (the first hooks like, i.e. using encrypt), reads:

HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)

I've noticed the keyboard module is near the front of the line (4th module), but in a fresh Arch install, it's near the end of the line (2nd last module).
Does the order of this particular module matter? E.g. perhaps the keyboard needs to be read early on?

Last edited by pete_mav_mitchell (2020-05-07 22:51:49)

Offline

#2 2020-05-07 04:07:24

Awebb
Member
Registered: 2010-05-06
Posts: 6,563

Re: [Solved] boot loader kernel parameter device naming convention

Q2:

Your link has the answer!

"See dm-crypt/System configuration#mkinitcpio for details and other hooks that you may need". The hooks and the order are explained there.

Offline

#3 2020-05-07 04:45:27

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [Solved] boot loader kernel parameter device naming convention

Thanks bro, I had missed that - Q2 answered!

Awebb wrote:

Q2:

Your link has the answer!

"See dm-crypt/System configuration#mkinitcpio for details and other hooks that you may need". The hooks and the order are explained there.

Offline

#4 2020-05-07 08:03:28

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,092
Website

Re: [Solved] boot loader kernel parameter device naming convention

Q1: If you have the LVM inside a LUKS container, use /dev/archVolumeGroup/archLogicalVolume.     # <-- You obviously did that!
If you have the LUKS container(s) on the LVM volumes*, you'd wanna use the /dev/mapper approach.

* I'd not recommend doing that due to performance and security issues.

Last edited by schard (2020-05-07 08:05:37)


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#5 2020-05-07 09:44:39

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [Solved] boot loader kernel parameter device naming convention

Thanks, going with that.

schard wrote:

Q1: If you have the LVM inside a LUKS container, use /dev/archVolumeGroup/archLogicalVolume.     # <-- You obviously did that!
If you have the LUKS container(s) on the LVM volumes*, you'd wanna use the /dev/mapper approach.

* I'd not recommend doing that due to performance and security issues.

Offline

#6 2020-05-07 09:50:08

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [Solved] boot loader kernel parameter device naming convention

If it helps someone out, here are the details (which I should have posted in the initial post):

/etc/mkinitcpio.conf

...
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 resume filesystems fsck)
...
...

/boot/loader/entries/arch-lts.conf

title   Arch Linux LTS
linux   /vmlinuz-linux-lts
initrd  /intel-ucode.img
initrd  /initramfs-linux-lts.img
options cryptdevice=UUID={UUID}:lvm resume=/dev/volgroup0/lv_swap root=/dev/volgroup0/lv_root rw quiet

Thanks again guys for your help!

Offline

Board footer

Powered by FluxBB