用的一个boot-repair的工具
sudo apt install software-properties-common; \
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"; \
sudo add-apt-repository -y ppa:yannubuntu/boot-repair; \
sudo apt-get update; \
sudo apt-get install -y boot-repair && boot-repair
参考资料:
https://blog.csdn.net/laocaibcc229/article/details/79274412