Debian 8 - grub-install double free or corruption
Nov 30, 2015

For some unknown reason, after installing Debian 8 onto an mdadm RAID 10 array w/LVM, grub-install failed to install the boot loader. The only way I’ve found to fix this was to enter rescue mode, drop to a shell, update grub, and then install it to the devices.

Finish the install by skipping the bootloader installation process. If you don’t do this you will probably be missing some user configuration data.

update-grub grub-install /dev/sdX

I have no idea why but this seems to have fixed it and I was able to reboot and boot into Debian without issue.


I’ve had a similar issue also occur with mdadm/LUKS/LVM. This issue is related to there not being enough free space at the beginning of the disk. Because there’s not enough room for GRUB, it fails to install. The solution is to create a small 8MB partition at the beginning of the disk. The partition type should be something like bios reserved. This will allow you to install GRUB from the rescue mode.

If you also are using LUKS then you must add GRUB_ENABLE_CRYPTODISK=y to /etc/default/grub then run update-grub and finally grub-install /dev/sdX.

Comments