Notes on my Arch Linux install

I reinstalled Arch on my desktop, and these are my notes-to-self on what I did differently from the install guide, so I don’t forget.

Note (2013-12-28): This information is out of date. In any case, you should be using the Arch wiki as a reference, as it’s kept up-to-date; this is just for my own memory.

bcache and btrfs

Note (2013-12-28): I would not recommend using bcache in combination with btrfs. Filesystem corruption may result due to unknown interactions between bcache and btrfs. There are some posts on various mailing lists about the issue.

Follow the instructions on the Arch wiki: install the bcache-tools-git package from the AUR. Once you have the partitions you want to use as the cache and the backing store, run make-bcache to create the bcache device, which appears as /dev/bcache0.

Now, instead of just creating a btrfs filesystem on the new /dev/bcache0 device, we follow the instructions on this page. So we end up with the following subvolumes:

hdevalence@noether /> sudo btrfs subvolume list -a .
ID 256 gen 12022 top level 5 path <FS_TREE>/__active
ID 257 gen 12146 top level 5 path <FS_TREE>/__active/home
ID 258 gen 12142 top level 5 path <FS_TREE>/__active/var
ID 259 gen 11893 top level 5 path <FS_TREE>/__active/usr

The mount options in /etc/fstab are:

rw,noatime,ssd,discard,space_cache,compress=lzo,subvol=__active

Next, we go back to the bcache instructions, to set up mkinitcpio to generate a kernel image that can pick up the bcache device. Picking the udev option, we copy the udev script into

/usr/lib/initcpio/install/bcache_udev

Then add bcache to MODULES, and edit HOOKS to look like

HOOKS="base udev autodetect modconf block bcache_udev filesystems keyboard fsck btrfs_advanced"

It’s important not to forget to add bcache to MODULES, or else the system won’t boot.

Finally, by default bcache uses writethrough caching. I don’t think that my SSD is too unreliable, and I have backups, so I do

[root@noether ~]# echo writeback > /sys/block/bcache0/bcache/cache_mode
[root@noether ~]# cat /sys/block/bcache0/bcache/cache_mode
writethrough [writeback] writearound none

Note that the documentation on the bcache site was slightly incorrect, at least when I was looking at it. It says to run

# echo writeback > /sys/block/bcache0/cache_mode

but since that’s not the correct path, it just gives

/sys/block/bcache0/cache_mode: No such file or directory

X11 and radeon

Next, we install X11 and video drivers. I picked the radeon drivers instead of fglrx, since radeon now supports the Southern Islands chipsets, and AMD’s proprietary drivers are utter crap. The packages to install are

xorg-server xorg-server-utils xorg-xinit xf86-video-ati mesa mesa-demos 

then start X and run glxgears, glxinfo, etc. to check that it’s working. Finally, enable dynamic power management by editing the kernel parameters to add radeon.dpm=1.

Finally, install KDE, etc. as normal.

Posted September 21, 2013 under linux.