User Tools

Site Tools


Installing Slackware-current on btrfs

I recently did a fresh install of Slackware-current on a btrfs filesystem. More specifically, the install was done entirely on btrfs subvolumes to make it as simple as possible to take snapshots.

I'll give some step-by-step directions of the process here. It actually wasn't too painful.


  1. These directions were recreated from memory and by looking at my current system files (fstab, etc.). I actually did this a few days ago (2011-03-11) and didn't document anything… There's a good chance I missed something in recreating these directions. I am meaning to repeat this in a VM to confirm at some point. If I ever do that I'll remove this warning.
  2. btrfs is still experimental and probably shouldn't be relied upon for anything important.


  1. Download or build your .iso of Slackware-current and burn to disc. I used Slackware-current as of March 1, 2011 (which as you'll see later added an extra step or two for me compared to newer versions).
  2. Reboot and prepare to install. This can be a virtual machine, separate disk, partition, whatever you want to use. This part is up to you.
  3. Once logged in, install the latest btrfs tools. This can be from the install disc, or from network. In my case it was from network since the latest -current had a btrfs-tools update that I figured I should use (bring up eth0 or whatever you interface is, and ftp it down from your favorite mirror – you may need to install an ftp client such as ncftp to do this)
  4. Create your partitions via fdisk. I used /dev/sdb4 swap, /dev/sdb5 ext4 /boot, and /dev/sdb6 btrfs.
  5. Create your filesystems as normal. Of course, mkfs.btrfs for the btrfs partition.
  6. Mount your btrfs filesystem to /mnt:
  7. mount -t btrfs /mnt
  8. Create your desired btrfs subvolumes. Create more or less as desired. In my case, I create a system subvolume for / and a home subvolume for /home.
  9. btrfs subvolume create /mnt/system
  10. btrfs subvolume create /mnt/home
  11. umount /mnt
  12. mount the subvolumes (and other partitions)
  13. mount -t btrfs -o subvol=system /dev/sdb6 /mnt/
  14. mkdir /mnt/home
  15. mount -t btrfs -o subvol=home /dev/sdb6 /mnt/home
  16. mkdir /mnt/boot
  17. mount /dev/sdb5 /mnt/boot
  18. Install slackware as normal. DON'T let it format or mount any partitions in the installer (except swap if you created one). The installer is not btrfs subvolume aware and will not let you install things how we want to. However, the subvolumes are already mounted to the appropriate locations in /mnt from step 9, and the data will still be installed where it needs to be. I did a full install.
  19. After installation, DO NOT REBOOT. We still need to setup our /etc/fstab, initrd, and lilo. Chroot into your new Slackware install:
  20. chroot /mnt
  21. Add entries to /etc/fstab for the partitions/subvolumes installed to. They should look something like this:
  22. /dev/sdb6 / btrfs defaults,subvol=system 0 1
  23. /dev/sdb6 /home btrfs defaults,subvol=home 0 1
  24. /dev/sdb5 /boot ext4 defaults 0 1
  25. Edit your /etc/lilo.conf to pass the necessary flags to indicate which subvolume contains your root partition.
    1. append=“rootflags=subvol=system”
  26. Create an initrd with the btrfs module (substitute appropriate kernel version if using a newer Slackware-current):
  27. cd /boot
  28. mkinitrd -c -k -m btrfs:ext4 -f btrfs -r /dev/sdb6
  29. Run /sbin/lilo

That's it. Exit out of the chroot and reboot.

wiki/slackware.install.btrfs.txt · Last modified: 2015/08/20 05:17 (external edit)