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

Linux 系統清除 GRUB 的四種實用方法

編輯:Linux 教學

前言

當 Windows 與 Linux 共存時,若需移除 GRUB 直接啟動 Windows,可根據情境選擇下列四種方案。

方案一:DOS 下使用 fdisk /mbr

使用 Windows 98 或 DOS 開機磁碟進入純 DOS 環境,執行:

fdisk /mbr

即可將主開機記錄(MBR)還原為 Windows 標準啟動碼。

方案二:Linux 下以 dd 還原 MBR 前 446 位元組

前提:安裝 Linux 前已備份 MBR 為 /boot/boot.NNNN。在 Linux 終端執行:

dd if=/boot/boot.NNNN of=/dev/hda bs=446 count=1

原理: MBR 共 512 位元組,前 446 位元組為啟動程式碼,其後 64 位元組為分割表,最後 2 位元組為結束標記。僅寫入前 446 位元組可保留分割表不受損。

方案三:使用 Clear MBR 0.9 工具

在 Windows 下執行 Clear MBR 即可一鍵清除 GRUB。

方案四:Linux 分割區已被刪除,停留在 grub> 提示符

  1. 同方案一,用 DOS 開機磁碟執行 fdisk /mbr。
  2. 在 grub> 提示符下手動鏈結啟動 Windows:
    rootnoverify (hd0,0)
    chainloader +1
    boot

    若 (hd0,0) 非 Windows 分割區,依序嘗試 (hd0,1)、(hd0,2)… 直到啟動成功,進入 Windows 後再用方案三清除。

  3. 使用 Windows 安裝光碟進入修復主控台,執行 fixboot 與 fixmbr。

注意事項

fixmbr 若偵測到非標準分割表,會提示確認;除非確定磁碟無誤,否則勿執行,以免破壞分割表導致資料無法存取。

Copyright © Windows教程網 All Rights Reserved