欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Repair Grub /ubuntu修复启动项

程序员文章站 2022-06-30 21:34:41
...

Repair Grub

(亲测是可以解决问题的!)

Assumptions

Your Ubuntu is installed in /dev/sda1 (If you are not sure, type:)

gparted
# OR #
sudo fdisk -l

[edit]Steps

1. Boot with Ubuntu LiveCD or LiveUSB
2. Open Terminal
3. Mount Root partition

sudo mount /dev/sda1 /mnt

4. Mount System mount points

sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys

5. Change Root

sudo chroot /mnt

6. Install

grub-install /dev/sda
grub-install --recheck /dev/sda
update-grub

7. Un-mount

exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt

8. Finish and Restart

[edit]

 

相关标签: ubuntu grub