I don't know offhand, try looking in the manual
This is the third in a series of back-dated site updates that have only just got around to being published
172.21 Is Easier To Type Than 192.168
So yeah, eventually we get to the upgrading of caco to Debian Sarge. Right off I'd like to say this went a lot better than when I did baron. Whether this was due to the prior experience, or the simple fact that the class of open source software you'd find on a file server is just better than the class of open source software you have on desktops, is unknown. Anyway I sorted just about all the issues with baron's upgrade, or simple became accustomed to the changes.
Of course, one obvious issue is that unlike Woody, Sarge has no security updates yet. I put off upgrading for ages because of this. But, other people seem to get away with connecting a Sarge box to the internet, so I figured, what the hell. Hey, if the worst happens and caco gets cracked, who wouldn't find the irony eye-poppingly hilarious? I know I would!
As usual what I do when I upgrade a Debian box is I have a piece of paper and whenever the dist-upgrade process spits out an warning I write it down. Terminal flow control (^S/^Q or scroll lock if it works) helps here. Then I go through the list afterwards. The list mostly consists of merging changes into configuration files, anyway. There were only two things that were sufficiently nontrivial that I can actually remember them as I write this:
- Sometime between Woody and Sarge iptables had its init scripts deprecated. The package had this init script that would save and restore your iptables state over reboots, and the maintainer hated them. Obviously he's just taken them out. Now if you're upgrading it doesn't delete the files, so you could just carry on, but I took the opportunity to write my own
/etc/init.d/local-iptables (and /etc/init.d/local-tc, more on this later)
- Debian's default mail transport agent is Exim. Exim v3 is obsolete; I think the only reason there are still Exim v3 packages in Sarge is that v3 and v4 configurations don't match and it's hard to do an automatic conversion. Exim v4 in Debian also has some frankly strange choices, for example it creates users with really stupidly long names containing capital letters. It just looks wrong, okay? So I took the opportunity to try Postfix. On the whole I'm pretty happy with it. It required next to no configuration besides answering Debconf questions. I guess the only obvious difference between Postfix and Exim v3 is that the former runs all the time like a real server but the latter, by default, runs from inetd. I don't know. Truth is I like Postfix but I don't know why...
Oh yeah, I changed my network numbering scheme at the same time.
SHOVEL TIME
This is the second in a series of back-dated site updates that have only just got around to being published
Interlude: tmpfs
Before moving on to installation of Sarge on caco I'd like to mention a little thing I am quite taken with. It's called tmpfs (formerly shmfs) and is built into the linux kernel. It quite simply puts a filesystem in RAM.
How is this helpful? Well, as the name suggests, what you do is mount one over /tmp. When files get created in it they are simply cached in memory. Files unused after a while get swapped out. The thing can grow and shrink, unlike a RAMFS which is created with a fixed size (you give it an upper bound when you mount it, though)
Compare the following two setups:
- 256MB RAM, 512MB /tmp disc partition, 1GB swap
- 256MB RAM, 2GB swap, tmpfs /tmp (max size 2GB)
I hope it's fairly obvious that these two setups are roughly the same. Of course if your /tmp is on disc it won't get wiped if you reboot, but, in Debian at least, /tmp gets cleaned on boot anyway unless you tell it not to (and if you really cared you could write an init script to save and restore a tmpfs on disc)
The only difference is how the filesystem gets synced to disc. With a "normal" disc filesystem this happens quickly if not instantly. A tmpfs is a memory filesystem and files are treated like process data, that is will only go to disc if it doesn't get used for ages. However due to Linux being pretty clever about swapping and the fact that I have lots of memory and huge amounts of swap space, the only effect I've noticed is that writing files to a tmpfs is faster. I can extract a kernel source tarball in half the time. And even though it's 300MB unpacked the computer doesn't slow down or complain of lack of memory! Ice creams all round! Of course it'd screw up if it got too full, so you pick a maximum size wisely and keep an eye on it if things (or people...) fill it up.
The fact is I've got a tmpfs /tmp on both baron and caco and it works fine on both of them. Indeed if anything it works better. In conclusion I think tmpfs is much better for a directory of transient files that do not require disc storage integrity or preservation over reboots.
big fat koala bear chewin' eucalyptus leaves
This is the first in a series of back-dated site updates that have only just got around to being published
Nothing Is Ever Satisfactory
Roughly every year or so I decide some aspect of my system is totally retarded and needs redoing. For example this time round I decided
- I don't like the disc partitioning scheme on caco (the server)
- I'd also like to switch its filesystems to ReiserFS
- I really should implement that automated backup system I've been "planning" for years and years
- Having upgraded baron (the desktop) to Debian Sarge I want it on caco as well
So if I'm going to repartition the entire disc and change the type of the root filesystem I need to copy the whole system to a different disc and boot off that, but would involve swapping hard discs around and generally having to make too much effort. Instead I looked into live CDs and found System Rescue CD. The site says one of its aims is carrying out administrative tasks such as partition editing, and its kernel comes with stuff like LVM, so it seemed ideal. I downloaded it and found it was based on Gentoo, which is not what I'm used to but it wasn't too much of a problem. All distributions have the same basic GNU stuff.
Also it's no good if your disc fails and you lose both your live system and your backups because they're on the same disc, is it? So I put in an order for another disc. When this arrived and I had put everything on caco into archives and checked them several times I finally powered it off.
Anyhow I'm going on way too much here, all you need to know is it worked
- I put the new disc in, and repartitioned the original disc from the rescue CD
- Everything except the root and a swap partition is under LVM so hopefully the next time I decide the partition scheme is rubbish I might not have to reformat the entire disc..
- All the filesystems on disc are ReiserFS, which, if nothing else, doesn't take an age to fsck (even though the most common cause of fscks - power fluctuations - were taken care of ages ago)
- The rescue CD could be loaded entirely into memory so you could unmount the CD and put in a different one with the old hard disc contents on, and hence restore your old system's contents.
There were minor problems but they were dealt with
- I wish I'd thought of using the workbench my dad left here ages ago before. It was a lot easier taking the computers to pieces when they were raised up on a table than on the floor.
- It hurts your productivity to take fully four hours to pluck up the courage to overwrite your disc's partition table
- Say you've just planned to make the physical partitions, restore the root filesystem, then boot back into your old system in "emergency mode" to carry on. You've done the LVM stuff, and you're now ready to run mkreiserfs on your new blank volumes. This is not the point at which to find you never got round to installing reiserfsprogs. I laughed about this for about ten minutes.
- So you boot back into the rescue CD, mkreiserfs from there, and unpack all your tarballs. Unfortunately you fail to notice that you made them by saying, for example,
tar -lcf var.tar /var so when you extract them with cd /mnt/disc/var/ ; tar -xf /mnt/cdrom/var.tar you end up with everything in /var/var/ (and similarly for /usr) Thus you briefly have the crap scared out of you thinking you've lost all your files when you boot back into the system.
- And finally, and indeed most insidiously, because the tarballs were made on a Debian system and extracted in the rescue CD environment, which as I said is based on Gentoo, there are subtle differences in the mappings between UIDs and user names. Thus when certain files are extracted they end up being owned by the wrong user. This creates a subtle degradation in service that you don't notice for some time; most of the files are
root:root anyway, so nothing changes there, but for example I had something stuck in my mail queue for two days because exim (setuid 'mail') couldn't write files into /var/spool/exim (which had ended up owned by user 'man')
The last one had me stumped for a while, I thought, how on earth can I fix this easily, but thank goodness it didn't take long to fix manually with a couple of careful find commands. Now all I have to do is upgrade to Sarge...
NO MORE WILL I PRETEND, DON'T NEED THE SERVICES YOU LEND, BECAUSE I'M STRONGER ON MY OWN, I'M STRONGER ON MY OWN
RIGHT NOW I SEE, JUST WHERE I WANT TO BE, AND IT'S BETTER ON MY OWN, I'M STRONGER ON MY OWN
Hey faggot, why don't you ever update your crappy website
Yeah, yeah, shut up. Christmas was boring, New Year was worse, and what else am I going to write about? Global disasters? Whether or not it's legal to declare arrays on the stack whose size is only known at runtime?
Hurt You So.mp3
Imagine, you're sitting there, you look in your email, you find one with an MP3. It turns out to be a record you heard off the radio and ever since have really wanted a proper copy
Okay it's Christmas morning, 1997. Kool FM was on and they're playing a looped tape of old school hardcore from 1992. There's this one record that, well, lets just say I liked it enough to steal the strings off it, several times since.
Then it just turns up in my email seven years later! I couldn't stop laughing. Thanks Elliot.
Vague disappointments
The film version of Harry Potter and the Philosopher's Stone wasn't as good the book. This is to be expected I guess
Monstrous Regiment was.. kind of depressing, actually
48 hour rhythm
It wasn't planned, I just was asked to be out of bed relatively early one day. I tried to go to sleep early, failed miserably, got up again and decided to stay up. One way or another I was up for 36 hours and then slept for 12. Having slept for 12 I actually felt like I'd slept properly for once.
However after trying to maintain this for a week I cannot report success. It's too hard to stay awake longer than 24 hours, you can't think straight and get anything done. And sleeping for 12 hours was good but it didn't seem so good the second or the third time. So I don't think this is worth pursuing. Oh well.
Why do millions of nerds find made up words funny?
I don't know. I'd ask Douglas Adams but he's dead.
I swear half the appeal of the Hitch Hiker's Guide is just so you can casually drop references to all the stupid shit Adams made up into conversations.
It's like a nerd's badge of honour, and gives the same subtle thrill of superiority over other lesser nerds that being able to casually mention MY GIRLFRIEND gives to nerds on internet forums trying to pretend they're cooler than the next nerd.
Why do millions of nerds like sucking the humour out of everything
Why do people like to overanalyse jokes to the point of killing all the humour in them? What is it about university science students that makes them do this? I've seen it happen over and over, from back in the day when idiots would ruin every thread on .misc, right up to the present day!
It's like at GCSE English where you analyse books over and over again until all their entertainment value has been sapped dry. You'd think having the experience of boring pointless Mickey Mouse subjects like English would teach them not to do this, but oh no!