Talk:Persistent block device naming

From ArchWiki
Jump to: navigation, search

systemd-boot entry with label

Should we add a systemd-boot entry using LABEL to the bottom section? --Betseg (talk) 15:17, 29 July 2015 (UTC)

Could do, but it might also be worthwhile to consider slim down that section and crosslink more instead. Or, as a first step, you could convert the LABEL example at the end to a systemd-boot one and crosslink it to Systemd-boot#Standard root installations for the additional info there. --Indigo (talk) 20:35, 29 July 2015 (UTC)
Plus, there is already Kernel parameters#Configuration. -- Lahwaacz (talk) 06:20, 30 July 2015 (UTC)

Using persistent naming > Boot managers

This is suggested:

root=/dev/disk/by-label/root_myhost

Alongside with:

root=LABEL=root_myhost

According to https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Configuring_the_boot_loader, this "naming" is expected by the cryptdevice kernel parameter of the cryptsetup mkinitcpio's hook. So I used a small variation on my computer:

cryptdevice=/dev/disk/by-partlabel/root_myhost

And once in a few reboots, cryptsetup's hook can't find the disk! However, the following, supposed to be equivalent, works fine:

cryptdevice=PARTLABEL=root_myhost

So I suggest replacing every /dev/disk/ by either PARTLABEL, PARTUUID, LABEL or UUID, either in those examples, or here https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Configuring_the_boot_loader.

As reference, the function used by cryptsetup's hook to parse the cryptdevice parameter: https://git.archlinux.org/mkinitcpio.git/tree/init_functions#n325.

—This unsigned comment is by Arshlinux (talk) 17:53, 21 October 2017‎. Please sign your posts with ~~~~!

This section suggests cryptdevice=UUID=<device-UUID>:cryptroot, not cryptdevice=/dev/disk/by-uuid/<device-UUID>:cryptroot, so I don't see the point of your proposal. -- Lahwaacz (talk) 18:12, 21 October 2017 (UTC)
Oh you are right, and because PARTLABEL= was missing I must have used /dev/disk/by-partlabel instead of PARTLABEL. In this case I suggest adding PARTLABEL, PARTUUID and LABEL to UUID in this section. -- Arshlinux (talk) 21:40, 21 October 2017 (UTC)
That section has one simple example using UUID and links to Persistent block device naming for the other options, so it should be solved on this page. I see that you've added an example, so let's close this. -- Lahwaacz (talk) 14:01, 22 October 2017 (UTC)
Let me reformulate, as always, I carefully visit the wiki and I first read:
cryptdevice=device:dmname
https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration#cryptdevice


and then on the linked page the following example:
root=/dev/disk/by-label/root_myhost
https://wiki.archlinux.org/index.php/Persistent_block_device_naming#Boot_managers


So I write
cryptdevice=/dev/disk/by-partlabel/root_myhost
instead of the only thing that works every boot, which is:
cryptdevice=PARTLABEL=root_myhost
We should mention it somewhere. -- Arshlinux (talk) 14:15, 22 October 2017 (UTC)
Yes, you have mentioned it here. -- Lahwaacz (talk) 17:42, 22 October 2017 (UTC)
I did not mention that cryptdevice=/dev/disk/by-partlabel/root_myhost does not work though :) -- Arshlinux (talk) 20:23, 22 October 2017 (UTC)