我希望我的电脑自动启动 Ubuntu 系统。但它总是从这个列表开始:
Linux 3.2.0-57-generic-pae
Linux 3.2.0-57-generic-pae (recovery mode)
Linux Privous
Memory test (memtest86+)
我希望我的计算机自动启动到 Linux 3.2.0-57-generic-pae。
这是我的/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_SAVEDEFAULT=true
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem=4G video=LVDS-1:d"
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"
答案1
运行这个:
sudo nano /etc/default/grub
并将此行设置为saved
,并#
从中删除任何内容:
GRUB_DEFAULT=saved
另外,将此行设置为true
:
GRUB_SAVEDEFAULT=true
如果文件中没有这些行,请添加它们。
编辑:
要完全摆脱 GRUB,请将其设置为0
:
GRUB_TIMEOUT=0
但有时显示 GRUB 很有用,需要恢复系统,或者启动到不同的内核,所以您可能需要将其设置为 1 或 2 秒:
GRUB_TIMEOUT=2
您还可以隐藏菜单,除非在2
几秒的时间段内按下了某个键:
GRUB_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT=2
Ctrl然后使用+保存,并使用+O退出。CtrlX
然后运行:
sudo update-grub
这将更新配置。现在,它应该自动选择您之前选择的条目作为默认条目,并在定时延迟后消失,并隐藏(如果您希望的话)。
详细了解编辑grub
这里