Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win7 硬碟安裝 BT4 (BackTrack 4) 完整教學:Grub4DOS + BCD 引導雙系統

編輯:Windows 7 系統介紹

在 Windows 7 環境下,透過 Grub4DOS 實現 Linux 發行版 (BackTrack 4) 的硬碟安裝雙啟動。本文記錄從 Grub4DOS 部署、BCD 編輯、menu.lst 撰寫、BT4 ISO 解壓部署到雙層啟動選單優化的完整技術流程。

工具與材料

  • Grub4DOS (含 grldr、grldr.mbr、menu.lst)。
  • BT4 ISO (BackTrack 4 Final 或 R2)。
  • Win7 系統 (C 盤),目標安裝分區 (如第 2 邏輯分區,對應 Grub (hd0,5))。

部署 Grub4DOS 至 C 盤根目錄

  1. 解壓 Grub4DOS,將 grldr、menu.lst、grldr.mbr 複製至 C:\ 根目錄。

建立 BCD 啟動項目指向 Grub4DOS

  1. 管理員 CMD 執行:
    bcdedit /create /d "Grub" /application bootsector
    記錄輸出的 GUID `{ID}`。
  2. 設定引導參數:
    bcdedit /set {ID} device boot
    bcdedit /set {ID} path \grldr.mbr
    bcdedit /displayorder {ID} /addlast
    bcdedit /timeout 5

編輯 C:\menu.lst (Grub4DOS 選單)

color black/cyan yellow/cyan
timeout=5
default=0

title Windows 7
find --set-root /bootmgr
chainloader /bootmgr
boot

title BT4
find --set-root /boot/vmlinuz
kernel (hd0,5)/boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x317
initrd (hd0,5)/boot/initrd.gz
boot

分區編號對應:Grub 邏輯分區從 4 起算,`(hd0,5)` = 第 2 邏輯分區 (通常為 E 盤)。請用 `find --set-root /boot/vmlinuz` 自動定位確認。

部署 BT4 系統檔案

  1. 將 BT4 ISO 解壓至目標分區 (對應 `(hd0,5)`) 根目錄,保留 `/boot/vmlinuz`、`/boot/initrd.gz`、`/casper/filesystem.squashfs` 等結構。

啟動驗證與雙層選單優化

  1. 重開機 → 選單 1:Win7 BCD 選單 (含 Windows 7、Grub)。
  2. 選 Grub → 選單 2:Grub4DOS 選單 (含 Windows 7、BT4)。
  3. 若嫌雙層麻煩,用 EasyBCD 修改 BCD 選單名稱/順序/超時,或直接刪除 Grub 項目 (僅保留 Win7 直接啟動),Grub 選單作為次級入口。

注意事項

  • BT4 基於 Ubuntu 8.04,核心較舊,新硬體可能缺驅動 (顯卡/無線網卡),建議改用 Kali Linux (BackTrack 繼承者) 同邏輯部署。
  • Grub4DOS 僅支援 MBR 分區表,GPT/UEFI 環境需改用 rEFInd/Grub2 EFI 方案。
  • 安裝過程涉及引導扇區修改,操作前備份重要資料。
Copyright © Windows教程網 All Rights Reserved