grub
出自DebianWiki
Linux 還有另外一個名為 Grub ,新的開機管理程式。
由於 Grub 將成為 Debian Sarge 預設的開機管理程式,所以有必要在此詳加介紹。
和 LILO 類似的,Grub 也是使用其專屬的設定檔,/boot/grub/menu.lst,來設定開機之項目。如:
# 設定開機時的延遲時間 timeout 5 # 設定開機時,選單/項目的顏色。 # 依序為:選單背景/選單文字 項目背景/項目文字 color black/cyan yellow/cyan # 預設的開機項目。 # 和 LILO 不同的是,在這裡要填入的是項目的次序 default 0 # Grub 可以設定開機的背景圖。 # 其實 LILO 也可以,請參考 man lilo.conf 之說明。 splashimage=(hd0,1)/boot/grub/splash.xpm.gz # 設定開機選項。 # 和一般的認知不同的是,Grub 所有的次序都是由 0 開始計算的。 # 如: (hd0,1) 就表示了第一顆硬碟的第二個分割區。 title Debian GNU/Linux # 如有其它的開機選項,如:quite,可以加這一行的最後頭。 kernel (hd0,1)/vmlinuz root=/dev/hda2 initrd /boot/initrd-2.4.18-3.img # 而 MS Windows 2000 的設定方法則是如下。 title MS Windows 2000 rootnoverify (hd0,0) makeactive chainloader +1 # MS Windows 系列是無法由第二顆硬碟開機的, # 如果您有 MS Windows 是安裝在第二顆硬碟上, # 可以試試以下方式,讓 MS Windows 的 Boot Loader 能夠開機。 title Windows XP map (hd0) (hd1) map (hd1) (hd0) rootnoverify (hd1,0) chainloader +1
在設定完畢之後, 使用 grub-install /dev/hda 來將設定寫入 MBR 中即可。
如果你不想這麼麻煩,可以試著以root身份用update-grub這個指令,來替你自動更新/boot/grub/menu.lst的內容,很方便的。
[編輯] Related articles
[編輯] External links
- GRUB Manual
- GRUB homepage
- Grub wiki
- Linux+Win+Grub HowTo
- Linux Recovery and Boot Disk Creation with Grub.
- Win32 Grub
- Booting with GRUB
- WinGRUB
- GRUB Installer for Windows
- GRUB for DOS - Bridging DOS/Windows to Unix/Linux
![[Main Page]](/upload/4/49/Debian_taiwan_out.png)