GRUB(Grand Unified Bootloader)是 Linux 經典開機管理程式,支援多作業系統彈性引導。本文記錄雙硬碟環境安裝 Windows 2000 + Red Hat 9 + Mandrake 9.1 三系統共存的完整流程,原理適用於現代 Windows/Linux 多重開機。
| 硬碟 | 分區 | 掛載點/用途 | 檔案系統 | 大小建議 |
|---|---|---|---|---|
| 第一顆 (hda) | hda1 | Windows 系統碟 (C:) | NTFS/FAT32 | 80 GB |
| 第二顆 (hdb) | hdb1 | /boot (共用) | ext3 | 100-200 MB |
| hdb2 | swap | swap | 記憶體 1-1.5 倍 (≥512MB 同記憶體大小) | |
| hdb3 | / (Red Hat) | ext3 | 5-10 GB | |
| hdb5 | / (Mandrake) | ext3 | 5-10 GB |
關鍵原則:Windows 安裝於第一顆硬碟主分區;Linux 系統分區分離,共用 /boot 與 swap;EXT3 格式 Windows 無法識別,避免誤操作。
以 root 身分編輯 /boot/grub/grub.conf(或 menu.lst),參考範例:
default=0
timeout=10
splashimage=(hd1,2)/boot/grub/splash.xpm.gz
title Windows 2000
rootnoverify (hd0,0)
chainloader +1
title Red Hat 9
root (hd1,2)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img
title Mandrake 9.1
kernel (hd1,4)/boot/vmlinuz root=/dev/hdb5 quiet devfs=mount acpi=off vga=788
initrd (hd1,4)/boot/initrd.img
| 參數 | 說明 |
|---|---|
default=X | 預設啟動項目索引 (0 起算) |
timeout=X | 選單等待秒數 |
splashimage | 開機選單背景圖路徑 (GRUB 表示法) |
root (hdX,Y) | Linux 核心所在分區:X=硬碟索引(0起算),Y=分區索引(0起算,邏輯分區從 4 開始) |
rootnoverify (hdX,Y) | 不掛載檔案系統,直接鏈結載入(用於 Windows) |
chainloader +1 | 載入目標分區第一磁區 (MBR/VBR) |
kernel /path/vmlinuz ... | 核心映像路徑與啟動參數 |
initrd /path/initrd.img | 初始化虛擬磁碟映像 |
(hd0) = 第一顆硬碟 (hda/sda)(hd0,0) = 第一顆硬碟第一主分區 (hda1/sda1)(hd1,4) = 第二顆硬碟第一邏輯分區 (hdb5/sdb5)rootnoverify 改為 rootroot= 參數對應正確分區裝置名稱Windows Server 2008 關閉 Ctrl+Alt+Del 登入強制組合鍵
Windows Server 2008 共享資源無法存取?分階段排查指南
Windows Server 2008 與 Windows 7 共存啟動修復實戰筆記
Windows Server 2008 十大全新亮點:虛擬化、Server Core、IIS7、BitLocker 重塑伺服器體驗
深入探索 Windows Server 2008 文件搜尋與索引優化技巧
啟用 Windows Server 2008 網路層級驗證 (NLA) 強化遠端桌面安全