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

雙系統重裝 Windows 7 後無法啟動 CentOS 6.4:Grub 修復完整步驟

編輯:Windows 7 系統介紹

問題:Windows 7 重裝覆蓋 MBR 導致 Linux 無法開機

重裝 Windows 7 會覆寫主開機記錄 (MBR),導致原有 CentOS 6.4 的 Grub 開機選單消失。需透過 CentOS 安裝媒體進入救援模式重裝 Grub。

修復步驟

  1. 下載 CentOS-6.4 ISO,用 UltraISO 燒錄至 USB 隨身碟。
  2. BIOS 設定 USB 開機,進入安裝介面選擇 Rescue installed system(救援模式)。
  3. 完成語言/鍵盤/網路設定後,選擇 Shell 進入命令列。
  4. 執行以下指令重裝 Grub:
chroot /mnt/sysimage
/sbin/grub-install /dev/sda
  1. 檢查/編輯 Grub 設定檔:vi /boot/grub/grub.conf
  2. 若缺少 Windows 7 開機項,手動加入:

# Windows
title Windows 7
root (hd0,0)
makeactive
chainloader +1
  1. 存檔離開::wq → exit → reboot 重啟。

關鍵點

  • root (hd0,0) 表示第一顆硬碟第一個分區(Windows 通常安裝於此),請依實際分區調整。
  • 救援模式會自動掛載原系統至 /mnt/sysimage,chroot 後即可操作原環境。
Copyright © Windows教程網 All Rights Reserved