我在干净的驱动器上安装了Linux Mint 20,但在启动时仍会得到该终端。
GNU GRUB version 2.02
Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.
grub> _
我是Linux的新手,不知道它的用途,但是我以前从未在Mint 19上看到过它。我可以使用“退出”命令跳过它,但是我想完全避免它。我找到了很多与此主题有关的讨论,但他们都在谈论双重引导问题,这不适用于我的情况。
我尝试通过以下方式编辑此grub配置文件:
xed admin:///etc/default/grub
这是当前状态:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0.0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0.0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
有一条评论提到“ /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
if [ "${initrdfail}" = 2 ]; then
set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
set next_entry="${prev_entry}"
set prev_entry=
save_env prev_entry
if [ "${next_entry}" ]; then
set initrdfail=2
fi
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
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 initrdfail {
if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
if [ -z "${initrdfail}" ]; then
set initrdfail=1
if [ -n "${boot_once}" ]; then
set prev_entry="${default}"
save_env prev_entry
fi
fi
save_env initrdfail
fi; fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; 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,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 9352d93a-2417-49fe-8ed3-02e348bc18ec
else
search --no-floppy --fs-uuid --set=root 9352d93a-2417-49fe-8ed3-02e348bc18ec
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=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 20 Cinnamon' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9352d93a-2417-49fe-8ed3-02e348bc18ec' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,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 9352d93a-2417-49fe-8ed3-02e348bc18ec
else
search --no-floppy --fs-uuid --set=root 9352d93a-2417-49fe-8ed3-02e348bc18ec
fi
linux /boot/vmlinuz-5.4.0-42-generic root=UUID=9352d93a-2417-49fe-8ed3-02e348bc18ec ro quiet splash
initrd /boot/initrd.img-5.4.0-42-generic
}
submenu 'Advanced options for Linux Mint 20 Cinnamon' $menuentry_id_option 'gnulinux-advanced-9352d93a-2417-49fe-8ed3-02e348bc18ec' {
menuentry 'Linux Mint 20 Cinnamon, with Linux 5.4.0-42-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-42-generic-advanced-9352d93a-2417-49fe-8ed3-02e348bc18ec' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,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 9352d93a-2417-49fe-8ed3-02e348bc18ec
else
search --no-floppy --fs-uuid --set=root 9352d93a-2417-49fe-8ed3-02e348bc18ec
fi
echo 'Loading Linux 5.4.0-42-generic ...'
linux /boot/vmlinuz-5.4.0-42-generic root=UUID=9352d93a-2417-49fe-8ed3-02e348bc18ec ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-42-generic
}
menuentry 'Linux Mint 20 Cinnamon, with Linux 5.4.0-42-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-42-generic-recovery-9352d93a-2417-49fe-8ed3-02e348bc18ec' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,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 9352d93a-2417-49fe-8ed3-02e348bc18ec
else
search --no-floppy --fs-uuid --set=root 9352d93a-2417-49fe-8ed3-02e348bc18ec
fi
echo 'Loading Linux 5.4.0-42-generic ...'
linux /boot/vmlinuz-5.4.0-42-generic root=UUID=9352d93a-2417-49fe-8ed3-02e348bc18ec ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-42-generic
}
menuentry 'Linux Mint 20 Cinnamon, with Linux 5.4.0-26-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-26-generic-advanced-9352d93a-2417-49fe-8ed3-02e348bc18ec' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,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 9352d93a-2417-49fe-8ed3-02e348bc18ec
else
search --no-floppy --fs-uuid --set=root 9352d93a-2417-49fe-8ed3-02e348bc18ec
fi
echo 'Loading Linux 5.4.0-26-generic ...'
linux /boot/vmlinuz-5.4.0-26-generic root=UUID=9352d93a-2417-49fe-8ed3-02e348bc18ec ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-26-generic
}
menuentry 'Linux Mint 20 Cinnamon, with Linux 5.4.0-26-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-26-generic-recovery-9352d93a-2417-49fe-8ed3-02e348bc18ec' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,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 9352d93a-2417-49fe-8ed3-02e348bc18ec
else
search --no-floppy --fs-uuid --set=root 9352d93a-2417-49fe-8ed3-02e348bc18ec
fi
echo 'Loading Linux 5.4.0-26-generic ...'
linux /boot/vmlinuz-5.4.0-26-generic root=UUID=9352d93a-2417-49fe-8ed3-02e348bc18ec ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.4.0-26-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### 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 ###
“ lsblk”命令:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232,9G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 232,4G 0 part /
=====================================
UEFI菜单有4个选项:Ubuntu,Ubuntu,SSD和某种设置。首先,Ubuntu选项会以常规方式启动我的操作系统,首先显示此GRUB菜单,然后输入“退出”,然后加载Mint。第二个Ubuntu,给我2个GRUB菜单,一个接一个,然后Mint加载。选择SSD将绕过这些GRUB菜单(根本不会显示它们),这是我想要的结果。
解决方案:在BIOS中,我只是将SSD设置为第一个引导选项,而GRUB控制台就不再存在!
由于您最近安装了新版本的OS,因此您看到的“控制台”可能是GRUB的过时安装,当前已引导的系统未维护该控制台。您可能需要调整系统的引导顺序设置,以避免过时的GRUB实例,然后可能将其从系统中删除。
尝试运行sudo efibootmgr -v
并将输出复制并编辑为原始问题。
如果您的系统以UEFI风格引导,则可能存在与安全启动相关的次要问题:安装脚本可能最初为GRUB创建了“纯”启动项,而没有使用“安全启动” shim引导程序,并且使用“安全启动”创建了另一个引导选项。shimx64.efi
引导程序。如果安全启动有效,则“普通” GRUB将无法加载任何可执行代码,因为GRUB模块将不会使用安全启动可识别的Windows PE可执行格式。结果,它进入了GRUB shell提示符。
退出“普通” GRUB后,另一个引导项将通过shimx64.efi
引导加载程序启动GRUB ,这使GRUB可以在存在安全引导的情况下工作。
如果这是您遇到的问题,则只需标识使用的引导条目,shimx64.efi
并将其设置为固件引导顺序中的第一个即可。该efibootmgr
命令可以做到这一点。
甚至可能是以前的Mint 19安装中的旧引导项仍然存在,并引起了混乱。
在sudo efibootmgr -v
输出中,第一行应为BootCurrent: XXXX
where,XXXX
将是一个四位数的十六进制数。它标识了引导当前正在运行的OS的引导项。如果其编号当前不是BootOrder:
输出行中的第一个,则需要对其进行修复。
因此,如果sudo efibootmgr -v
输出看起来像这样:
BootCurrent: XXXX
Timeout: 1 seconds
BootOrder: YYYY, XXXX, ZZZZ, <...possibly other numbers...>
BootXXXX* Mint 20 <....> File(\EFI\Mint\SHIMX64.EFI)
<other boot entries...>
BootXXXX
目前这不是中的第一个BootOrder
,因此您需要将其设置为第一个,如下所示:
sudo efibootmgr -o XXXX,YYYY,ZZZZ,<any other Boot numbers listed in the original BootOrder line...>
请注意,尽管原始BootOrder:
行在逗号后有空格,但是在指定sudo efibootmgr -o ...
命令的引导号时不应使用空格。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句