Grub2-reboot # не работает на FreePBX Distro 7 - На основе CentOS 7

Я использовал ту же конфигурацию, чтобы успешно добавить второй пункт меню и загрузиться в него через" grub2-reboot # && reboot "в CentOS 7, но ничего, что я делаю, похоже, не меняет выбор пункта меню для следующей загрузки в FreePBX Distro 7.

Есть идеи, что попытаться устранить / протестировать / исправить?

Конфигурации:

cat / etc / default / grub

[root@freepbx ~]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_CMDLINE_LINUX="crashkernel=auto biosdevname=0 net.ifnames=0 rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_BACKGROUND=/boot/splash.png

cat /boot/grub2/grub.cfg

[root@freepbx ~]# cat /boot/grub2/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  5820774d-3fcf-44fb-86b9-972fab5de985
else
  search --no-floppy --fs-uuid --set=root 5820774d-3fcf-44fb-86b9-972fab5de985
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  0123444f-dbb6-421e-ad8a-6f6bfb0a0901
else
  search --no-floppy --fs-uuid --set=root 0123444f-dbb6-421e-ad8a-6f6bfb0a0901
fi
insmod png
background_image -m stretch /splash.png
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/00_tuned ###
set tuned_params=""
### END /etc/grub.d/00_tuned ###

### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi
### END /etc/grub.d/01_users ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Sangoma Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)' --class sangoma --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-514.2.2.el7.x86_64-advanced-5820774d-3fcf-44fb-86b9-972fab5de985' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  0123444f-dbb6-421e-ad8a-6f6bfb0a0901
        else
          search --no-floppy --fs-uuid --set=root 0123444f-dbb6-421e-ad8a-6f6bfb0a0901
        fi
        linux16 /vmlinuz-3.10.0-514.2.2.el7.x86_64 root=UUID=5820774d-3fcf-44fb-86b9-972fab5de985 ro crashkernel=auto biosdevname=0 net.ifnames=0 rhgb quiet
        initrd16 /initramfs-3.10.0-514.2.2.el7.x86_64.img
}
if [ "x$default" = 'Sangoma Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)' ]; then default='Advanced options for Sangoma Linux>Sangoma Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)'; fi;
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Parted Magic 64-bit LiveISO" {
set root=(hd0,msdos2)
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage64 iso_filename=$isofile load_ramdisk=1
initrd (loop)/pmagic/initrd.img /pmagic/fu.img /pmagic/m64.img
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Я также пробовал следующее и получил те же результаты:

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

Итак, FreePBX использует собственное репо, поэтому я выполнил указанное выше код, но вручную загруженный grub2-tools, теперь я получаю следующую ошибку:

[root@freepbx grub]# grub2-install --target=x86_64
grub2-install: error: /usr/lib/grub/x86_64/modinfo.sh doesn't exist. Please specify --target or --directory.
[root@freepbx grub]# grub2-install /dev/sda
grub2-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.
0
06.02.2017, 22:42
1 ответ

По какой-то причине в FreePBX Distro есть папка / boot / efi / даже при установке MBR.

Дерево: (я удалил лишнее)

[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

Проблема:

/ boot / grub2 / grubenv - это программная ссылка на / boot / efi / EFI / centos / grubenv

Проверить MBR и 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
0
28.01.2020, 04:48

Теги

Похожие вопросы