Using EFI Stub to Boot Fedora 20 with BTRFS Root

With Fedora 20, you can now select btrfs for the root filesystem type. As you are probably aware by now, btrfs is a new copy on write filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration. Initially developed by Oracle, btrfs is licensed under GPL. Btrfs has been available in earlier versions of Fedora. Prior to Fedora 15, btrfs needed a special boot parameter; after Fedora 15 no special boot parameter was needed.

I like to use the EFI Stub method of booting Fedora because it eliminates the need for GRUB2 or any other external bootloader. Here is my UEFI shell script for booting Fedora 20 with a btrfs root filesystem:

# cat /boot/efi/f20.nsh
vmlinuz-3.12.5-302.fc20.efi root=UUID=4d1c04a2-838a-439c-a17c-40bac9377b25 ro rootflags=subvol=root vconsole.font=latarcyrheb-sun16 LANG=en_US.UTF-8 rhgb quiet initrd=.initramfs-3.12.5-302.fc20.x86_64.img

Remember, this shell script can be located anywhere in the ESP (EFI System Partition) but for ease of use, I normally put it at the root of ESP. You also need to copy in and rename vmlinux with .efi extension and also copy in the initramfs.

Currently, /boot is still an ext4 filesystem. However, I see not reason that I could not change this filesystem to btrfs also.

1 comment to Using EFI Stub to Boot Fedora 20 with BTRFS Root