在Windows下刪除Linux系統的方法

   在以前電腦安裝了雙系統,Windows和Linux,不過由於現在用虛擬機了,所以我打算刪除Linux。

錯誤信息如下:

GRUB Loading stage1.5
GRUB loading , please wait...
Error 22

 

估計原因是GRUB指向的linux分區已經刪除,而MBR裏面又沒有Windows的引導信息。

自己瞎整了半天,一度想吐血全盤格式化,最後總結經驗如下:
   刪除Linux最需要注意的地方,就是MBR(Master Boot Record)。在刪除Linux分區前,我們需要將啓動Windows的引導信息寫入MBR,否則,MBR中的Linux引導信息,當然就不能啓動Windows系統了。

一:將Windows的引導信息寫入MBR
   寫入MBR的方法,有兩種比較簡單
   第1種方法:就是將Windows的安裝盤放入計算機以後,重啓計算機,進入Windows安裝程序,隨後,進入恢復控制檯,輸入命令fixmbr即可。
   第2種方法是爲沒有Windows安裝盤的朋友準備的,就是使用MBRFix工具進行修復。
   MBRFix工具修復MBR很方便,先進入cmd命令窗口,然後進入mbrfix工具所在的目錄(用cd命令),然後輸入命令 MbrFix /drive 0 fixmbr ,再確認一下即可。重啓以後你會發現,沒有了Linux,直接可以進入Windows了。

二:刪除Linux分區
   最後一件事情,就是刪除Linux所在的分區,這個很簡單,您可以使用patition的分區工具,將該分區格式化成fat32或ntfs格式,就可以在Windows下使用了。
   請不要使用Windows自帶的分區工具進行分區,因爲Windows自帶的分區工具不能識別Linux分區。如果您使用了Windows自帶的分區工具,那麼您的硬盤數據極有可能被破壞(我有過慘痛經歷)。如果您的硬盤數據被破壞了,那麼請用能夠修復分區的數據恢復軟件進行修復,不過不一定成功喔,看人品了~




附:MbrFix命令

Commands:

    MbrFix /drive <num> driveinfo              Display drive information
MbrFix /drive <num> listpartitions Display partition information
MbrFix /drive <num> savembr <file> Save MBR and partitions to file
MbrFix /drive <num> restorembr <file> Restore MBR and partitions from file
MbrFix /drive <num> fixmbr Update MBR code to W2K/XP/2003
MbrFix /drive <num> clean Delete partitions in MBR
MbrFix /drive <num> readsignature {/byte} Read disk signature from MBR
MbrFix /drive <num> generatesignature Generate disk signature in MBR
MbrFix /drive <num> readstate Read state from byte 0x1b0 in MBR
MbrFix /drive <num> writestate <state> Write state to byte 0x1b0 in MBR

Drive numbering <num> starts on 0.

 

Commands restorembr, fixmbr, generatesignature, writestate and clean will ask for confirmation unless /yes is included.

If the /byte option is given for the readsignature command, the signature is returned as a byte array instead of as a DWORD.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章