kalirolling和windows10双系统更新之后修复grub2

来源:互联网 发布:javascript event对象 编辑:程序博客网 时间:2024/06/07 06:28

windows10更新有一定几率会破坏grub的引导,开机直接进入windows10了。

修复grub方法:

使用U盘进入live cd(也就是kali-rolling试用)

然后fdisk -l 找到安装kali的磁盘编号,我就是全安装在 /号下的,没有交换分区

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 4096 145161453 145157358 69.2G 7 HPFS/NTFS/exFAT
/dev/sdb2 145162240 146806783 1644544 803M 27 Hidden NTFS WinRE
/dev/sdb3 146812926 1000214527 853401602 407G f W95 Ext’d (LBA)
/dev/sdb5 146812928 490749951 343937024 164G 7 HPFS/NTFS/exFAT
/dev/sdb6 574640128 1000214527 425574400 203G 7 HPFS/NTFS/exFAT
/dev/sdb7 490752000 574629887 83877888 40G 83 Linux

挂载 mounut /dev/sdb7(根据你自己的来)  /mnt/

mount —bind /sys /mnt/sys

mount —bind /proce /mnt/proce

mount –bind /dev /mnt/dev

之后切换到原来的kali下:chroot /mnt

安装grub引导:grub-install /dev/sdb

grub-mkconfig -o /boot/grub/grub.cfg

exit

reboot  重启之后被更新去掉的grub就回来了

阅读全文
0 0
原创粉丝点击