Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#63656 - [grub] unable to grub-install (2.04) on btrfs partitionless disk

Attached to Project: Arch Linux
Opened by christophe yayon (cyayon) - Wednesday, 04 September 2019, 14:23 GMT
Last edited by freswa (frederik) - Wednesday, 18 March 2020, 13:02 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned   Reopened
Assigned To Ronald van Haren (pressh)
Christian Hesse (eworm)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 5
Private No

Details

Description:

unable to grub-install (2.04) on btrfs partitionless disk

# grub-install /dev/sda
Installing for i386-pc platform.
grub-install: warning: your core.img is unusually large. It won't fit in the embedding area.
grub-install: error: filesystem `btrfs' doesn't support blocklists.

The system could be potentially unbootable !

no issue with previous grub 2.02.

If i create a /dev/sda1 partition, no problem.

Additional info:
* package version(s) : grub 2.04
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:

just grub-install on a partitionless btrfs disk

This task depends upon

Comment by Alexander Schnaidt (Namarrgon) - Wednesday, 04 September 2019, 14:51 GMT
This isn't a bug and belongs on the forums at best.

https://wiki.archlinux.org/index.php/Btrfs#Partitionless_Btrfs_disk
Comment by Robin Broda (coderobe) - Wednesday, 18 March 2020, 13:01 GMT
  • Field changed: Percent Complete (100% → 0%)
This *is* a bug, that should not be happening, it is a failure assert in grub.
Comment by Christian Hesse (eworm) - Wednesday, 18 March 2020, 13:49 GMT
So no RAID levels involved?
Comment by Robin Broda (coderobe) - Wednesday, 18 March 2020, 14:13 GMT
nope
Comment by Robin Broda (coderobe) - Wednesday, 18 March 2020, 14:18 GMT
The relevant bit is
> grub-install: warning: your core.img is unusually large. It won't fit in the embedding area.

This comes from https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/fs/btrfs.c?id=386128648606a3aa6ae7108d1c9af52258202279#n2143, and indicates that core.img grew in size beyond what is assumed to be a reasonable maximum; This should also break other non-btrfs related embeds where the embedding area is small - some targets are even smaller than btrfs' embedding area.

The i386-pc core is a heavily size restricted core in grub, per its docs, and shall not be this large.

I can also reproduce this on other distros, however, so this must be an upstream bug.
I plan to bisect grub to figure out what caused core.img to grow by a non-negligible amount, and then file an upstream bug report if nobody beats me to it. I couldn't find a detailed existing report about this specifically.
Comment by Robin Broda (coderobe) - Thursday, 11 June 2020, 22:05 GMT
Welp, this bug just hit arch infra.
I am almost convinced it would be a good idea to roll back this grub version until this is fixed upstream, this is literally broken software breaking people's actual boot *right now*.
Comment by Eli Schwartz (eschwartz) - Thursday, 11 June 2020, 22:16 GMT Comment by Christian Hesse (eworm) - Friday, 12 June 2020, 18:17 GMT
Our wiki gives the hint to create partitionless btrfs with `--alloc-start` [0]. Though man mkfs.btrfs says this option is deprecated and will be removed...

Anyway... downgrading to 2.02 and sticking with that forever is not an option.

[0] https://wiki.archlinux.org/index.php/Btrfs#Partitionless_Btrfs_disk
Comment by Robin Broda (coderobe) - Friday, 12 June 2020, 18:52 GMT
Why is that not an option? It's not like people are waiting for grub's hot new features :P

As far as i can tell, upstream is thinking about this and may or may not do something about this - until then, people upgrading are automatically left with unbootable systems.

Loading...