目录

目录

双系统更改 Grub 启动顺序

目录

如果使用了 Timeshift 或者 Snapper 的快照功能, 安装 grub-btrfs 实现在 Grub 界面直接从快照启动, 这样在系统挂掉后可以从快照启动进入系统而不需要 LiveCD .

yay -S grub-btrfs

/etc/grub.d/可以查看引导生成脚本, 决定 Grub 引导顺序, 修改它们就可以修改 Grub 界面的启动顺序, 内容如下:

> ls /etc/grub.d/ -l
总计 124
-rwxr-xr-x 1 root root  9816 12月 1日 22:52 00_header*
-rwxr-xr-x 1 root root 12831 12月 1日 22:52 08_os-prober*
-rwxr-xr-x 1 root root   286  1月10日 23:05 09_eos_windows*
-rwxr-xr-x 1 root root 12631 12月 1日 22:52 10_linux*
-rwxr-xr-x 1 root root 14393 12月 1日 22:52 20_linux_xen*
-rwxr-xr-x 1 root root   786 12月 1日 22:52 25_bli*
-rwxr-xr-x 1 root root  1174 12月 1日 22:52 30_uefi-firmware*
-rwxr-xr-x 1 root root   744 12月19日 18:31 35_fwupd*
-rwxr-xr-x 1 root root   214 12月 1日 22:52 40_custom*
-rwxr-xr-x 1 root root   215 12月 1日 22:52 41_custom*
-rwxr-xr-x 1 root root 29811  9月17日 23:59 41_snapshots-btrfs*
-rwxr-xr-x 1 root root  1394 2024年12月26日 60_memtest86+-efi*
-rw-r--r-- 1 root root   483 12月 1日 22:52 README

其中 10_linux 引导 Linux 系统, 08_os-prober 是一个自动化搜索工具, 它会扫描所有硬盘分区,寻找 Windows 或其他已安装的 Linux 发行版,并将它们加入启动菜单, 41_snapshots-btrfs是刚才安装的 snapshots-btrfs , 09_eos_windows是 EndeavourOS 系统的 Windows 搜索脚本, 防止 os-prober 失效, 修改其中数字顺序即可决定 Grub 启动菜单顺序, 可以自行调整.

所有配置完成重建 Grub 配置:

sudo grub-mkconfig -o /boot/grub/grub.cfg