Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installation of Manjaro Linux onto a BCache root device

Boot Manjaro Architect

Install BCache Tools

sudo pacman -Sy --needed yay base-devel
yay -S bcache-tools

Partition Disks

Create the following partitions on the HDD (/dev/sda):

  1. Boot partition (512M). Make sure to set the boot flag. (/dev/sda1)
  2. Swap partition (same size as RAM). Make sure to set type to Linux swap (ID 82). (/dev/sda2)
  3. Root partition (rest of disk). (/dev/sda3)

We will use the whole SSD (/dev/sdb) as cache, so no need to partition it.

Create the BCache Device

sudo make-bcache -B /dev/sda3 -C /dev/sdb

The bcache device should now be available at /dev/bcache0

Create the Filesystems

sudo mkfs.ext4 /dev/sda1
sudo mkswap /dev/sda2
sudo mkfs.btrfs /dev/bcache0
sudo mount /dev/bcache0 /mnt
sudo btrfs subvolume create /mnt/root
sudo umount /mnt

Mount Filesystems

sudo mount /dev/bcache0 -o subvol=root,compress=lzo /mnt
sudo mkdir /mnt/boot
sudo mount /dev/sda1 /mnt/boot
sudo swapon /dev/sda2

Run Setup

@DrSensor

This comment has been minimized.

Copy link

@DrSensor DrSensor commented Apr 11, 2020

So manjaro-architect doesn't have an option to choose /dev/bcache0 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment