[SATLUG] Grub hell
demeler at biochem.uthscsa.edu
Mon Nov 23 06:47:44 CST 2015
On Sun, Nov 22, 2015 at 11:40:33PM -0600, Craig wrote:
> So, you're doing hardward raid using grub (assuming grub 2) and
I don't think it is grub 2, whatever comes default with CentOS 6.7
> mixing/matching gpt & mbr and expect things to go smoothly?
Just trying to expand the disk capacity and restore an existing system
where the boot drive failed (got all the backups).
> Doesn't look like you're using UEFI mode as no mention of an ESP partition
The system is too old to have UEFI
> on any of the disks and have an extra boot partition.
> does the following work w/ rescue disk boot:
> set root=(hdX,Y)
> chainloader +1
I actually got it figured out now. The system works. The trick was to
tell grub.conf that the root was (hd0,0) when everywhere else (hd1,0) was
used, like in the installation, the root/boot drive, fstab (/dev/sdb...)
etc. Why this works is a complete mystery to me, but then grub is very
illogical to begin with. All I can guess is that the second drive at some
point during the boot process is considered the first drive for some reason.
I don't understand it, but at least I can make it work reproducibly this way.
I am glad I played around with it enough to come across this solution by random
trial and error. Very frustrating, and not documented anywhere I could find.
Moreover, the CentOS installation process configured it incorrectly by default.
Here is my fixed grub.conf:
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/sdb2
# initrd /initrd-[generic-]version.img
splashimage=(hd0,0)/grub/splash.xpm.gz <--- was written as (hd1,0) by CentOS installer
title CentOS 6 (2.6.32-573.el6.x86_64)
root (hd0,0) <---was written as (hd1,0) by CentOS installer
kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root=/dev/sdb2 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
More information about the SATLUG