[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Didier Spaier
Date: Fri, 20 Sep 2019 17:03:46 +0200

On 20/09/2019 15:23, Javier Martinez Canillas wrote:
On 9/20/19 2:42 PM, Daniel Kiper wrote:
On Thu, Sep 19, 2019 at 02:20:06PM +0200, Javier Martinez Canillas wrote:
Hello Daniel,

On 9/18/19 2:39 PM, Daniel Kiper wrote:
Adding Nicholas...

On Tue, Sep 17, 2019 at 05:48:45PM +0200, Javier Martinez Canillas wrote:
From: Peter Jones <address@hidden>

This will cause "search --fs-uuid --set=root ..." not to be generated by
grub2-mkconfig, and instead simply attempt to use the grub device name
as it understands it.

Signed-off-by: Peter Jones <address@hidden>
Signed-off-by: Javier Martinez Canillas <address@hidden>

We have this functionality in GRUB upstream. Please take a look at
commit 51be3372e (templates: Update grub script template files).
Could you pick it up in RH/Fedora?

That commit does something different if I'm reading it correctly. It's about
allowing to set the root kernel command line parameter to a PARTUUID instead
of a UUID or a device name, by using the grub-probe --target=partuuid option.

But Peter's patch is about setting the root param to a device name instead
of a UUID.

And also about not adding search commands in the grub.cfg to set the $root
and $boot grub environment variables by searching using a UUID.

Now digging more I found that there's already a GRUB_DISABLE_LINUX_UUID option

There are two variables: GRUB_DISABLE_LINUX_UUID and 

Yes. I didn't mention the GRUB_DISABLE_LINUX_PARTUUID variable because the 
command only has support to search using the UUID and not the PARTUUID.

It has support to search using the PARTUUID in case of a GPT, cf. commit

As an aside, it would be very useful to extend this support to dos
partition tables. I believe that all partition tools create a disk
identifier when creating a dos partition table (at least fdisk, cfdisk
and parted do) so if I am not mislead-ed all dos partitions should have
a partuuid in the form DisklabelPartitionnumber.

This would allow e.g. to find the root Linux partitions from a rescue
media, even if the kernel has no associated initrd.

Maybe Jacob could propose a patch for that, as he did for gpt?

for the first part, so we only need to add an option for the second part.


Since this is not about Linux not using a UUID but grub not using it, I think
that we should add another option as this patch does. So GRUB_DISABLE_LINUX_UUID
would disable using a UUID for the root param and GRUB_DISABLE_UUID would be
about disabling using a UUID to set the $root (and $boot) variables in grub.

GRUB_DISABLE_UUID=true probably should imply GRUB_DISABLE_LINUX_UUID=true also

OK but only if GRUB_DISABLE_LINUX_UUID is not set explicitly. And what

That's a good question. Would disabling using UUID mean "always use device name
for both GRUB and Linux" or "don't use the filesystem UUID for both GRUB and
Linux but allow Linux to use the partition UUID" ?

Peter's patch does the former. And yes, agreed that setting GRUB_DISABLE_LINUX*
to true should only be done if they weren't explicitly set.
I think. But I guess is OK to have separate options and the user could set both
if want to disable using the UUID for Linux and grub.

Another option is to extend GRUB_DISABLE_LINUX_UUID semantics and don't add
search commands if this is set to true, but I'm not sure if that's correct.

Hmmm... Probably I prefer former approach...

Agreed. I also prefer to introduce a new variable for this.


Best regards,

Best regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]