Bug 1612339 - grub2-install fails on x86_64 with grub2-2.02-47.fc29: "Decompressor is too big"
Summary: grub2-install fails on x86_64 with grub2-2.02-47.fc29: "Decompressor is too big"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 29
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-03 17:12 UTC by Adam Williamson (Red Hat non-Fedora)
Modified: 2019-10-15 06:15 UTC (History)
5 users (show)

Fixed In Version: grub2-2.02-48.fc29
Clone Of:
Environment:
Last Closed: 2019-10-15 06:15:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson (Red Hat non-Fedora) 2018-08-03 17:12:48 UTC
Since grub2-2.02-47.fc29 was built, Rawhide composes are failing due to a bootloader install error during x86_64 Cloud image builds. I ran a regular x86_64 network install with a side repo containing the new grub2 build, and reproduced the problem. program.log shows this:

Running in chroot '/mnt/sysimage' ... grub2-install --no-floppy /dev/vda
Installing for i386-pc platform.
grub2-install: error: Decompressor is too big.
Return code: 1

So, well, that seems to be the problem.

Comment 1 Adam Williamson (Red Hat non-Fedora) 2018-08-03 17:28:36 UTC
So, peter notes that lzma_decompress.img (which is the 'decompressor' in question here) indeed did grow to absurd sizes in the latest grub2 builds both for F28 and Rawhide. It should be about 3K. It's actually over 128MB. It seems that most of that space is empty - there's a bit of data at the start of the file, then like 128MB of zeroes, then a bit of data at the end of the file. As this happened on both F28 and Rawhide it's probably not a toolchain issue; Peter's trying to find the cause on the grub side now.

Comment 2 Peter Jones 2018-08-03 19:31:52 UTC
<ascii art middle finger pointing at binutils here>

Should be fixed in grub2-2.02-48.fc29.

Comment 3 Adam Williamson (Red Hat non-Fedora) 2018-08-03 21:16:12 UTC
For the record, the size inflation happens when a precursor file (lzma_decompress.image) is processed into lzma_decompress.img with objcopy. The way objcopy is invoked this *should* only ever make the file smaller by stripping unneeded stuff out of it, but it seems in the latest grub bits Peter merged recently there's some kind of bug which results in a new "bogus" (per Peter) elf note section showing up in lzma_decompress.image . It's that note section which  results in the huge output file (IIUC, because it claims to be located "at" 128M, so objcopy just outputs the section before it, then enough zeroes to get to 128M, *then* the note section).

For now Peter went with a patch which just tells objcopy to skip the offending note section, which avoids the problem and gives us a normally-sized output file. He'll probably try and figure out where the bogus note comes from in the first place too and get rid of it, but until that's fixed, this fix should keep working.

Comment 4 Jan Kurik 2018-08-14 11:21:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.


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