boot-repair

前言: windows和ubuntu16双系统引导有时候会出问题,这个时候我们可以使用boot-repair这个工具来修复它。

我们需要准备

  • 一个修复u盘,里面烧录好ubuntu系统,我这里是ubuntu16
  • bios中选择从u盘启动
  • 选择试用模式 try ubuntu
  • 进入系统后,先调整系统时间,否则更新源的时候可能会有问题。
  • 换源更新
  • 从命令行中安装 boot-repair 工具
  • 启动 boot-repair,选择推荐修复

命令行安装 boot-repair

1
2
3
4
# 这一步如果网络不好,可能会一直卡住,似乎手机流量可以临时添加下。
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair

安装如果出现E: Unable to locate package boot-repair,则

1
cd /etc/apt/sources.list.d/

打开此目录下名为yannubuntu-ubuntu-boot-repair-xenial.list进行如下的更改

1
2
- deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial main
+ deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu bionic main