2011-01-01

修復 Ubuntu 的 MBR (Recover Ubuntu GRUB as MBR)

GRUB 是一種出名的 Bootloader
但當 GRUB 被其他 Bootloader 覆蓋,如何重新讓 GRUB 成為 MBR ?
GRUB is a popular Bootloader.
However, how could we recover GRUB is covered by other Bootloader ?

見下文
先以 Ubuntu Live Boot Disc 起動
開啟已經安裝 GRUB 的分割區
複製該分割區的絕對路徑
We need to boot with Ubuntu Live Boot Disc.
Open the partition which you have installed GRUB.
Then copy the path of that root of partition.

見下文
見下文
但有些情況下不能在 X11 掛載其他分割區或 Ubuntu Live Boot Disc 沒有 X11,便需要手動掛載分割區
開啟 Terminal 輸入
However, if you cannot mount that partition with X11 or your Ubuntu Live Boot Disc does not have X11, you need mount that partition manually.
Open the terminal and type
sudo fdisk -l
瀏覽硬碟上的各分割區的訊息
必先了解哪個分割區是 Ubuntu ,假設是 /dev/sda5
然後輸入
to view all partitions in your harddisk(s).
You should know where does Ubuntu partition installed. For example /dev/sda5
Then type
sudo mkdir /mnt/sda5
建立目錄
再輸入
to create a directory for mounting the partition
Next type
sudo mount /dev/sda5 /mnt/sda5

見下文
掛載分割區後輸入
After mounting the partition, type
sudo grub-install --root-directory=/mnt/sda5 /dev/sda
注意
必先知道 GRUB 安裝在哪一個硬碟中
如果 MBR 在第一個硬碟,輸入 /dev/sda
如果 MBR 在第二個硬碟,輸入 /dev/sdb
如果 MBR 在第三個硬碟,輸入 /dev/sdc
.
.
.
如此類推
Pay attention in this part.
You should know where does your GRUB install to.
If Master Boot Record is in 1st harddisk, you should type /dev/sda
If Master Boot Record is in 2nd harddisk, you should type /dev/sdb
If Master Boot Record is in 3rd harddisk, you should type /dev/sdc
.
.
.
etc

沒有留言 :

張貼留言