狼愛上貍

          我胡漢三又回來了

          修改Ubuntu啟動菜單-使XP變為默認操作系統

          自從裝了Ubuntu和XP雙系統后,變得很麻煩,每次都得在啟動菜單上選來選去,浪費了不少時間。


          現在想修改使XP成為默認的操作系統,怎么辦呢?

          其實很簡單,修改 /boot/grub/menu.lst 文件,使其中default值變動一下即可。
          過程如下:

          1、打開命令行終端;
          2、輸入:
          sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
          sudo gedit /boot/grub/menu.lst
          注: 第一句做備份用。
          3、假設文件內容如下:
          -------------------------------------------------------------
          # menu.lst - See: grub(8), info grub, update-grub(8)
          # grub-install(8), grub-floppy(8),
          # grub-md5-crypt, /usr/share/doc/grub
          # and /usr/share/doc/grub-doc/.

          ## 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 0

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

          ## hiddenmenu
          # Hides the menu by default (press ESC to see the menu)
          #hiddenmenu


          ## ## End Default Options ##

          title Ubuntu, kernel 2.6.15-23-386
          root (hd0,2)
          kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash
          initrd /boot/initrd.img-2.6.15-23-386
          savedefault
          boot

          title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
          root (hd0,2)
          kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single
          initrd /boot/initrd.img-2.6.15-23-386
          boot

          title Ubuntu, memtest86+
          root (hd0,2)
          kernel /boot/memtest86+.bin
          boot

          ### END DEBIAN AUTOMAGIC KERNELS LIST

          # This is a divider, added to separate the menu items below from the Debian
          # ones.
          title Other operating systems:
          root
          # This entry automatically added by the Debian installer for a non-linux OS
          # on /dev/hda1
          title Microsoft Windows XP Professional
          root (hd0,0)
          savedefault
          makeactive
          chainloader +1
          -------------------------------------------------------------
          現在default值為0,意即啟動排行第一的操作系統,這里代表的就是Ubuntu, kernel 2.6.15-23-386。
          現在把它修改成“default 4”,那么XP就成為默認的操作系統了。
          因為從零數起,以title打頭的Microsoft Windows XP Professional這一行排序為4。
          另外我們還可以通過修改timeout的值來變更默認等待時間。

          來自:http://blog.sina.com.cn/u/4c480f17010009z1

          posted on 2007-07-21 07:59 狼愛上貍 閱讀(14846) 評論(2)  編輯  收藏 所屬分類: LINUX

          評論

          # re: 修改Ubuntu啟動菜單-使XP變為默認操作系統 2008-04-20 23:13 StovintPan

          頂一下,我正要解決這個問題呢!Thank u!  回復  更多評論   

          # re: 修改Ubuntu啟動菜單-使XP變為默認操作系統 2009-08-19 04:10 ETCOW

          THANK YOU SO MUCH! 學到東西了  回復  更多評論   

          主站蜘蛛池模板: 扬州市| 延边| 沙雅县| 临夏市| 恩施市| 阿克苏市| 鄂温| 桐城市| 定安县| 民和| 遂平县| 太湖县| 长春市| 嵊泗县| 夏河县| 尚义县| 阿瓦提县| 吉隆县| 镇康县| 达拉特旗| 成都市| 昌图县| 龙胜| 凌云县| 金堂县| 凉山| 罗山县| 志丹县| 吴堡县| 新沂市| 开远市| 方山县| 岳池县| 克东县| 万宁市| 凉城县| 平潭县| 若尔盖县| 大理市| 阿图什市| 永济市|