Ubuntu boot-repair安装过程

时间:2024-12-11 13:21:23

本教程只是在UBuntu系统无法引导才使用的方法,有可能需要提前使用U盘刻录UBuntu镜像去引导。

假如win+UBuntu双系统,找不到紫色的UBuntu界面了,请参考:windows10+ubuntu双系统开机引导界面不见的解决办法_双系统不出现引导界面-****博客

参考:更改发行版关键字Ubuntu boot-repair系统修复引导,通过安装grub-repair和boot-repair,执行更新命令并点击推荐修复,可以解决移动固态硬盘引导问题。https://blog.****.net/mxf1227/article/details/143197296

Ubuntu 更新源失败[GPG error] - WebClerk - 博客园对于错误 GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: Nhttps://www.cnblogs.com/WebClerk/p/4481030.html

步骤1:手动删除 /etc/apt/sources.list.d/路径下所有包涵“boot-repair”的文件,

例如:yannubuntu-ubuntu-boot-repair-cosmic.list等等

然后执行:

sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update

清空apt

步骤2:更改发行版关键字

cd /etc/apt/sources.list.d/
sudo gedit yannubuntu-ubuntu-boot-repair-bionic.list

更改为:

deb https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu focal main
deb-src https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu focal main

然后
sudo cp yannubuntu-ubuntu-boot-repair-bionic.list yannubuntu-ubuntu-boot-repair-cosmic.list
sudo chmod 777 /etc/apt/sources.list.d/yannubuntu-ubuntu-boot-repair-cosmic.list

最后:

sudo rm yannubuntu-ubuntu-boot-repair-bionic.list
sudo apt-get update
sudo apt-get install boot-repair
boot-repair