看到论坛里对于Ubuntu 9.10的grub2配置说明,忍不住说一下。其实对于grub2,ubuntu给了一个官方的配置文件/etc/default/grub。大部分情况下grub2的设置都可以在这个文件中搞定,而且这个文件结构也比较简单,修改起来也容易。完全没有必要直接改/boot/grub/grub.cfg或者/etc/grub.d/下的文件。 修改/etc/default/grub只需简单一个命令: 代码: sudo gedit /etc/default/grub 下面是系统默认的内容,以及最常用的修改菜单显示时间和默认操作系统的方法: 代码: # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. GRUB_DEFAULT=0 #将0改为saved,可让grub记住上次启动时选择的系统 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="5" #显示启动选择菜单的时间 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" # 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 entrys #GRUB_DISABLE_LINUX_RECOVERY="true" 修改完成后使用命令: 代码: sudo update-grub 会自动更新/boot/grub/grub.cfg,这样做最大的好处是当系统更新内核时,你的设置不会被覆盖掉。 另外对于从9.10 beta及以前一路升级上来的朋友,如果确定想使用grub2,手动运行:
代码: sudo apt-get install grub2 升级并 ...
|