Grub2 EFI cae a Grub Shell a menos que presione F12 inmediatamente después del encendido

Grub2 EFI cae a Grub Shell a menos que presione F12 inmediatamente después del encendido

Tengo Opensuse Tumbleweed junto con Windows 10 en mi computadora portátil Asus ROG.
El problema es bastante extraño: cada vez que enciendo o reinicio, Grub2 EFI cae al shell grub2 y aleatoriamente no ve el segundo disco duro.
Pero si presiono F12 inmediatamente después del encendido o durante el reinicio, aparece el menú normal de Grub2 y puedo iniciar Opensuse o Windows sin problemas. Eso es bastante molesto. ¿Alguien puede ayudarme con este problema?
No hice ninguna modificación a los archivos de configuración, excepto agregar entradas /etc/fstabpara montar particiones de Windows, pero no creo que esté relacionado.

/boot/efi/EFI/opensuse/grub.cfg:

search --fs-uuid --set=root 884f4184-2900-4123-a4be-60df5a0f0ad0
set prefix=(${root})/grub2
configfile $prefix/grub.cfg

/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 ###
if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi

if [ "${env_block}" ] ; then
  load_env -f "${env_block}"
fi

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   if [ "${env_block}" ] ; then
     save_env -f "${env_block}" next_entry
   fi
   set boot_once=true
else
   set default="0"
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_gpt 
insmod btrfs
set root='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  6159e15d-f224-499d-88e0-437b5538f0f1
else
  search --no-floppy --fs-uuid --set=root 6159e15d-f224-499d-88e0-437b5538f0f1
fi
    font="/.snapshots/1/snapshot/usr/share/grub2/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=POSIX
  insmod gettext
fi
terminal_output gfxterm
insmod part_gpt 
insmod ext2
set root='hd1,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  884f4184-2900-4123-a4be-60df5a0f0ad0
else
  search --no-floppy --fs-uuid --set=root 884f4184-2900-4123-a4be-60df5a0f0ad0
fi
insmod gfxmenu
loadfont ($root)/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
loadfont ($root)/grub2/themes/openSUSE/DejaVuSans10.pf2
loadfont ($root)/grub2/themes/openSUSE/DejaVuSans12.pf2
loadfont ($root)/grub2/themes/openSUSE/ascii.pf2
insmod png
set theme=($root)/grub2/themes/openSUSE/theme.txt
export theme
if [ x${boot_once} = xtrue ]; then
  set timeout=0
elif [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=10
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/10_linux ###
menuentry 'openSUSE Tumbleweed'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6159e15d-f224-499d-88e0-437b5538f0f1' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt 
    insmod ext2
    set root='hd1,gpt4'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  884f4184-2900-4123-a4be-60df5a0f0ad0
    else
      search --no-floppy --fs-uuid --set=root 884f4184-2900-4123-a4be-60df5a0f0ad0
    fi
    echo    'Loading Linux 4.4.0-1-default ...'
    linux   /vmlinuz-4.4.0-1-default root=UUID=6159e15d-f224-499d-88e0-437b5538f0f1 rootflags=subvol=.snapshots/1/snapshot  quiet splash=silent
    echo    'Loading initial ramdisk ...'
    initrd  /initrd-4.4.0-1-default
}
submenu 'Advanced options for openSUSE Tumbleweed' --hotkey=1 $menuentry_id_option 'gnulinux-advanced-6159e15d-f224-499d-88e0-437b5538f0f1' {
    menuentry 'openSUSE Tumbleweed, with Linux 4.4.0-1-default' --hotkey=2 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1-default-advanced-6159e15d-f224-499d-88e0-437b5538f0f1' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt 
        insmod ext2
        set root='hd1,gpt4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  884f4184-2900-4123-a4be-60df5a0f0ad0
        else
          search --no-floppy --fs-uuid --set=root 884f4184-2900-4123-a4be-60df5a0f0ad0
        fi
        echo    'Loading Linux 4.4.0-1-default ...'
        linux   /vmlinuz-4.4.0-1-default root=UUID=6159e15d-f224-499d-88e0-437b5538f0f1 rootflags=subvol=.snapshots/1/snapshot  quiet splash=silent
        echo    'Loading initial ramdisk ...'
        initrd  /initrd-4.4.0-1-default
    }
    menuentry 'openSUSE Tumbleweed, with Linux 4.4.0-1-default (recovery mode)' --hotkey=3 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1-default-recovery-6159e15d-f224-499d-88e0-437b5538f0f1' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt 
        insmod ext2
        set root='hd1,gpt4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  884f4184-2900-4123-a4be-60df5a0f0ad0
        else
          search --no-floppy --fs-uuid --set=root 884f4184-2900-4123-a4be-60df5a0f0ad0
        fi
        echo    'Loading Linux 4.4.0-1-default ...'
        linux   /vmlinuz-4.4.0-1-default root=UUID=6159e15d-f224-499d-88e0-437b5538f0f1 rootflags=subvol=.snapshots/1/snapshot  
        echo    'Loading initial ramdisk ...'
        initrd  /initrd-4.4.0-1-default
    }
    menuentry 'openSUSE Tumbleweed, with Linux 4.3.3-5-default'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.3.3-5-default-advanced-6159e15d-f224-499d-88e0-437b5538f0f1' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt 
        insmod ext2
        set root='hd1,gpt4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  884f4184-2900-4123-a4be-60df5a0f0ad0
        else
          search --no-floppy --fs-uuid --set=root 884f4184-2900-4123-a4be-60df5a0f0ad0
        fi
        echo    'Loading Linux 4.3.3-5-default ...'
        linux   /vmlinuz-4.3.3-5-default root=UUID=6159e15d-f224-499d-88e0-437b5538f0f1 rootflags=subvol=.snapshots/1/snapshot  quiet splash=silent
        echo    'Loading initial ramdisk ...'
        initrd  /initrd-4.3.3-5-default
    }
    menuentry 'openSUSE Tumbleweed, with Linux 4.3.3-5-default (recovery mode)' --hotkey=1 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.3.3-5-default-recovery-6159e15d-f224-499d-88e0-437b5538f0f1' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt 
        insmod ext2
        set root='hd1,gpt4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4  884f4184-2900-4123-a4be-60df5a0f0ad0
        else
          search --no-floppy --fs-uuid --set=root 884f4184-2900-4123-a4be-60df5a0f0ad0
        fi
        echo    'Loading Linux 4.3.3-5-default ...'
        linux   /vmlinuz-4.3.3-5-default root=UUID=6159e15d-f224-499d-88e0-437b5538f0f1 rootflags=subvol=.snapshots/1/snapshot  
        echo    'Loading initial ramdisk ...'
        initrd  /initrd-4.3.3-5-default
    }
}

