[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Grub cannot fit into boot record



14/01/2012 15:21, Panayiotis Karabassis wrote:
Thanks to all.

On 01/14/2012 03:06 PM, tv.debian@googlemail.com wrote:
14/01/2012 13:18, Tom H:
On Sat, Jan 14, 2012 at 5:06 AM, Panayiotis
Karabassis<panayk@gmail.com>   wrote:

On my desktop, which is running Squeeze, I tried to upgrade some
packages to their Wheezy version. I have now reverted the upgrade, but I
am alarmed.

One of the packages was grub2 which was at version
1.98+20100804-14+squeeze1 and was upgraded to 1.99-14.

To cut a long story short, I ended with an unbootable system. Grub
refused to install on the MBR. I do not remember the message exactly,
but it mentioned that the record was unusually short, and core.img could
not fit into it. Then it told me that the only option was to use
blocklists but that was discouraged as unreliable.

What am I going to do when Wheezy becomes stable. This is a new
computer.

I've both upgraded to and installed wheezy without a hitch so you've
either hit some local hitch or stumbled into a bug.

It'd be nice to see the actual error message...

This must be ab msdos disk. How large is the post-MBR gap? How large
is "core.img"?



Hint for the above:

ls -lh /boot/grub | grep core.img

It's 29K. But this is for Squeeze's grub, which works! I don't know how
to find out the size of the gap...

;-)

But this is likely not the problem. The disk is under 2TB, so Debian
installer wouldn't have used gpt automatically, and since you don't know
what gpt [1] is you probably didn't do it yourself.

The disk belongs to a raid, right ? Did you try to install grub on all
raid members ? How did you setup the raid, from the Debian installer or
otherwise ?

Yes, it's two identical 1TB disks (raid1), and on top of them LVM. The
boot partition is contained in the LVM (I use an initrd). grub-install
works for both disks on Squeeze, and fails for both disks on Wheezy.

The partitions were created by the Squeeze's Debian installer.

[1] https://en.wikipedia.org/wiki/GUID_Partition_Table

Thanks. I won't upgrade to Wheezy until it is stable, but what should I
do then if it isn't fixed? Should I go with the blocklists method?

[cut]

Thanks again.


I run a wheezy system on raid1 (/boot is on raid too) and don't have any problem, but I don't have lvm on top of it. It's likely to be something specific to lvm and/or you setup. At this stage if you can reproduce the problem it would be very interesting to file a bug report. Maybe look at the open grub-pc bugs first, you may find something interesting. I'll happily help you later today and have a look there too.

In the meantime you could get info about the grub failure by using debug mode, the following command could enlighten us a little (output likely to be long, redirect to a text file):

grub-install --debug /dev/"your_disk" 2>&1

where "your_disk" is the device you want to install grub to (sda, sdb ...).
The "grub-mkimage" part of the output will tell you what's being included in the core.img to make it so big. If you are not afraid of messing up the system any further (hint: full backup or test system) you could try to "--force" grub-install and see if the system boots.


Reply to: