update-grub does not use UUID to specify root when booting other linux

Bug #1854058 reported by zebul666
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

update-grub (/etc/grub.d/30_os_prober) does not use UUID when specifying the root fs of a linux install in the /boot/grub/grub.cfg generated file.

so it generates something like:

linux /boot/vmlinux-linux root=/dev/sdb5

in /boot/grub/grub.cfg in the /etc/grub/d/30_os_prober section

So it fails to boot my archlinux install because:

1. grub.cfg use /dev/sdb5
2. during early boot (sda and sdb are swapped)
3. early boot (systemd in initcpio in archlinux) tries to fsck sdb5 which is the wrong partition because it should be sda5.
4. boot fails (with emergency shell)

Fix:
30_os_prober should generate line using UUID like it does for main linux install, i.e.

linux /boot/vmlinuz-linux root=UUID=xxxxx-yyy-zzz-aaaa....

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: grub2-common 2.04-1ubuntu12.1
ProcVersionSignature: Ubuntu 5.3.0-23.25-generic 5.3.7
Uname: Linux 5.3.0-23-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: amd64
Date: Tue Nov 26 14:09:38 2019
InstallationDate: Installed on 2018-05-07 (567 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: Upgraded to eoan on 2019-10-23 (34 days ago)

Revision history for this message
zebul666 (zebul666) wrote :
Revision history for this message
zebul666 (zebul666) wrote :
Revision history for this message
zebul666 (zebul666) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.