View previous topic :: View next topic |
Author |
Message |
FastTurtle Guru
Joined: 03 Sep 2002 Posts: 500 Location: Flakey Shake & Bake Caliornia, USA
|
Posted: Sun Apr 05, 2015 2:41 pm Post subject: EFI Stub Kernel Questions |
|
|
I'm currently working up a test install on a flash drive so have a few questions
Will be booting an EFI Stub kernel directly thus the kernel command line is needed. According to the Wiki Guide, I can either pass it the root=/dev/sdx option (changes due to multiple systems) or the partuuid. Another option I vaguely recall is to pass root="label" option since the partition should have a label set when the drive is configured - Only works with GPT configured disks though.
Question is, can we use the part label on the kernel command line instead of the partuuid?
It's the solution I use with fstab - by-label instead of device (unless that's changed in the last couple of years). |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1483
|
Posted: Sun Apr 05, 2015 7:46 pm Post subject: |
|
|
/usr/src/linux/init/do_mounts.c Code: | * Convert a name into device number. We accept the following variants:
*
* 1) <hex_major><hex_minor> device number in hexadecimal represents itself
* no leading 0x, for example b302.
* 2) /dev/nfs represents Root_NFS (0xff)
* 3) /dev/<disk_name> represents the device number of disk
* 4) /dev/<disk_name><decimal> represents the device number
* of partition - device number of disk plus the partition number
* 5) /dev/<disk_name>p<decimal> - same as the above, that form is
* used when disk name of partitioned disk ends on a digit.
* 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
* unique id of a partition if the partition table provides it.
* The UUID may be either an EFI/GPT UUID, or refer to an MSDOS
* partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero-
* filled hex representation of the 32-bit "NT disk signature", and PP
* is a zero-filled hex representation of the 1-based partition number.
* 7) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation to
* a partition with a known unique id. |
6) would look like in your /proc/cmdline:
root=PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF
Be aware:
MSDOS PARTUUIDs may be also available on gpt partitioned disks, if you used gfdisk hybrid mode for example. But they surely have different strings for the same identical partition! If you start with an gpt unaware kernel you won't find your gpt UUID. Regarding my /etc/fstab I stick to filesystem labels, which can be found at /dev/disk/by-label and are - in contrast to /dev/disk/by-partlabel - unaware of gpt. |
|
Back to top |
|
|
FastTurtle Guru
Joined: 03 Sep 2002 Posts: 500 Location: Flakey Shake & Bake Caliornia, USA
|
Posted: Tue Apr 07, 2015 3:50 am Post subject: Solved |
|
|
Was able to answer my own question - No the kernel does not understand/use GPT PART-LABELS. This avoids possible confusion as they can be duplicated on a system.
This means I will be using the root=partuuid= on the kernel command line (stub kernel) since it ensures the system can boot.
As I'm already extracting the partuuid, I've decided to follow the same for fstab "/dev/by-partuuid/" for each of the partitions as they wont be changing even when using the flash drive on other UEFI systems and I've already seen my desktop indicate /dev/sdd - /dev/sde - /dev/sdf depending on the USB port it's plugged into. |
|
Back to top |
|
|
|