Bug 1955901
Summary: | loadenv.c:216:sparse file not allowed on boot with btrfs /boot | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan Underwood <jonathan.underwood> |
Component: | grub2 | Assignee: | Peter Jones <pjones> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 34 | CC: | bugzilla, fmartine, lkundrak, pgnet.dev, pjones, tomek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-05-08 18:21:35 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jonathan Underwood
2021-05-01 10:54:12 UTC
This isn't a default configuration. It's one of the reasons /boot is still on ext4 by default. GRUB preboot writes to grubenv by just overwriting the two blocks making up the file, without updating any Btrfs metadata because the GRUB btrfs.mod driver is read-only. Just like all of its file system drivers. On ext4 this isn't a problem because, no data checksums or inline extents yet. Btrfs (and ZFS) will see such overwrites as corruption, therefore GRUB disallows writes to grubenv when it's on Btrfs, ZFS, mdadm raid, LUKS, and possibly LVM. Upstream needs to redesign grubenv is what it comes down to. There's several different ways grubenv could be allocated that might explain why you're not seeing the error in Fedora 33 but you are in Fedora 34. But when the error happens, it's legit, it's not a bug. It's a design issue. As a consequence of putting grubenv on Btrfs, GRUB can't zero out boot_success, so it always thinks boots succeeded. Therefore the GRUB menu is always hidden even following a failed boot. The foreseeable future means grubenv on ext4, or you can F8, Esc, or Tab (not sure which one) to reveal the hidden GRUB menu, or you can disable the hidden grub menu feature with sudo grub2-editenv - unset menu_auto_hide Nb. there a way ("hack") to disable checksum checking for a file: one needs to set NO_COW attribute when the file is initially created empty. When the file already has some data, it's too late. |