ubuntu重新安裝grub

ubuntu重新安裝grub

启动系统并挂载设备

sudo fdisk -l 
sudo mount /dev/sdan /mnt
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
sudo chroot /mnt

安装grub

grub-install /dev/sda
update-grub
update-initramfs -u -k all
exit

卸载设备重启

sudo umount /dev/pts
sudo umount /dev
sudo umount /proc
sudo umount /sys
sudo umount /dev/sdan
sudo reboot
posted @ 2022-03-03 15:14  Hlooc  阅读(378)  评论(0编辑  收藏  举报