Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

重裝 Windows 7 後修復 CentOS 6.4 GRUB 啟動引導

編輯:Linux 教學

問題原因

Windows 安裝程式會覆寫 MBR,導致原有 GRUB 消失,無法啟動 Linux。

修復流程(使用 CentOS 安裝光碟救援模式)

  1. 下載 CentOS-6.4 ISO,用 UltraISO 燒錄 U 盤
  2. BIOS 設定 U 盤啟動,進入安裝介面選擇 Rescue installed system
  3. 依提示設定語言、鍵盤、網路(可跳過),選擇 Continue 掛載系統至 /mnt/sysimage
  4. 進入 Shell 環境,執行:
chroot /mnt/sysimage
/sbin/grub-install /dev/sda

檢查並修正 GRUB 配置

vi /boot/grub/grub.conf

確認 root (hd0,0)、kernel、initrd 路徑正確。若缺少 Windows 啟動項,手動添加:

# Windows 7
title Windows 7
root (hd0,0)
makeactive
chainloader +1

完成並重啟

exit
reboot

注意事項

  • /dev/sda 為第一顆實體硬碟,若 Linux 安裝在其他硬碟請對應修改
  • 若使用 UEFI+GPT,需改用 grub2-install 並掛載 EFI 分區
  • 修復前建議備份重要資料
Copyright © Windows教程網 All Rights Reserved