Ubuntu启动没有启菜单选项解决方案

Tips:

一般情况下,虚拟机启动时,长按 ESC键就会出现,实体机请参考:Ubuntu启动时无法进入menu菜单选项解决方案。

解决教程

1、打开系统命令行,使用管理员身份编辑 /etc/default/grub 文件,命令如下:

Ubuntu-user:~/Desktop$ su
Password:
root@Ubuntu-PC:/home/Ubuntu-user/Desktop$ gedit /etc/default/grub

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_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

2、修改 GRUB_TIMEOUT_STYLE=hidden、GRUB_TIMEOUT=0的默认值,修改完成后保存,如下:

# 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
#把hidden 隐藏,修改成菜单
GRUB_TIMEOUT_STYLE=menu
#把超时时间0秒,修改成5秒【根据个人需要修改】
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

3、退出root用户,使用普通用户执行如下命令,使得修改的grub文件生效,如下:

root@Ubuntu-PC:/home/Ubuntu-user/Desktop$ exit

#此处有的用户可能是 sudo update-grub2 命令【两者等同,无任何区别,只是不同系统版本有所差别】
Ubuntu-user:~/Desktop$ sudo update-grub
[sudo] password for Ubuntu-user:

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.0-39-generic
Found initrd image: /boot/initrd.img-6.2.0-39-generic
Found linux image: /boot/vmlinuz-5.15.0-43-generic
Found initrd image: /boot/initrd.img-5.15.0-43-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Ubuntu-user:~/Desktop$ 

4、此时我们再次重启系统,就发现启动菜单 Menu又重新回来啦,如图:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Darrich

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值