我目前正在尝试各种发行版,因此在启动笔记本电脑时,我可以选择几种操作系统。通常,所有这些发行版都会安装grub2
并定位在列表的顶部,因此它们是安装完成后默认启动的发行版。
但是曼贾罗做了些不同的事情。它安装了该版本的某个版本,grub2
该版本会记住我上次启动的发行版,并一直启动该发行版(重新启动时),直到我选择了另一个发行版(然后它将启动该发行版,依此类推)。
我想像过吗?Manjaro真的这样做吗?如果是这样,如何将那个版本的grub
系统安装到我的系统上?干杯。
这是我的/etc/grub.d/40_custom
文件:
#!/bin/sh
exec tail -n +3 $0
# 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.
这是我的/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=saved
GRUB_SAVEDEFAULT=true
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3
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"
/etc/default/grub
,将行更改为GRUB_DEFAULT=0
,GRUB_DEFAULT=saved
并添加了GRUB_SAVEDEFAULT=true
不需要的行。然后我sudo update-grub
。重新启动并选择了一个发行版来启动,与顶级发行版不同。再次重新启动,默认情况下选择了顶部(而不是我之前选择的)发行版并进行了启动。
grub
),但是它没有用。即使我之前选择了另一个发行版,顶部发行版也会在重新启动时启动。