Unable to use Grub2-reboot # on FreePBX Distro 7

distro
configuration
Tags: #<Tag:0x00007fafd65f5540> #<Tag:0x00007fafd65f51d0>

(Free Software Servers) #1

One of the main reasons I want to get to Distro 7 is support for Grub2. This enables me to use a LiveISO on the HDD w/ “grub2-reboot 2 && reboot”. I generally load Parted Magic so I can use Clonezilla to make backups of the /dev/sda#.

No matter what I do when I use grub2-reboot it selects the first entry which is the Distro.

Does anybody have any idea why?

I have tried completely removing the grub configs and this issue persists…

sudo rm /boot/grub2/grub.cfg
sudo rm /etc/grub.d/* -R
sudo rm /etc/sysconfig/grub
yum reinstall -y grub2-tools
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

I posted a question on Unix.Linux as well …

But I thought somebody here might know why, perhaps this was done on purpose and could point me to how to undo it.


(Free Software Servers) #2

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?


(Mvogel4949) #3

Are you saying you removed the grubenv file or you removed the EFI file?