Moving /usr

When I set up my hard drive to take Debian, I didn’t take into account the vast range of software that I was going to find immediately indispensible. So, /usr was on the same partition as /, and it was taking up 1.1 Gb of a 2 Gb partition. That was unsupportable, of course, so I had to move /usr to it’s own wee data fiefdom.

I’ve moved /home a few times, and I have a procedure for that, but I wasn’t sure you could do the same thing with /usr. I asked Arthur, and he pointed out something very important – the editiors are on /usr, and so I had to edit /etc/fstab before renaming /usr. Once I had the order worked out though, it went perfectly. Here is the procedure:

# Set up a partition table on the new hard drive
cfdisk /dev/hdb

# Get a filesystem on the partition
# you're going to use
mkfs.ext2 /dev/hdb1

# Mount the soon-to-/usr partition
mount /dev/hdb1 /mnt/tmp/

# Edit the filesystem table
vi /etc/fstab
# Add the new /usr to the table
/dev/hdb1   /usr    ext2    defaults   1   2

# Get into /usr and prepare to copy
cd /usr

# Single-user mode
# a bare root for low-level maintenance
init 1

# Copy everything into the new /usr
cp -ax * /mnt/tmp/

# Rename /usr so that you can mount
# the new /usr in the right place
mv /usr /usr.old

# Set up the mount point
mkdir /usr

# Cross your fingers


Emma suggested that I try Openbox, and so far I am very pleased. Unlike Blackbox, there are people still working on Openbox, and they are doing a fine job. So far it is not feature-perfect, but it is function-perfect as far as I can tell, and that is really something.

I was pretty happy with Blackbox, but I didn’t like some of the ways that things were configured, especially the fact that I had to elevate my priviledge to edit my menu or style file. Openbox uses locally specified XML files for configuration, and I am very pleased with how that system works. It is especially nice (though it would be good if it were clearly documented) that if you screw up your local settings you will get the default — but fully functional — settings and menu.

My wishlist for Openbox is for better documentation (so I’ve started to write it) and better management of where windows appear. I run two monitors, and the windows will spawn on the left edge of the right screen, which is not where I want them. I’d also like them to appear in columns rather than rows if I so choose. Still, it’s a nice window manager with active participation, and I’m glad to use it.


I am slowly but surely, getting Debian installed on my home machine. I am heavily endebted to emma for her help, suggestions, enthusiasm, humour and dotfiles, but I have beaten my head against these particular walls often enough that it is starting to feel good.

Most of the process works as expected, requires minimal kicking and has been pretty satisfying on the whole. Getting X working, is, as always, the thorniest challenge, but with known hardware I can now almost casually sacrifice the correct chickens and scatter the right entrails to get where I need to be.

The real bastard was getting my mail system set up – I wrestled with exim for a long while – Debian stable is ludicrously conservative, and I was for a long time worried about both exim and mutt being too many versions behind my config files and knowledge. After much gnashing of teeth, the installation of postfix and an upgrade of mutt (to 1.54) I still couldn’t get the MTA to honour my setting of a From: address. Finally, I looked at /etc/Muttrc (which I had looked for earlier in the process but didn’t find because I was expecting a directory and lower case) and found this little gem:

# don't generate a From header
unset use_from

Once I commented that out things worked just fine. I’m really pleased to have sorted that out, but I am also really peeved at the Debian dork who set that as off by default. All MUAs may suck, but every one I’ve ever seen sets From: correctly.