Grub2 未检测到 btrfs 分区

Toc*_*ell 6 grub2 dual-boot btrfs

我刚刚安装了 Xubuntu 和基于 Arch 的发行版。问题是 Grub2 没有检测到以前发行版的 (btrfs) 分区,所以我无法从它启动。我已经尝试过 update-grub2。

顺便说一句,在我安装 Xubuntu 之前,btrfs 分区可以从 Grub2 正常启动。

我能做些什么?

小智 6

GRUB os-prober 在检测 btrfs @subvolumes 时遇到问题,来自 ubuntu 论坛的“rick3332”的最简单答案使其适用于我在基于双引导 btrfs 的操作系统安装(ubuntu16&18)上工作,每个操作系统都有自己的 grub。不需要全面的 hack os-prober 代码或进行非持久的手动 grub.cfg 编辑。只需在每个 btrfs 卷根中为 @/boot 和 @/etc 创建符号链接,然后在每个操作系统中运行“sudo update-grub2”即可。

#navigate to root of your current booted brtfs based OS
cd /
#create symlink for boot
ln -s @/boot boot
#create symlink for etc
ln -s @/etc etc

#mount the other btrfs volume with OS-install and navigate to its root
cd /mnt/exampleotherbtrfsvolume
#create symlink for boot
ln -s @/boot boot
#create symlink for etc
ln -s @/etc etc

#let grub detect btrfs based install volume
sudo update-grub2

#reboot to the other btrfs based OS (probably listed this time in grubmenu)
#let this grub detect the previously booted btrfs volume
sudo update-grub2
Run Code Online (Sandbox Code Playgroud)

https://ubuntuforums.org/showthread.php?t=2369106&p=13677811#post13677811