歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 重裝Windows後恢復Ubuntu 9.10中的Grub2

重裝Windows後恢復Ubuntu 9.10中的Grub2

日期:2017/2/28 16:39:28   编辑:Linux教程

在已經安裝了Ubuntu和Windows雙啟動的一個硬盤上重新安裝Windows,會將Windows的引導代碼寫入硬盤的MBR,覆蓋原本的Grub2。

這時候要恢復Grub2的多重啟動,唯有重新安裝Grub2了。

首先用Ubuntu Live CD啟動機器,然後打開終端輸入:

sudo -i

注意,以下的操作一定要再三確認,哪怕是一個字符的輸入錯誤都可能導致破壞Ubuntu的系統。

接著我們要看一下硬盤的文件系統配置方式。

mint ~ # fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd25ad25a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6527 52428096 7 HPFS/NTFS
/dev/sda2 6528 30401 191767905 f W95 Ext'd (LBA)
/dev/sda5 6528 18464 95882240 7 HPFS/NTFS
/dev/sda6 18465 29910 91939963+ 83 Linux
/dev/sda7 29911 30401 3943926 82 Linux swap / Solaris

Copyright © Linux教程網 All Rights Reserved