Ubuntu GRUB開機(jī)選項(xiàng)修改
特別值得一提的是Ubuntu GRUB有很多值得學(xué)習(xí)的地方,這里我們主要介紹Ubuntu GRUB,包括介紹Ubuntu GRUB等方面。Ubuntu GRUB負(fù)責(zé)管理啟動(dòng)Linux還是Windows,該如何修改Ubuntu GRUB開機(jī)選項(xiàng)呢?
Introduction為什麼需要更改Ubuntu GRUB呢?
1.當(dāng)Ubuntu更新新的kernel後,Ubuntu GRUB會(huì)自動(dòng)加上新的kernel開機(jī)選項(xiàng),導(dǎo)致開機(jī)選項(xiàng)越來(lái)越多,想將不必要的開機(jī)選項(xiàng)刪除.
2.Ubuntu GRUB預(yù)設(shè)開機(jī)為Ubuntu,你可以想將預(yù)設(shè)開機(jī)改成Windows.
3.修改預(yù)設(shè)Ubuntu GRUB等待時(shí)間.
4.預(yù)設(shè)不顯示GRUB menu,直接進(jìn)入Windows.
假如你有以上需求,就得手動(dòng)修改Ubuntu GRUB開機(jī)選項(xiàng).Solution開啟Ubuntu GRUB開機(jī)選項(xiàng)檔sudo gedit /boot/grub/menu.lstQ1.當(dāng)Ubuntu更新新的kernel後,Ubuntu GRUB會(huì)自動(dòng)加上新的kernel開機(jī)選項(xiàng),導(dǎo)致開機(jī)選項(xiàng)越來(lái)越多,想將不必要的開機(jī)選項(xiàng)刪除.
A1.以下為我所要的開機(jī)選項(xiàng),不需要者可自行刪除之End Default Options
- title Ubuntu, kernel 2.6.20-16-generic
- root (hd0,6)
- kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=b923ef76-3246-411c-8095-7bca666b13a5 ro quiet splash
- initrd /boot/initrd.img-2.6.20-16-generic
- quiet
- savedefault
- title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
- root (hd0,6)
- kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=b923ef76-3246-411c-8095-7bca666b13a5 ro single
- initrd /boot/initrd.img-2.6.20-16-generic
- # This entry automatically added by the Debian installer for a non-linux OS
- # on /dev/sda1
- title Microsoft Windows XP Professional
- root (hd0,0)
- savedefault
- makeactive
- chainloader +1
Q2.Ubuntu GRUB預(yù)設(shè)開機(jī)為Ubuntu,你可以想將預(yù)設(shè)開機(jī)改成Windows.A2.修改
- ## default num
- # Set the default entry to the entry number NUM. Numbering starts from 0, and
- # the entry number 0 is the default if the command is not used.
- #
- # You can specify 'saved' instead of a number. In this case, the default entry
- # is the entry saved with the command 'savedefault'.
- # WARNING: If you are using dmraid do not change this entry to 'saved' or your
- # array will desync and will not let you boot your system.
default 2預(yù)設(shè)default為 0,表示開機(jī)用Ubuntu開機(jī),因?yàn)樵谖业碾娔XWindows為第三個(gè)選項(xiàng),故default為2Q3.修改預(yù)設(shè)Ubuntu GRUB等待時(shí)間.A3.修改
- ## timeout sec
- # Set a timeout, in SEC seconds, before automatically booting the default entry
- # (normally the first entry defined).
timeout 3預(yù)設(shè)為10秒鐘,我改成等待3秒鐘Q4.預(yù)設(shè)不顯示Ubuntu GRUB menu,直接進(jìn)入Windows.
- ## hiddenmenu
- # Hides the menu by default (press ESC to see the menu)
- hiddenmenu
預(yù)設(shè)會(huì)顯示Ubuntu GRUB menu,若你不想顯示menu,要當(dāng)按下ESC才顯示,請(qǐng)將hiddenmenu前的#拿掉
【編輯推薦】