Menu

btrfs non-default subvolume?

James
2018-02-03
2018-03-14
  • James

    James - 2018-02-03

    I have a computer, which is dual-booting Ubuntu and Win10.

    It has two (main) partitions: an NTFS one, and a BTRFS one.

    Windows is installed to the NTFS one, and the BTRFS one contains 3 subvolumes:

    @ (Ubuntu's /)
    @home (Ubuntu's /home)
    @storage (Ubuntu's /var/storage, and Windows' E:)

    rEFInd has been installed manually, to the default boot path (by
    moving Windows' bootx64.efi to bootx64.efi.bak and replacing it with
    refind_x64.efi).

    rEFInd works, but only seems to be detecting Windows.

    I tried adding

    also_scan_dirs @/boot

    to $esp/EFI/Boot/refind.conf (it's sitting next to the rEFInd
    executable), but it didn't seem to fix it.

    I'm guessing this is because I have set @storage as the default
    subvolume (so that Windows doesn't generally get access to = have a
    chance to mess up Linux's files with desktop.ini in every folder).

    Is there currently any way to allow rEFInd to check non-default subvolumes?

     
  • Godotless

    Godotless - 2018-03-14

    you can
    alsoscandirs MyLinuxInstall/boot,@/boot,MyLinux2/boot
    To scan & boot multiple Linuxes in whatever subvolume on a btrfs volume

    You need to have in each a boot/refind_linux.conf file which sets kernel and options parameters

    Or you can create custom stanzas to boot (with subvol=/MyLinuxInstall as one of the boot parameters)

    The default subvolume has nothing to do with this.

     $ cat /boot/refind_linux.conf
    "Boot with standard options"  "root=UUID=3e5e4df0-2526-4b04-a661-60f43b869496 ro rootflags=subvol=Debian quiet splash vt.handoff=7"
    "Boot to single-user mode"    "root=UUID=3e5e4df0-2526-4b04-a661-60f43b869496 ro rootflags=subvol=Debian quiet splash vt.handoff=7 single"
    "Boot with minimal options"   "ro root=/dev/sda5"
    
     $ tail -n 20 /boot/efi/EFI/refind/refind.conf
    
    menuentry OpenBSD {
            loader /EFI/OpenBSD/bootx64.efi
            icon /EFI/refind/icons/os_openbsd.png
    }
    
    menuentry TrueOS {
            loader /EFI/TrueOS/bootx64.efi
            icon /EFI/refind/icons/os_trueos.png
    }
    
    menuentry "Void"
     {
            icon /EFI/refind/icons/os_xubuntu.png
            volume "Linux"
            loader Void/vmlinuz
            initrd Void/initrd.img
            options "root=PARTUUID=44f163f4-1a78-4f98-b966-fd31eb14b8c4 ro rootflags=subvol=/Void quiet splash vt.handoff=7"
     }
    
     

    Last edit: Godotless 2018-03-14

Log in to post a comment.