Unable to use Grub2-reboot # on FreePBX Distro 7

For some reason, FreePBX Distro has a /boot/efi/ folder even on an MBR install.

Tree: (I removed extra stuff)

[root@freepbx ~]# tree /boot/
/boot/
├── efi
│   └── EFI
│       ├── BOOT
│       │   ├── BOOTX64.EFI
│       │   └── fallback.efi
│       └── centos
│           ├── BOOT.CSV
│           ├── fonts
│           │   └── unicode.pf2
│           ├── gcdx64.efi
│           ├── grubenv
│           ├── grubx64.efi
│           ├── MokManager.efi
│           ├── shim-centos.efi
│           └── shim.efi
├── grub
│   └── splash.xpm.gz
├── grub2
│   ├── grub.cfg
│   ├── grubenv -> /boot/efi/EFI/centos/grubenv

The Issue :

/boot/grub2/grubenv is a softlink to /boot/efi/EFI/centos/grubenv

Check MBR vs UEFI:

[root@freepbx ~]# sudo parted -l | grep Table
Partition Table: msdos

sudo rm /boot/efi -R
sudo rm /boot/grub2/grubenv*
sudo rm /boot/grub2/grub.cfg
sudo rm /etc/grub.d/* -R
sudo rm /etc/sysconfig/grub
yum reinstall -y grub2-tools

nano /etc/grub.d/40_custom

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda
grub2-reboot 'Parted Magic 64-bit LiveISO' 
reboot

I personally feel this is a bug, so I figure I should open a ticket, but I’m not 100% if this was deliberate, if I’m breaking something?

1 Like