在 Ubuntu 上安装 grub
-
使用 root 权限在文本编辑器中打开 /etc/apt/sources.list 文件。 例如:
sudo nano /etc/apt/sources.list
-
将“non-free”添加到包含主 Debian 存储库的行末尾。 这些行可能看起来像这样:
deb http://deb.debian.org/debian/ buster main deb-src http://deb.debian.org/debian/ buster main
修改它们以包含“非免费”,如下所示:
deb http://deb.debian.org/debian/ buster main non-free deb-src http://deb.debian.org/debian/ buster main non-free
保存更改并退出文本编辑器。
3.更新包存储库信息:sudo apt update
-
安装非免费版本的 GRUB。 根据您系统的启动模式,选择适当的软件包:
对于 BIOS(传统)启动:sudo apt install grub-pc
对于 UEFI 启动:
sudo apt install grub-efi