雙系統 (Linux + Win7) 環境下,GRUB 損壞或誤刪 Linux 分區導致 Win7 無法開機,需手動修復 MBR。以下彙整 GRUB 指令模式引導與 Win7 MBR 修復完整指令。
grub> root (hd0,0) # 指定 /boot 所在分區 (第一顆硬碟第一分區)
grub> kernel /vmlinuz # 指定核心映像檔 (若在子目錄如 /boot/vmlinuz-... 則填完整路徑)
grub> initrd /initrd # 指定初始虛擬檔案系統
grub> boot # 開始引導
grub> rootnoverify (hd0,0) # 指定 Windows 系統分區,不驗證檔案系統
grub> chainloader +1 # 鏈式載入分區啟動區
grub> makeactive # 標記為作用中分區
grub> boot # 執行引導
bcdedit # 列出所有開機項目,記下 identifier (如 {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx})
bcdedit /delete {ID} /f # 刪除指定項目,ID 需含大括號
# 注意:{current} 為目前使用項目勿刪,Linux 項目若仍需保留也勿刪
bootrec /fixmbr (修復主開機記錄)bootrec /fixboot (修復開機磁區)若執行上述仍出現 GRUB 選單,需使用安裝媒體中的 bootsect.exe:
# 將 bootsect.exe 複製到系統碟 (C:)
bootsect /nt60 C: /mbr
此指令將 MBR 覆寫為 Windows 7 相容的 NT60 開機程式碼,徹底移除 GRUB。
\EFI\Microsoft\Boot\bootmgfw.efi。