Menu

rEFInd seems to ignore non-default btrfs subvolumes

2015-08-05
2015-08-10
  • Swallow Unladen

    Swallow Unladen - 2015-08-05

    Hello!

    So, rEFInd seems to ignore btrfs subvolumes unless they are the default one. So if I set a subvolume as default for btrfs partition it is recognised by rEFInd and boots succesfully.

    I did load btrfs_x64.efi in EFI Shell and map -r succesfully, but the last one did not showed subvolumes.

    This is content of my EFI partition.
    # ls -R
    .:
    EFI

    ./EFI:
    Microsoft  refind  tools
    
    ./EFI/Microsoft:
    Boot  Recovery
    
    ...
    
    ./EFI/refind:
    drivers_x64  icons  refind.conf  refind_x64.efi  tools_x64
    
    ./EFI/refind/drivers_x64:
    btrfs_x64.efi  ext2_x64.efi  ext4_x64.efi  hfs_x64.efi  iso9660_x64.efi  LICENSE_GPL.txt  LICENSE.txt  ntfs_x64.efi  reiserfs_x64.efi
    
    ./EFI/refind/icons:
    ...
    
    ./EFI/refind/tools_x64:
    gptsync_x64.efi
    
    ./EFI/tools:
    bootx64.efi  shellx64.efi
    

    Here is content of my EFI/refind:refind.conf:

    timeout 20
    
    use_graphics_for windows,linux
    
    also_scan_dirs +,@/boot
    

    version of rEFInd is 0.9.

    Content of my hard drive is as follows:
    # fdisk -l
    Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: E801BAE1-2813-4EBF-BD84-E63924B11C8D

    Device         Start        End    Sectors  Size Type
    /dev/sda1       2048     923647     921600  450M Windows recovery environment
    /dev/sda2     923648    1128447     204800  100M EFI System
    /dev/sda3    1128448    1161215      32768   16M Microsoft reserved
    /dev/sda4    1161216  210876415  209715200  100G Microsoft basic data
    /dev/sda5  210876416  227653631   16777216    8G Linux swap
    /dev/sda6  227653632  437368831  209715200  100G Linux filesystem
    /dev/sda7  437368832  647084031  209715200  100G Linux filesystem
    /dev/sda8  647084032 1953523711 1306439680  623G Linux filesystem
    

    /dev/sda8 contains:

    # ls
    archy  test
    
    #btrfs subvolume list .
    ID 264 gen 142 top level 5 path test
    ID 273 gen 172 top level 5 path archy
    
    # btrfs subvolume show .
    /mnt/btrfs is btrfs root
    

    Also in refind_linux.conf I have to set initrd like this in order for it to be found:

        "Boot with standard options"        "ro root=UUID=8e7f50b7-5826-476c-9c5e-1243d682f17e initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img"
    

    while others pointed out that:
    "Boot with standard options" "ro root=UUID=8e7f50b7-5826-476c-9c5e-1243d682f17e initrd=intel-ucode.img initrd=initramfs-linux.img"
    timeout 20

    if I edit refind.conf like this:

        use_graphics_for windows,linux
        also_scan_dirs +,@/boot,test/boot,archy/boot
        #added ,test/boot,archy/boot
    

    then rEFInd spots linuxes but does not apply the image to them(gentoo, and archlinux respectfully.)

    Those linuxes I am trying too boot from btrfs curently reside in sda6 and sda7 and work perfectly on ext4, except that I need to set fool path to initramfs and intel-ucode, while others reported that they do not need to set it. Those files are in the same folder that vmlinuz-* is.

     

    Last edit: Swallow Unladen 2015-08-05
  • Roderick W. Smith

    You probably need to adjust the boot options passed to your kernel via refind_linux.conf or a manual boot stanza. This topic is briefly described in the comments about Btrfs in the rEFInd drivers documentation. Unfortunately, I can't provide specific instructions for specific installations because there are a lot of variables; you'll just have to play with the options until you find something that works.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.