Fedora 21 with bcache on a T430

The linux partition on the work laptop was full and a power failure mid-rezizing partitions (top tip, never resize your partitions on a low battery near a child playing Disney infinity, It’ll end in tears) meant that it was time to think about upgrading from F20 to F21.

The First decision was whether or not to keep the copy of Windows that the laptop came with, given I’d only used it twice in the last six months…and then only to play Return to Castle Wolfenstein it seemed like a small sacrifice.

So to installing linux….Fedora kind of wins because work is rpm based and I like to have something fairly bleeding edge see what’s happening. Ubuntu or debian would I’m sure work equally as well, some of the tweaks I’m going to list will work equally well with those (in fact some are stolen from ubuntu support websites. At this point I should admit to making a small modification to the laptop. T430s are normally advertised as coming with an mSATA drive or a WWAN card in the mini PCIe slot (if you drop the battery out you can see where you’d fit a SIM card). My T430 was purchased off the back of a Scottish Government tender and they presumably see such things as foolish luxuries. I didn’t really want to add a third phone bill to the household accounts, that will come in about 10 years time no doubt, but a 32G mSATA SSD card at £26 seemed like a reasonable purchase(*).

Why a 32G SSD? Well admittedly it’s not quite big enough to comfortably fit the OS on, I did consider a 120G msata but at the time they were ~£120 thought I see they can be had for ~£60 now. 32G would allow two things.

  1. I would be able to do suspend to disk onto it so both suspend and recovery time would be improved
  2. from the 3.8 kernel onwards linux supports bcache which allows the SSD to act as a cache to a SATA hard disk.

So it’s a cheap cool toy that means I get to play with a new (well to me) linux kernel feature….what better way to spend £30.

Unfortuntately whilst F21 ships with both the kernel module and the supporting programs the F21 installer doesn’t so installing bcache is a little tricky. It may be possible to retroactively add bcache to a partition but I’m not sure and I managed to do the install fairly painlessly.

I mainly followed the instructions at this F20 walkthrough until starting the installer. my main differences were I decided to boot using Uefi so instead of having a 2M boot partition I created a 500M /boot partition (ext4) and a 200M /boot/efi(vfat with boot and esp flags) partition. Also as per most DICE machines I put in a 9G afs cache partition (ext4) finally I split the SSD into two 16G partitions, one for bcache and one to suspend to disk onto. Finally in my case I needed to run make-bcache –wipe-bcache -w512 –discard –writeback -B /dev/sda5 -C /dev/sdb1 on the make-bcache command

Start the install and then go into the installation destination menu option. Unlike the instruction on the link I had to manually configure the partitions. When adding whichever partiton you’ve added the SSDto make sure to use the bcache device and not the raw HDD. There’s currently a push for all faculty/University laptops to be encrypted so I took the opportunity to tick “encrypt” on all the partitions that would accept it, I think everything other then the /boot and /boot/efi partitions.

Continue the installation as normal BUT BE SURE TO ADD BCACHE SUPPORT to the installed system after you quit out of install to disk. If you don’t then the machine won’t get very far booting.

Once it’s all done then reboot and, if you’ve enctypted your disks type in the passphrase, Bobs your uncle.

More stuff about customising F21 coming later.

If you’re interested in bcache then you might be interested in some performance stats.

(*)School officials please note that since paid for upgrades at point of purchase were considered gifts to the school I am lending you this SSD whilst the laptop is in my possession, I shall retain ownership throughout.

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *