1

My CentOS 6.10 host won't boot. It stops at the GRUB prompt. How do I fix this without manual intervention at each boot?

I can successfully get the system running with these steps.

root (hd0,1) 
kernel /vmlinuz<version> root=/dev/sda8 ro 
initrd initramfs<version matching kernel line> 
boot

From there on everything is normal, until I have to reboot. uname -a shows the version I used to manually bring up the system. (Yes, the hostname is hastur.)

$ uname -a
Linux hastur 2.6.32-754.9.1.el6.x86_64 #1 SMP Thu Dec 6 08:02:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

My disk is laid out like this:

$ lsblk -i
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
|-sda1   8:1    0   200M  0 part /boot/efi
|-sda2   8:2    0   500M  0 part /boot
|-sda3   8:3    0  73.2G  0 part /var
|-sda4   8:4    0  48.8G  0 part /home
|-sda5   8:5    0  29.3G  0 part /opt
|-sda6   8:6    0  14.7G  0 part /tmp
|-sda7   8:7    0   7.8G  0 part [SWAP]
`-sda8   8:8    0  58.4G  0 part /
sr0     11:0    1  1024M  0 rom  

These are the relevant entries in /etc/fstab. (I verified that short UUID for /boot/efi using blkid /dev/sda1)

UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 /      ext4  defaults   1 1
UUID=bbec4552-4895-4ad9-a82a-e3668a9b8e4b /boot  ext4  defaults   1 2
UUID=8067-187B     /boot/efi   vfat    umask=0077,shortname=winnt 0 0

My grub.conf is

$ sudo cat /boot/efi/EFI/redhat/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 (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/sdb8
#          initrd /initrd-[generic-]version.img
#boot=/dev/sdb1
device (hd0) HD(1,800,64000,6c514bde-63d4-4e1f-9306-7792c17f1e90)
default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-754.11.1.el6.x86_64)
    root (hd0,1)
    kernel /vmlinuz-2.6.32-754.11.1.el6.x86_64 ro root=UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=256M
    initrd /initramfs-2.6.32-754.11.1.el6.x86_64.img
title CentOS (2.6.32-754.11.1.el6.x86_64.debug)
    root (hd0,1)
    kernel /vmlinuz-2.6.32-754.11.1.el6.x86_64.debug ro root=UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=256M
    initrd /initramfs-2.6.32-754.11.1.el6.x86_64.debug.img
title CentOS (2.6.32-754.9.1.el6.x86_64.debug)
    root (hd0,1)
    kernel /vmlinuz-2.6.32-754.9.1.el6.x86_64.debug ro root=UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=256M
    initrd /initramfs-2.6.32-754.9.1.el6.x86_64.debug.img
title CentOS (2.6.32-754.9.1.el6.x86_64)
    root (hd0,1)
    kernel /vmlinuz-2.6.32-754.9.1.el6.x86_64 ro root=UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=256M
    initrd /initramfs-2.6.32-754.9.1.el6.x86_64.img
title CentOS (2.6.32-754.6.3.el6.x86_64)
    root (hd0,1)
    kernel /vmlinuz-2.6.32-754.6.3.el6.x86_64 ro root=UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=256M
    initrd /initramfs-2.6.32-754.6.3.el6.x86_64.img
title CentOS (2.6.32-754.3.5.el6.x86_64)
    root (hd0,1)
    kernel /vmlinuz-2.6.32-754.3.5.el6.x86_64 ro root=UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=256M
    initrd /initramfs-2.6.32-754.3.5.el6.x86_64.img
title CentOS (2.6.32-696.30.1.el6.x86_64)
    root (hd0,1)
    kernel /vmlinuz-2.6.32-696.30.1.el6.x86_64 ro root=UUID=c7ba8070-e409-4a58-b31b-ddd06d784481 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=256M
    initrd /initramfs-2.6.32-696.30.1.el6.x86_64.img

Related Information

I had the same issue with Ubuntu 18.04 (both upgrade from 16.04 and fresh install. Same hardware on both hosts: HP Compaq 8200 Elite Small Form Factor, Intel Core i5-2500 ). Ubuntu 16.04 booted fine, Ubuntu 18.04 would not. The issue was solved last week with these commands.

sudo apt-get purge grub\*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub

This error would show at each apt upgrade:

Package grub-efi-amd64-signed is not configured yet.

dpkg reported:

iF grub-efi-amd64-signed (1.93.13+2.02-2ubuntu8.12)
iU shim-signed (1.37~18.04.3+15+1533136590.3beb971-0ubuntu1)

Back to the CentOS 6 host

sudo rpm -Va will tell me this much.

.M.......    /boot/efi/EFI/redhat
.M.....T.    /boot/efi/EFI/redhat/grub.efi

I've already tried booting from optical media and running grub-install. At this time, rebuilding from scratch is not an option.

Additional Information

$ sudo efibootmgr
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.

# modprobe efivars
FATAL: Module efivars not found.


# ls -li $(locate grub.conf)
  9 -rwx------. 1 root root 3626 May 25 09:31 /boot/efi/EFI/redhat/grub.conf
  2885960 lrwxrwxrwx. 1 root root   32 Apr 21  2018 /etc/grub.conf -> ../boot/efi/EFI/redhat/grub.conf
  2885959 lrwxrwxrwx. 1 root root   33 Apr 21  2018 /etc/grub.conf.rpmsave -> ..//boot/efi/EFI/redhat/grub.conf

# diff -wb /etc/grub.conf /etc/grub.conf.rpmsave
#
4
  • 1
    You might be updating the wrong grub2.cfg file. If you are using EFI to boot, maybe you need to update a different file. Depending on your distro, something like $ sudo grub2-mkconfig -o $(readlink -f /etc/grub2-efi.cfg) might do the trick. Commented Mar 24, 2019 at 18:39
  • @ChristophSommer I can find(1) no other grub.c* on my host. Nor can I find a grub2 anything in the software installer app.
    – iAmJeff
    Commented Mar 25, 2019 at 2:04
  • Additional information now includes ls -l of grub.conf and an empty diff of grub.conf and grub.conf.rpmsave.
    – iAmJeff
    Commented May 25, 2019 at 15:14
  • @ChristophSommer That was really close. I was missing /boot/grub/grub.conf
    – iAmJeff
    Commented Jun 1, 2019 at 2:55

1 Answer 1

1

I found some time to work on this again and solved it.

The hint that finally caught my eye was in grub.conf: "paths are relative to /boot/"

# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/sdb8
#          initrd /initrd-[generic-]version.img

My grub.conf file was in the wrong place, /etc/grub.conf. I copied the file to /boot/grub/ and the system booted normally.

Looking back at my question, I'm not at all sure how I ran sudo cat /boot/efi/EFI/redhat/grub.conf That is evident in one of my comments that locate grub.conf could only find the one file in /etc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .