[Bug 1912677] [NEW] autogenerated entries for other Ubuntu systems use wrong root filesystem, unbootable
Akkana Peck
1912677 at bugs.launchpad.net
Thu Jan 21 17:51:18 UTC 2021
Public bug reported:
On my disk I have two partitions that are root filesystems for two
releases, Focal and Groovy:
Groovy 20.10 is on /dev/nvme0n1p3 3ac2446d-ae7c-4975-b736-44b1084266de
Focal 20.04 is on /dev/nvme0n1p4 4ff7a630-0e7e-4427-aa9e-513bcae849c3
If I run update-grub2 from Groovy, it detects the Focal partition and
generates this entry for it:
menuentry 'Ubuntu 20.04.1 LTS (20.04) (on /dev/nvme0n1p4)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-4ff7a630-0e7e-4427-aa9e-513bcae849c3' {
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
else
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
fi
linux /boot/vmlinuz-5.4.0-52-generic root=UUID=3ac2446d-ae7c-4975-b736-44b1084266de ro text
initrd /boot/initrd.img-5.4.0-52-generic
}
Note how the menu correctly says it's on p4, and gives the right UUID
there and in the search --fs-uuid lines, but then in the actual linux
kernel line, it uses root=UUID=3ac2446d-ae7c-4975-b736-44b1084266de, the
wrong partition.
If I try to boot from that menuentry, the boot fails. At one point I'm
fairly sure saw a message about not being able to find its initrd flash
by, but I wasn't able to capture that message. Eventually it gets to a
single-user prompt, and at that point if I scroll back, here are the
warnings (yellow) and errors (red) captured in the scrollback:
UNSUPP Starting of Executable File Format File System Automount Point not supported
FAILED Failed to mount /boot/efi
DEPEND Dependency failed for Local File Systems
If I give the root password and then type mount, it has /dev/nvme0n1p3
(the Groovy root) mounted on /, not p4 (the Focal root it should be
using).
So if I want to be able to use that Focal partition, I can't use the
entry generated by os-prober; I have to make my own entry and add it to
somewhere like 40_custom (in reality, of course I want it earlier,
before the nonworking os-prober entries, so I named it 25-local):
menuentry 'Ubuntu 20.04 Focal LTS on nvme0n1p4' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4ff7a630-0e7e-4427-aa9e-513bcae849c3' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
else
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
fi
linux /boot/vmlinuz-5.4.0-52-generic root=UUID=4ff7a630-0e7e-4427-aa9e-513bcae849c3 ro text
initrd /boot/initrd.img-5.4.0-52-generic
}
ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: grub-common 2.04-1ubuntu35.1
ProcVersionSignature: Ubuntu 5.8.0-38.43-generic 5.8.18
Uname: Linux 5.8.0-38-generic x86_64
ApportVersion: 2.20.11-0ubuntu50.3
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Jan 21 10:26:38 2021
InstallationDate: Installed on 2020-04-29 (267 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: grub2
UpgradeStatus: Upgraded to groovy on 2020-10-23 (90 days ago)
mtime.conffile..etc.grub.d.10_linux: 2021-01-21T10:19:44.446687
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug groovy
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1912677
Title:
autogenerated entries for other Ubuntu systems use wrong root
filesystem, unbootable
Status in grub2 package in Ubuntu:
New
Bug description:
On my disk I have two partitions that are root filesystems for two
releases, Focal and Groovy:
Groovy 20.10 is on /dev/nvme0n1p3 3ac2446d-ae7c-4975-b736-44b1084266de
Focal 20.04 is on /dev/nvme0n1p4 4ff7a630-0e7e-4427-aa9e-513bcae849c3
If I run update-grub2 from Groovy, it detects the Focal partition and
generates this entry for it:
menuentry 'Ubuntu 20.04.1 LTS (20.04) (on /dev/nvme0n1p4)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-4ff7a630-0e7e-4427-aa9e-513bcae849c3' {
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
else
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
fi
linux /boot/vmlinuz-5.4.0-52-generic root=UUID=3ac2446d-ae7c-4975-b736-44b1084266de ro text
initrd /boot/initrd.img-5.4.0-52-generic
}
Note how the menu correctly says it's on p4, and gives the right UUID
there and in the search --fs-uuid lines, but then in the actual linux
kernel line, it uses root=UUID=3ac2446d-ae7c-4975-b736-44b1084266de,
the wrong partition.
If I try to boot from that menuentry, the boot fails. At one point I'm
fairly sure saw a message about not being able to find its initrd
flash by, but I wasn't able to capture that message. Eventually it
gets to a single-user prompt, and at that point if I scroll back, here
are the warnings (yellow) and errors (red) captured in the scrollback:
UNSUPP Starting of Executable File Format File System Automount Point not supported
FAILED Failed to mount /boot/efi
DEPEND Dependency failed for Local File Systems
If I give the root password and then type mount, it has /dev/nvme0n1p3
(the Groovy root) mounted on /, not p4 (the Focal root it should be
using).
So if I want to be able to use that Focal partition, I can't use the
entry generated by os-prober; I have to make my own entry and add it
to somewhere like 40_custom (in reality, of course I want it earlier,
before the nonworking os-prober entries, so I named it 25-local):
menuentry 'Ubuntu 20.04 Focal LTS on nvme0n1p4' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4ff7a630-0e7e-4427-aa9e-513bcae849c3' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
else
search --no-floppy --fs-uuid --set=root 4ff7a630-0e7e-4427-aa9e-513bcae849c3
fi
linux /boot/vmlinuz-5.4.0-52-generic root=UUID=4ff7a630-0e7e-4427-aa9e-513bcae849c3 ro text
initrd /boot/initrd.img-5.4.0-52-generic
}
ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: grub-common 2.04-1ubuntu35.1
ProcVersionSignature: Ubuntu 5.8.0-38.43-generic 5.8.18
Uname: Linux 5.8.0-38-generic x86_64
ApportVersion: 2.20.11-0ubuntu50.3
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Jan 21 10:26:38 2021
InstallationDate: Installed on 2020-04-29 (267 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: grub2
UpgradeStatus: Upgraded to groovy on 2020-10-23 (90 days ago)
mtime.conffile..etc.grub.d.10_linux: 2021-01-21T10:19:44.446687
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1912677/+subscriptions
More information about the foundations-bugs
mailing list