- Published on
Fix grub on Ubuntu
- Authors
- Name
- Alvis Lu
開機時無正常登入,出現 grub
時,可能是 grub 出了問題!
進入 grub rescue 依照以下步驟來修復。
- 查看現在有什麼分割區
grub rescue> ls
## 輸出
(hd0) (hd0,msdos2) (hd0,msdos1)
- 查看指定的分割區的 Filesystem type
grub rescue> ls (hd0,msdos1)
## 輸出
(hd0,msdos1): Filesystem is ext2
- 指定分割區為 Booting
grub rescue> set root=(hd0,msdos1)
grub rescue> set prefix=(hd0,msdos1)/boot/grub
insmod normal
normal
## 輸入 normal 後會進入開機清單
- 修復 grub
# in the Terminal
$: (sudo) update-grub
## 輸出
Generating grub configuration file ...
Found...
...
done
$: grub-install /dev/sda
## 輸出
Installing for i386-pc platform.
Installation finished. No error reported.
Reference: