Ubuntu – Grub2 does not detect btrfs partition

btrfsdual-bootgrub2

I just installed Xubuntu alongside an Arch-based distro. The problem is that Grub2 does not detect the (btrfs) partition of the previous distro, so I can't boot from it. I have already tried update-grub2.

By the way, that btrfs partition used to boot alright from Grub2, before I installed Xubuntu.

What can I do?

Best Answer

  • The GRUB os-prober has problems detecting btrfs @subvolumes, the easiest answer from "rick3332" from ubuntu-forums made it work for me on both dual-boot btrfs based OS installs(ubuntu16&18) each with their own grub. There is no need for comprehensive hack os-prober code or do non-persistent manual grub.cfg edits. Just create symlinks in each btrfs volume roots for @/boot and @/etc and run "sudo update-grub2" afterwards in each OS.

    #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
    

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