📜  如何恢复非引导 grub 引导加载程序 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:19.945000             🧑  作者: Mango

代码示例2
# This method requires you to boot from a Linux live USB.
# (sdXY is your boot partition)

fdisk -l
sudo mount /mnt /dev/sdXY
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
mount -t sysfs sys /mnt/sys
sudo chroot /mnt /bin/bash
update-grub
/usr/sbin/grub-install --recheck --no-floppy /dev/sda
sync & reboot