PDA

View Full Version : core.img too large error when reinstalling grub2 after windos installation


Pierre Menard
28th January 2012, 05:18 PM
Hi all

I have Fedora 16 running from sdb and I've now installed windows 7 on sda. sda is the primary hard disk where the bios tries to boot from.
When trying to reinstall grub2 (chrooting into /mnt/sys-something from recovery mode) I get:
[root@theBorrow ~]# grub2-install /dev/sda
/sbin/grub2-setup: warn: Your core.img is unusually large. It won't fit in the embedding area..
/sbin/grub2-setup: error: embedding is not possible, but this is required for cross-disk install.

I've searched around but it seems this usually happens in more complex (e.g RAID) boot environments.

both OSs are 64bit if that's in any way relevant.

Any help will be greatly appreciated.

TIA

P.

DBelton
28th January 2012, 05:28 PM
I think the last update to grub2 changed something and now the core.img file it tries to create is too large to fit in the space between a standard MBR and the first partition.

Only option I have found is to use GPT on your drive and create a BIOS_BOOT partition.

What I did on mine is to set my Fedora drive up as GPT with a 1 MB BIOS_Boot partition on the second drive. Windows on the first drive as MBR.

Then I set my BIOS to boot from the second drive, and installed grub2 to my second drive.

If Fedora 16 installed and partitioned your Fedora drive, it's probably GPT, and you should have space to put a BIOS_Boot partition in since anaconda creates the first partition at sector 2048. You can just add a new partition (use gdis) to use that space before your first partition, and set the type to be BIOS_Boot. Then install grub2 to the boot sector of your second drive, then change your BIOS boot order to boot from the second drive.

Pierre Menard
28th January 2012, 06:58 PM

I thought grub is installed in the MBR - that that's all there is in there except for partitioning information.
Anyhow - I've already installed grub2 to /dev/sdb (where fedora resides but without creating BIOS_boot partition, what does that do?
Also - how do I change where the bios tries to boot from? Does changing the boot order have anything to do with it? Bios tries to boot from one particular drive where there's an MBR, no?

DBelton
28th January 2012, 08:57 PM
grub2 (the bootloader) is installed in the boot sector

grub2 loads it's core.img file into the space between the MBR and the first partition.

And if you have installed grub2 to /dev/sdb, then you should be able to go into your BIOS, change the boot order so that it boots from your second hard drive instead of the first hard drive, and it should boot.