Edite seu grubenv
(geralmente em /boot/grub
) e remova o marcador recordfail
. (Uma falha de inicialização foi gravada permanentemente no ambiente salvo do grub.)
Eu notei isso primeiro quando eu removi o kernel i386 e deixei no lugar o amd64, então eu instalei o kernel i386 novamente, ainda não funciona. Nada explica porque eu preciso selecionar a opção de inicialização se eu tiver a opção GRUB_TIMEOUT
definida no arquivo de configuração do grub:
➜ ~ grep -v '#' /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR='lsb_release -i -s 2> /dev/null || echo Debian'
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="initrd=/install/initrd.gz"
grub.cfg
➜ ~ cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
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='hd1,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 --hint='hd1,msdos7' cead26d6-08f4-4894-ac78-a9a4ce59f773
else
search --no-floppy --fs-uuid --set=root cead26d6-08f4-4894-ac78-a9a4ce59f773
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
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd1,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 --hint='hd1,msdos8' 0cef2d59-21ca-4ba2-a9b2-0b9ef1f42589
else
search --no-floppy --fs-uuid --set=root 0cef2d59-21ca-4ba2-a9b2-0b9ef1f42589
fi
insmod png
if background_image /braiam/.cache/gnome-control-center/backgrounds/14fb12e1345ca2dfd3807e7f7b1122b0d6015d9453ed5742de72b988a9cffded; then
set color_normal=white/black
set color_highlight=black/white
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.13-1-amd64 ...'
linux /vmlinuz-3.13-1-amd64 root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.13-1-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
menuentry 'Debian GNU/Linux, with Linux 3.13-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13-1-amd64-advanced-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.13-1-amd64 ...'
linux /vmlinuz-3.13-1-amd64 root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.13-1-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.13-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13-1-amd64-recovery-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.13-1-amd64 ...'
linux /vmlinuz-3.13-1-amd64 root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.13-1-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.12-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12-1-amd64-advanced-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.12-1-amd64 ...'
linux /vmlinuz-3.12-1-amd64 root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.12-1-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.12-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12-1-amd64-recovery-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.12-1-amd64 ...'
linux /vmlinuz-3.12-1-amd64 root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.12-1-amd64
}
}
### 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+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux16 /memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
multiboot /memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd1,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
multiboot /memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-AA64B45A64B42AC9' {
insmod part_msdos
insmod ntfs
set root='hd1,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='hd1,msdos1' AA64B45A64B42AC9
else
search --no-floppy --fs-uuid --set=root AA64B45A64B42AC9
fi
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
Eu tentei limpar o grub, removendo o arquivo grub.cfg, alterando o GRUB_DEFAULT=0
e nada melhorou.
Tente adicionar isso a /etc/default/grub
:
GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT
Isso deve modificar isso:
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
set timeout=5
fi
Para que ambos os tempos limite sejam iguais. Se isso não funcionar, encontre a seção em '/etc/grub.d/00_header que se parece com isto:
if [ "\${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=${2}
fi
E remova o if clause
para ter apenas:
set timeout=${2}
${2}
pode ou não ser o valor original. Se não for, não mude isso.
Tags grub2