Ubuntu GRUB開機選項修改
创始人
2024-06-23 06:20:16
0

特别值得一提的是Ubuntu GRUB有很多值得学习的地方,这里我们主要介绍Ubuntu GRUB,包括介绍Ubuntu GRUB等方面。Ubuntu GRUB負責管理啟動Linux還是Windows,該如何修改Ubuntu GRUB開機選項呢?

Introduction為什麼需要更改Ubuntu GRUB呢?
1.當Ubuntu更新新的kernel後,Ubuntu GRUB會自動加上新的kernel開機選項,導致開機選項越來越多,想將不必要的開機選項刪除.
2.Ubuntu GRUB預設開機為Ubuntu,你可以想將預設開機改成Windows.
3.修改預設Ubuntu GRUB等待時間.
4.預設不顯示GRUB menu,直接進入Windows.

假如你有以上需求,就得手動修改Ubuntu GRUB開機選項.Solution開啟Ubuntu GRUB開機選項檔sudo gedit /boot/grub/menu.lstQ1.當Ubuntu更新新的kernel後,Ubuntu GRUB會自動加上新的kernel開機選項,導致開機選項越來越多,想將不必要的開機選項刪除.

A1.以下為我所要的開機選項,不需要者可自行刪除之End Default Options

  1. title        Ubuntu, kernel 2.6.20-16-generic  
  2. root        (hd0,6)  
  3. kernel        /boot/vmlinuz-2.6.20-16-generic root=UUID=b923ef76-3246-411c-8095-7bca666b13a5 ro quiet splash  
  4. initrd        /boot/initrd.img-2.6.20-16-generic  
  5. quiet  
  6. savedefault  
  7.  
  8. title        Ubuntu, kernel 2.6.20-16-generic (recovery mode)  
  9. root        (hd0,6)  
  10. kernel        /boot/vmlinuz-2.6.20-16-generic root=UUID=b923ef76-3246-411c-8095-7bca666b13a5 ro single  
  11. initrd        /boot/initrd.img-2.6.20-16-generic  
  12.  
  13. # This entry automatically added by the Debian installer for a non-linux OS  
  14. # on /dev/sda1  
  15. title        Microsoft Windows XP Professional  
  16. root        (hd0,0)  
  17. savedefault  
  18. makeactive  
  19. chainloader    +1 

Q2.Ubuntu GRUB預設開機為Ubuntu,你可以想將預設開機改成Windows.A2.修改

  1. ## default num  
  2. # Set the default entry to the entry number NUM. Numbering starts from 0, and  
  3. # the entry number 0 is the default if the command is not used.  
  4. #  
  5. # You can specify 'saved' instead of a number. In this case, the default entry  
  6. # is the entry saved with the command 'savedefault'.  
  7. # WARNING: If you are using dmraid do not change this entry to 'saved' or your  
  8. # array will desync and will not let you boot your system. 

default  2預設default為 0,表示開機用Ubuntu開機,因為在我的電腦Windows為第三個選項,故default為2Q3.修改預設Ubuntu GRUB等待時間.A3.修改

  1. ## timeout sec  
  2. # Set a timeout, in SEC seconds, before automatically booting the default entry  
  3. # (normally the first entry defined). 

timeout 3預設為10秒鐘,我改成等待3秒鐘Q4.預設不顯示Ubuntu GRUB menu,直接進入Windows.

  1. ## hiddenmenu  
  2. # Hides the menu by default (press ESC to see the menu)  
  3. hiddenmenu 

預設會顯示Ubuntu GRUB menu,若你不想顯示menu,要當按下ESC才顯示,請將hiddenmenu前的#拿掉

【编辑推荐】

  1. Ubuntu grub利用安装光盘硬盘安装ISO文件
  2. Ubuntu GRUB密码设置可分为全局密码和菜单密码
  3. 重装系统后Ubuntu grub的选项
  4. Ubuntu GRUB全局密码和菜单密码
  5. Ubuntu GRUB系统引导器

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
Windows恶意软件20年“... 在Windows的早期年代,病毒游走于系统之间,偶尔删除文件(但被删除的文件几乎都是可恢复的),并弹...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
着眼MAC地址,解救无法享受D... 在安装了DHCP服务器的局域网环境中,每一台工作站在上网之前,都要先从DHCP服务器那里享受到地址动...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...