FS#50246 - [grub] grub-mkconfig generates an erroneous grub.cfg

Attached to Project: Arch Linux
Opened by Juan Simón (j1simon) - Wednesday, 03 August 2016, 16:53 GMT
Last edited by Christian Hesse (eworm) - Friday, 05 August 2016, 12:00 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Ronald van Haren (pressh)
Christian Hesse (eworm)
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

grub 1:2.02.beta3-1

When I generate grub.cfg with 'sudo grub-mkconfig -o /boot/grub/grub.cfg' it generates this config file: http://pastebin.com/BsXWBUjT

It fails to boot because this line "linux /vmlinuz-linux-ck root=UUID= rw acpi_osi=Linux", where is the UUID code?
If I disable UUID in grub (GRUB_DISABLE_LINUX_UUID=true), it ignores this setting and it generates the same line.
This task depends upon

Closed by  Christian Hesse (eworm)
Friday, 05 August 2016, 12:00 GMT
Reason for closing:  Fixed
Additional comments about closing:  grub 2.02.beta3-3
Comment by Juan Simón (j1simon) - Wednesday, 03 August 2016, 17:00 GMT
"If I disable UUID in grub (GRUB_DISABLE_LINUX_UUID=true), it ignores this setting and it generates the same line."

I just checked this also fails in the previous beta version of grub (1:2.02.beta2-6).
Comment by Juan Simón (j1simon) - Thursday, 04 August 2016, 17:16 GMT
It's weird but I've commented the line "GRUB_DISABLE_LINUX_UUID=true" and grub (1:2.02.beta2-6) still generates the grub.cfg with "root=/dev/sdb2".

My main disks are:
sdb1 ext2 boot 71a0c4af-e5cd-43da-a6c6-af0219327db9 /boot
└─sdb
sdb2 f2fs system ea54d4b3-a6f8-4141-96cd-481c8880b9ed /
└─sdb

Comment by Christian Hesse (eworm) - Thursday, 04 August 2016, 19:37 GMT
The relevant code that decides whether or not to use UUID is at /etc/grub.d/10_linux, starting from line 48.
Possibly we are missing parentheses there... Upstream git already has these.

Just to make sure... What do these commands return?

grub-probe --target=device /
grub-probe --device $(grub-probe --target=device /) --target=fs_uuid
Comment by Christian Hesse (eworm) - Thursday, 04 August 2016, 19:50 GMT
Please test grub 2.02.beta3-3.
Comment by Juan Simón (j1simon) - Friday, 05 August 2016, 08:55 GMT
Same error (there isn't UUID): "...
linux /vmlinuz-linux-ck root=UUID= rw ...
..."

And it still ignores the setting GRUB_DISABLE_LINUX_UUID.
Comment by Juan Simón (j1simon) - Friday, 05 August 2016, 08:56 GMT
Is this an error of grub itself or the implementation of grub in Arch?
Comment by Christian Hesse (eworm) - Friday, 05 August 2016, 09:15 GMT
This is with latest version from [testing]?

First of all... You should start reading my posts.
What do the commands return?
Comment by Juan Simón (j1simon) - Friday, 05 August 2016, 09:22 GMT
Sorry, I didn't read the previous post.
I don't install [testing] versions.

$ grub-probe --target=device /
/dev/sdb2

$ sudo grub-probe --device $(grub-probe --target=device /) --target=fs_uuid
grub-probe: error: unknown filesystem.
Comment by Christian Hesse (eworm) - Friday, 05 August 2016, 09:24 GMT
So what type is your root filesystem?
Comment by Juan Simón (j1simon) - Friday, 05 August 2016, 09:25 GMT Comment by Christian Hesse (eworm) - Friday, 05 August 2016, 11:11 GMT
Ah, missed that detail. :-p

Grub does not support f2fs, so it will not detect the UUID correctly. The missing parentheses broke your setup then.

grub 2.02.beta3-3 should fix your issue. Please note that it will use the device, not UUID.
Comment by Juan Simón (j1simon) - Friday, 05 August 2016, 11:12 GMT
ok, I'll wait to test grub 2.02.beta3-3.
Comment by Jozef (lathanderjkgmail.com) - Friday, 05 August 2016, 11:52 GMT
2.02.beta3-3 fixed for my root=/dev/sdb2 is back.

Thx

Loading...