Ubuntu 16.04 Grub Repair

#s1: boot from your Ubuntu INSTALL USB-DRIVE

#s2: check your image location with the command below

sudo fdisk -l

#Remember your system drive as X, the installed location of linux as Y

#Such as sda1 or sdb2

#s3: make tempdir and mount /

sudo mkdir /media/tmpdir

sudo mount /dev/sdXY/ /media/tmpdir

#s4: reinstall grub with

sudo grub-install --root-directory=/media/tmpdir /dev/sdX

#s5: reboot ubuntu, DO NOT BOOT TO WINDOWS

sudo update-grub2

#s6: you can now manually edit your grub config with

sudo gedit /boot/grub/grub.cfg

#or

sudo gedit /etc/default/grub

猜你喜欢

转载自blog.csdn.net/qq_28804847/article/details/82561518