$BlogRSDUrl$>
A few days ago I was going to say here about my favourite lab at college, the one that came before the programming class. And now's a good as time as any to tell about it, to warm up my fingers before writing for the day.
It was two days, as it happens, not one, and part of the Electronics strand. We worked in pairs in on of the basements of - wow, I can't remember the name of the building, that's bad - anyway, underground. The building had a four storey van de Graff generator on the side, one of those devices they use to impress schoolkids when it's four feet tall because it makes you hand stand on end from the static electricity. It's a conveyer built that pulls electrons along and generates charge. It was built at great expense in the 50s or 60s as a particle accelerator, it managed to get a separation of 1kV or something and just as they finished it, tabletop accelerators were brought out that could do the same and much more. It's been turned into offices now.
The lab practical was divided into sections. We'd been learning about how semiconductors worked, and the level of Fermi surfaces, and how if you put two semiconductors together you could apply a small potential and shift the levels of the surfaces and all the electrons would go running off in one direction. Or something. I'm doing this from memory and I never managed to actually get my hands on the lab notes. God knows where they are. Oh, and I'm forgetting all my physics, which is really terrible.
So in the first section we built big transistors and tested them, drew graphs etc.
Then we took them to bits and got manufactured ones from a bucket.
In the next section we used these transistors and put them together into complex arrangements to figure out how to make gates. I say "put them together", but we were led through the learning by a bunch of experiments and it took ages, but there we were: we had a NAND gate.
Chuck it away, get a pre-fab one.
For this section we had a circuit board with gates of various kinds on it and we had to use boolean logic and the various equivalence rules (what are they, de morgan or something?) to figure out how to do various things by joining together the gates in different ways.
We ended up constructing gates that did simple sums, and worked our way up to registers to do sums on binary numbers, shift registers to store the results, until eventually we'd learned about memory and clocks and how numbers would ripple through the circuits.
I can't remember exactly what happened in these last sections, but I do remember that we took our big tangle of wires and gates apart and had to learn machine code on a piece of paper instead. Then we got registers and memory etc all put together: a really simple computer based on a 6502 chip. It had a hex keypad and an enter key, and some instructions about how to put programs into it.
Then as we finished that section, the last section, we typed in the program we'd written, then keyed in the two numbers we needed to add up, the result of which would be displayed on the single-digit LCD, and pressed enter, I could see those numbers and addresses rippling through the registers, the networks of gates changing between 1 and 0 in non-obvious patterns, like watching city traffic at junctions from the air, the cascades of electrons tipping and washing around the circuit, all synchronised and coming together: I could see all these layers we usually abstract away all at once.
It was awesome.
The programming course. It was luck that I'd had exposure to Unix before so I could understand that there were tiny programs interacting, and I understood pipe and commands (a little, anyway, a very little). That was close enough to the sort of things we did in the lab for it to meet up. And then it was only luck again that we did our programming course on old NeXT machines, which of course had a terminal and you could see the workings of the machine, and we wrote Pascal in a text editor (plain text, like at the chip levels programmes and data are both the same), and piped it to the Pascal interpreter. And Pascal is simple enough that I could see the links between the machine code we wrote before and the language I was writing then. And it all built up for me. I could see it all.
I've filled in a couple of gaps recently. There's a book, Lyon's Commentary, which is the annotated source code of the most famous early Unix. That's a good read. It's incredible to see what a process actually is, or how the source understands a file, or pipes. Or booting.
So before all of that: I'm not sure I would've been so excited about making computers do what I wanted to do. But how can I not, now, after seeing all of that?
...and webmail's up (although the preferences and addressbook might not be working. Testing required).
www is on the way back (a prerequisite for webmail). public_html and major domains for the four main users are back, and there's an error message at http://historicalfact.com
Summary:
Dead drive: email, email archives, a handful of websites gone. A quote is on the way from one data recovery company; another doesn't open until next year.
New server: Email is being accepted for some domains and users. That's pretty much it. No webmail yet. No spam filtering, which is diabolical. How do people cope? I feel like I'm living on the streets.
Me: I'm feeling rather bitter.
God at last. smtp over ssl now actually works, so does courier imap over ssl.
This is usually fun.
This doesn't usually feel so futile.
The thing is, I'm going to look back at this and either think: That was the christmas I lost loads of data; or, That was the christmas I almost lost loads of data. One of the two.
That took a lot longer than I thought.
qmail with auth and tls is now back up for historicalfact, and some of the users are accepting mail (I've only put back the users who have accounts on the historicalfact domain). courier imap (with ssl) is also up, but untested: when people sync their accounts over imap they're going to lose all their current email. This is bad. I'll have to warn them all in advance of giving them their passwords back.
Right, back home now since it looks like the box will come back up if I reboot it. Tonight: more domains and a little www action I think. And food.
14.30
Seeing as it's downloading software, it might also be worth saying why I had that server in my room at college, having before that being a Mac user and steering well clear of anything command-line shaped.
We used to have dinner every night in Hall. Cheap food, not too bad. One year the college authorities decided to make us sign up before Hall so they knew how much food to make, otherwise the wastage would push the prices us.
Cue: Uproar.
Cue: Outrage.
The place to sign up, see, was in the Lodge, the reception to the college. Whereas Hall was 20 or 30 yards from the student rooms, the Lodge was, oh, about 100 yards. Being lazy students, this was too much. (I'm sure there were other reasons too, although I can't remember them. Something like: how can we possibly be expected to know where we're going to have dinner 20 minutes before dinnertime? Because, of course, being students, our lives were busy with urgent appointments, last-minute uninterruptable engagements and cetera.)
Being an aforementioned lazy student I also thought it was a silly idea. Being also a student with an internet connection in my room (we all did; the college computer rooms were filled with abused old PCs that would crash regularly. I appropriated a couple of these later for the servers I've mentioned) I said that we should have a webapp to sign up, because that'd be much easier. For "I said" read "I mouthed off loudly about how rubbish paper was and how great and easy webapps would be in the computer room, in public".
Pause for the vacation.
The first I knew about what had happened was when a friend of mine, also a student but much better connected, congratulated me for offering to help out with the Hall problem, and thanks very much.
So I went to see the sysadmin, who was also a friend, and it turned out that I'd been heard talking about webapps and somebody had told someone else who'd told someone else who'd understood it as an offer, and accepted, without talking to me, and told everyone I was doing it.
I couldn't rightly say no, at this point. Ah, and I remember now. I'd already got the server with Linux on it in my room because I needed to run Perl for my 4th-year project. But that was it. I'd already had the 30 minute "please close your open mail relay that Red Hat installed otherwise we'll shut you down" security talk (our college sysadmin was really helpful and sorted me out with all of this. *Great* bloke).
The server became a proper server, with Apache and MySQL and so on, and I learned about RPMs and compiling and so on (although I'd been practicing on my mum's computer over the previous summer).
15.21
And... I'm ssh'd in to historicalfact from the rest area on over the wireless. Work to do, I'll finish the story in a bit.
14.58
Right, various packages installing now. The plan is to get it into a state where I can install other stuff by ssh from somewhere warming than this, get mail/www/dns working, test reboot the box, then go home. But first these essentials have to install. What was I saying?
Oh yes, that I had a server in my room and that was how I started learning.
The webapp got written, btw, and I got to learn more about running Perl on Windows talking to an Access db (and the oddities of such a db) than I ever wanted to know. And it works, and as far as I know, still works.
That was when I decided to look for work in the internet when I finished college - the dot com days still looked rosy - or rather, that was when I started a weblog and got talking to people who assured me such a thing was possible, and due in no small part to the fact I knew a little about lots of things, I got a job and there we go. It was a small company too, so I got to do a lot of little things and ended up learning even more about servers, databases, programming and so on.
It's friendly sysadmins, experimenting and losing data all the way along.
But programming. Before I went to college I was interested in computers, sure, but only as far as they could help me make magazines and I could write stories on them (I love print design and typography; DTP was fantastic). I used BBSs and played on the internet once or twice enough to know I wanted in-room access to my Mac when I started at college, but nothing more than that.
Firstly I learned HTML at the end of my first year. Even that wouldn't have happened except that I got a reputation as a bit of a geek (printing out unusual stories from websites and pinning them to my door every day can't have helped) and my neighbour, a good friend, needed a website.
I doubt I would've done it except my exams finished a week earlier than everyone else I knew and - after beaming sunshine for months - it rained for that whole week, solid. So I made a website.
The next year we had to take a programming class. And I swear I'd tried programming between being 14 (when I'd last used BBC Basic) and 1997/8 (that year) and not got on with it. But the class used Pascal, and I don't know, something about it was just what I was looking for. I didn't really understand what I was doing to begin with, but the concept of dataflow, loops, abstraction and so on started dropping into place.
Backtrack a little to the project before that class.
Ah, and I'll have to pause a second because I need to set up the users.
("Dirty Dream Number Two" by Belle & Sebastian is playing on my iPod.)
14.16
Subnet wrong, start again.
It's probably worth saying how I got into this server nonsense. I wrote a rather database-intensive web toy that was popular for a while. After a year or so it got spidered rather heavily, battered my host's box, and I got kicked off.
Well fortunately I had a test server in my room I'd been learning on because I'd talked my way into doing a website for college, knowing nothing about any of this. The server was a second-hand hard-used machine, and it got pulled into service hosting my site under a desk at a friend's company.
That machine lasted a year before it started dying on a daily basis, but in that time I learned a little about updating a few things, running virtual hosts and email for friends (using linuxconf). I didn't really know what I was doing.
But then it was time for a new server. I asked some friends, bought some kit, put it together and installed FreeBSD (because that was what we used at work).
That was two years ago. In that time I've used having the server to teach myself more, locked myself out of it once (I locked myself out of the previous one many more times than that) and had to come down to deal with it.
That was the time I got a key fob to the datacentre, historicalfact having graduated from a cupboard that stank of mouse shit to a rack in an office to a rack in the Docklands.
And that's how I managed to get down here today, know how to come in and attempt to diagnose the problem, bring the drive home, buy one, fit it (back on the datafloor) and start installing the OS. Without really knowing what I'm doing.
Bollocks. And because I'm not paying attention I've managed to start installing the box without any software.
Oh, or maybe not. It seems to be working. I wish I had more luck with drives however.
14.07
Okay, start again. What ethernet card do I have? Does it matter? What do all these user options mean? Where's my manual?
13.53
kernel is loading... successful. Now it wants disk 2, mfsroot. This is one I haven't checked all the way through.
This is my favourite aspect of FreeBSD. That you can give it two floppies, a few configuration parameters, then it pulls 2Gb of data off the net and installs itself. Wonderful. The tension added by potentially corrupt shit floppies only adds to the excitement. If it works.
13.48
So I'm on the datafloor. I've been on TCR, bought a new hard drive (80Gb) and a screwdriver. I've made the install floppies for FreeBSD -- floppies which, it seems, are getting less and less reliable over the years. So they've been tested too, but only once, and not all the way through.
The moment of truth. Hook up the monitor and keyboard, put the kernel floppy in, and turn it on.
"Run" by Air is playing on my iPod.
Various recovery ideas just aren't working -- there's no way I can even see data on the /usr partition, let alone figure out where these legendary superblocks are. /usr, by the way, includes all the user accounts, websites, mail and so on. So bad news. And no backups.
Next task: Get a new drive in the server, set it up for what I can remember, and start sending and receiving email again. I'll try and do that today.
After that: The data recovery company I've had recommended is closed until the 5th, so we won't know till after then what's been lost. Conversation indicates this might be a hardware failure - some problem with the electronics on the drive itself, or something - so hopefully all the data is intact. And I'm a bit scared to take the drive apart and move the platters into a new case myself.
After that: Get some backup system working (shutting the stable door after etc, but I'd be even stupider than I've already been to leave open the chance of this happening again); Move across the old data (if there is any).
Hard drive failure on server. matt at interconnected dot org is temporarily metadirk at yahoo dot co dot uk.
12/01/2003 - 01/01/2004 01/01/2004 - 02/01/2004 02/01/2004 - 03/01/2004 03/01/2004 - 04/01/2004 04/01/2004 - 05/01/2004 05/01/2004 - 06/01/2004 06/01/2004 - 07/01/2004 07/01/2004 - 08/01/2004