Description of problem: Filing a new bug per comment 45 of bug 737508. grub2-1.99-13 regressed in the size of core.img from grub2-1.99-12 so that it no longer fits in under 32K. I hit this on (pre)upgrade from F15 which left my machine unbootable. Managed to get in and downgrade to -12 which fixed it for now. My disk shouldn't be terribly strange. Single disk installed with the defaults of some Fedora release way back (F11 it seems?). There is a "Dell Utility" partition starting at sector 63, so I can't fit something larger without messing with it. Version-Release number of selected component (if applicable): 1.99-13.fc16 How reproducible: Always
This is because the build is no longer optimized for space. * Rel 13 builds with RPM_OPT_FLAGS whereas rel 12 did not (bug 704820). * RPM_OPT_FLAGS contains -O2 which overrides the -Os provided by grub's configure script.
Same problem here. Just preupgraded default F14 installation on a laptop (no raid or anything fancy) and anaconda told me that it was unable to install the boot loader. Fixed it the same way as mentioned above: booted from a network install CD, downloaded grub2-1.99-12 and installed it using rpm -U --oldpackage . After this I was able to run grub2-install /dev/sda without problems.
*** Bug 784885 has been marked as a duplicate of this bug. ***
grub2-1.99-13.fc16.1 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/grub2-1.99-13.fc16.1
Package grub2-1.99-13.fc16.1: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing grub2-1.99-13.fc16.1' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-1925/grub2-1.99-13.fc16.1 then log in and leave karma (feedback).
grub2-1.99-13.fc16.1 did not work for me. After seeing the error, but before rebooting, I did a chroot into the installed system and upgraded to grub2-1.99-13.fc16.1 (from the updates-testing repository). The core.img was still too big. Then I downgraded to grub2-1.99-12.fc16 (from the fedora repository), and it worked. This particular installation does not even have LVM, so the image should have been even smaller. Sorry for not getting more information (copies of the generated core.img files, the exact file sizes, and so on), but I was too focused into making it install, so I could reboot and continue the installation.
I second Cesar here. I had increased the unallocated disk space in front of /dev/sda1 so both grub2-1.99-13.fc16 and grub2-1.99-13.fc16.1 work for me. But I still can create core.img with any grub2 version I like. I used "grub2-install /dev/sda" in each case. A short Google search told me core.img should fit 61 sectors (31232 bytes) This are the sizes I produced: grub2-1.99-12.fc16 29230 bytes grub2-1.99-13.fc16 31743 bytes grub2-1.99-13.fc16.1 31743 bytes It seems the optimization patch did not work (a pity it was not attached to the bug).
The spec file builds grub twice - it looks like the efi build has been fixed but the plain build has not.
Another thing. I have compared the grub2.spec files from 12 and 13.1 versions. The latest (13.1) file has a line 112 in definition of CFLAGS that version 12 does not have. -e 's/-O.//g' \ Isn't this the smoking gun?
Ian, so removing the optimization flags for efi is the right thing to do and should be repeated below line 144? Do I read you correctly?
#10 - that's right, yes.
Comparing the size of the /usr/lib/grub2/i386-pc directory between 1.99-13.fc16 and 1.99-13.fc16.1, they are identical. Comparing the size of that directory between 1.99-12.fc16 and 1.99-13.fc16.1, there are several differences in the file sizes: -36 ./bsd.mod +40 ./bsd.mod -8 ./fat.mod +12 ./fat.mod -16 ./font.mod +20 ./font.mod -4 ./fshelp.mod +8 ./fshelp.mod -8 ./functional_test.mod +4 ./functional_test.mod -20 ./gcry_rijndael.mod +24 ./gcry_rijndael.mod -16 ./gfxterm.mod +20 ./gfxterm.mod -4 ./hexdump.mod +8 ./hexdump.mod -44 ./kernel.img +48 ./kernel.img -16 ./multiboot2.mod +20 ./multiboot2.mod -120 ./normal.mod +128 ./normal.mod -56 ./regexp.mod +64 ./regexp.mod -4 ./search_fs_uuid.mod +8 ./search_fs_uuid.mod -16 ./terminfo.mod +20 ./terminfo.mod -12 ./uhci.mod +8 ./uhci.mod -8 ./usbserial_pl2303.mod +4 ./usbserial_pl2303.mod -28 ./video_fb.mod +32 ./video_fb.mod -8 ./videoinfo.mod +4 ./videoinfo.mod -12 ./video.mod +8 ./video.mod -12 ./xfs.mod +8 ./xfs.mod -12 ./zfsinfo.mod +8 ./zfsinfo.mod Also, I just noticed that I said a nonsense thing above: of course LVM makes no difference, the LVM code is on the initrd, not on grub2. The file sizes I saw are similar to what Jacek Piskozub is seeing; the core.img currently in use here for the machine in question is 29237 bytes.
I think Ian Collier has it correct, thanks for the catch. I'm in the process of doing a -14 build for rawhide, 17 and 16 with this fix. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
Unfortunately, grub2 fails to build on f17/f18 at present due to changes in autotools. The upstream patch to fix it - http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/3766 - doesn't apply cleanly to our grub2, due to intermediate changes in the files which we haven't backported. I don't want to poke this too hard without peter's input - peter, do you want to take the pain to manually fix the patch so it applies, or should we just consider bumping to an upstream snapshot at some point? or something else?
(In reply to comment #10) > Ian, so removing the optimization flags for efi is the right thing to do and > should be repeated below line 144? Do I read you correctly? Confirming this. I've added -e 's/-O.//g' to the non-efi part of the 13.fc16.1 spec and this has brought the sizes of the four modules my machine is using (bootdisk, ext2, fshelp and part_msdos) back exactly to the 12.fc16 values. So at least on x86_64 non-EFI the bug can be fixed this way. Could anyone please push an update for F16?
I was going to, but since F17/Rawhide couldn't be fixed at the same time I figured I'd wait for Peter. I think he said on IRC he should have an F17/Rawhide build soon. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
grub2-1.99-13.fc16.2 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/grub2-1.99-13.fc16.2
Testing the newest version downloaded straight from koji: This are the sizes of core.img I produced: grub2-1.99-12.fc16 29230 bytes grub2-1.99-13.fc16 31743 bytes grub2-1.99-13.fc16.1 31743 bytes grub2-1.99-13.fc16.2 29298 bytes which means on my box the latest version made this file slightly larger than 1.99-12 but well under the upper limit of 31232 bytes. In short: the patch worked.
Package grub2-1.99-13.fc16.2: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing grub2-1.99-13.fc16.2' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-3697/grub2-1.99-13.fc16.2 then log in and leave karma (feedback).
grub2-1.99-13.fc16.2 fixes the problem. Please push into stable, as network installation is impossible now because update repo contain broken version. Leave karma if possible, please, as noted above.
grub2-1.99-13.fc16.2 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 785376 has been marked as a duplicate of this bug. ***
*** Bug 771524 has been marked as a duplicate of this bug. ***