### 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_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-AE4A-03B2' {
    insmod part_gpt 
    insmod fat
    set root='hd0,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  AE4A-03B2
    else
      search --no-floppy --fs-uuid --set=root AE4A-03B2
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### 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.
### 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 ###

### BEGIN /etc/grub.d/80_suse_btrfs_snapshot ###
### END /etc/grub.d/80_suse_btrfs_snapshot ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###

/etc/fstab:

UUID=2743aca8-ab1f-44d8-813d-bbb615ba4188 swap swap defaults 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 / btrfs defaults 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /home btrfs subvol=home 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /opt btrfs subvol=opt 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /srv btrfs subvol=srv 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /tmp btrfs subvol=tmp 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /usr/local btrfs subvol=usr/local 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/crash btrfs subvol=var/crash 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/lib/libvirt/images btrfs subvol=var/lib/libvirt/images 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/lib/mailman btrfs subvol=var/lib/mailman 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/lib/mariadb btrfs subvol=var/lib/mariadb 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/lib/mysql btrfs subvol=var/lib/mysql 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/lib/named btrfs subvol=var/lib/named 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/lib/pgsql btrfs subvol=var/lib/pgsql 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/log btrfs subvol=var/log 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/opt btrfs subvol=var/opt 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/spool btrfs subvol=var/spool 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /var/tmp btrfs subvol=var/tmp 0 0
UUID=6159e15d-f224-499d-88e0-437b5538f0f1 /.snapshots btrfs subvol=.snapshots 0 0
UUID=AE4A-03B2       /boot/efi            vfat       umask=0002,utf8=true  0 0
UUID=884f4184-2900-4123-a4be-60df5a0f0ad0    /boot/    ext2    rw,relatime,stripe=4    0 0
UUID=5644A7CA44A7AAE7 /windows             ntfs-3g    ro,users,gid=users,fmask=133,dmask=022,locale=pl_PL.UTF-8 0 0
UUID=EAAE2A7FAE2A4503 /windows/data-and-programs ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=pl_PL.UTF-8 0 0

EDITAR:
Salida de efibootmgr -v:

BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0004
Boot0000* opensuse-secureboot   HD(1,GPT,5a12695d-97ad-485a-b393-c00a89d1b0d8,0x800,0x32000)/File(\EFI\opensuse\shim.efi)
Boot0001* opensuse  HD(1,GPT,5a12695d-97ad-485a-b393-c00a89d1b0d8,0x800,0x32000)/File(\EFI\opensuse\grubx64.efi)
Boot0002* Windows Boot Manager  HD(1,GPT,5a12695d-97ad-485a-b393-c00a89d1b0d8,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d................
Boot0004* UEFI OS   HD(1,GPT,5a12695d-97ad-485a-b393-c00a89d1b0d8,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)

Respuesta1

Por grub shell supongo que te refieres a grub recovery shell en lugar de shell normal.

La razón probablemente se debe al hecho de que la "segunda unidad" no está lista cuando el UEFI ejecuta el binario grub EFI en el ESP (que está en la "primera unidad"), por lo que el binario no pudo ubicar los módulos grub. y grub.cfg (que está en el directorio /boot de sdb3, si no tiene una partición para /boot).

Para resolver esto, puede intentar desactivar cualquier opción de "arranque rápido" en la configuración UEFI (no en Windows). Si aún no funciona, es posible que tenga que reinstalar grub de manera que los módulos y grub.cfg también se coloquen en el ESP (--directorio-arranque /boot/efi, supongamos que --directorio-efi es / boot/efi también). O, en realidad, es posible que desee intentar usar ESP para /boot y esperar que cuando el kernel intente montar el sistema de archivos raíz (sdb3), UEFI prepare la segunda unidad.

información relacionada