win10+ubuntu19.10双系统下ubuntu引导修复

电脑更新之后,ubuntu 的引导忽然不见了。解决办法是使用一个ubuntu的启动U盘,在try ubuntu选项中进入u盘里的系统,然后在terminal安装boot-repair修复引导

参考资料

  1. https://blog.csdn.net/chekongfu/article/details/84872841
  2. https://blog.csdn.net/weixin_39212776/article/details/81239805

具体办法

$ sudo passwd
$ sudo apt-get update
$ sudo add-apt-repository ppa:yannubuntu/boot-repair
$ sudo apt-get update
$ sudo apt-get install -y boot-repair
$ boot-repair

启动boot-repair后,选择recommend repair
这需要等几分钟,可能和网络速度有关

疑难问题

我一开始用的是ubuntu19.10的启动盘,中途碰到一个问题,就是安装boot-repair的时候显示无法安装,说因为没有boot-sav

The following packages have unmet dependencies:
 boot-repair : Depends: boot-sav but it is not going to be installed

后来换成ubuntu18.03的启动盘就好了!!!

修复完成后

重启发现ubuntu和windows的选择界面,多了一些多余的选项,可以删掉

在ubuntu的终端输入

$ su
$ cd /boot/grub
$ cp grub.cfg grub.cfg_backup
$ cat grub.cfg >tmp
$ gedit tmp

在tmp中,CTRL+F搜索“BEGIN /etc/grub.d/25_custom”,将### BEGIN /etc/grub.d/25_custom ###和### END /etc/grub.d/25_custom ###及之间的内容都删了,就是

### BEGIN /etc/grub.d/25_custom ###
...
...
...
### END /etc/grub.d/25_custom ###

然后关闭文件,输入

$ cat tmp > grub.cfg

重新启动

猜你喜欢

转载自blog.csdn.net/X_And_Y/article/details/103251312