Bug 1906191 - new kernels with SUSE_BTRFS_SNAPSHOT_BOOTING=true do not get the right BOOTPREFIX
Summary: new kernels with SUSE_BTRFS_SNAPSHOT_BOOTING=true do not get the right BOOTPR...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 33
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-09 21:22 UTC by Eduardo
Modified: 2021-07-06 09:54 UTC (History)
3 users (show)

Fixed In Version: grub2-2.06-3.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-06 09:54:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
snapshot booting patch (845 bytes, patch)
2020-12-09 21:22 UTC, Eduardo
no flags Details | Diff

Description Eduardo 2020-12-09 21:22:00 UTC
Created attachment 1738054 [details]
snapshot booting patch

Description of problem:
Installing new kernels under the following setup do not get the right path to the kernel:
btrfs as file system
boot as part of root instead of separate partition
snapper configured so the default subvolume of the btrfs is the current root/snapshot
in /etc/default/grub having:
SUSE_BTRFS_SNAPSHOT_BOOTING=true

Version-Release number of selected component (if applicable):
grub2-common-2.04-31.fc33.noarch


How reproducible:
install a new kernel and the path in the generated bls will have a path relative to the root subvolume instead of the default one


Steps to Reproduce:
1. Install a system as described above
2. Install a new kernel

Actual results:
For example, after installing kernel 5.9.12-200
/boot/loader/entries/xxx-5.9.12-200.fc33.x86_64.conf:
linux /root/boot/vmlinuz-5.9.12-200.fc33.x86_64
initrd /root/boot/initramfs-5.9.12-200.fc33.x86_64.img


Expected results:
It should have generated
linux /boot/vmlinuz-5.9.12-200.fc33.x86_64
initrd /boot/initramfs-5.9.12-200.fc33.x86_64.img



Additional info:
/etc/grub.d/10_linux (grub2-tools) seems to be able to handle it. The issue is in /usr/lib/kernel/install.d/20-grub.install (grub2-common). After reviewing how 10_linux works attached patch seems to fix the issue. Note that the check is overly cautious and checks that the FS is actually btrfs and not only the SUSE_BTRFS_SNAPSHOT_BOOTING flag. Since the GRUB_FS variable is not available it is currently expanded

Comment 1 Fedora Admin user for bugzilla script actions 2021-05-07 00:35:39 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 2 Fedora Update System 2021-07-06 09:49:43 UTC
FEDORA-2021-21ed0c951f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-21ed0c951f

Comment 3 Fedora Update System 2021-07-06 09:54:09 UTC
FEDORA-2021-21ed0c951f has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.