Random Thoughts

Tech, words and musings from an Englishman in Seattle

Server Meltdown - So What Did I Learn?

If you've been following along, you'll know that I've just completed a rebuild of my home linux server which had a fatal hardware failure. You can find the posts here:

  1. Server Meltdown - A Tale Of An Upgrade
  2. Server Meltdown Part Two
  3. Server Meltdown Part Three - Where A Monitor Is Not Your Friend
  4. Server Meltdown Part Four - Where The NIC Hates You
  5. Server Meltdown Part Five - Where Spare Hardware Is Your Friend
  6. Server Meltdown Part Six - It's Alive!
  7. Server Meltdown Part Seven - Where We Finish Up And Get Samba Installed

And what did I learn?

  1. Having good backups are a life saver.
  2. Never trust integrated components, neither graphics controllers nor network cards. I actually knew this, but had forgotten…
  3. Debian is easy to set up when you've done it a couple of times already :-)
  4. Sometimes, just starting from scratch and dealing with the pain is faster than trying to recover and reinstall configurations from backups.

Your mileage may vary.

Server Meltdown Part Six - It's Alive!

Now that the shiny new linux system is up and running, it was actually relatively easy to bring it online as my home server, replacing all the functionality of my now dead system.

This post will deal with everything except the installation of Samba (which provides Windows Domain Controller services) - those details will be in an upcoming post.

First up, some basic stuff. I need to be able to log into the box from another system as it's going to run headless and I want the monitor that it's currently using back on my Vista box.

Basic Setup

While logged in as root on the console, add my user account (created during setup) to /etc/sudoers using visudo.

Next, edit /etc/apt/sources.list, removing the cdrom entries as all further package installs will be using the net and I don't want apt-get complaining that it can't access the cdrom drive.

Make sure the system is up to date:

apt-get update
apt-get dist-upgrade
apt-get upgrade

Now, I want to be able to perform the rest of the setup remotely, so install ssh and friends in order to ssh into the system.

apt-get install ssh

Joy, now I can login and perform the rest of the installation remotely rather than at the console.

Network services

The clock needs to be set right, so:

apt-get install ntpdate
ntpdate time.windows.com

Yes, I used Microsoft's time server - it's the only one I can remember off the top of my head!

Next, I need to get the network time service (NTP) running on the machine. It will be providing time services to all other machines on the network and periodically setting it's own time against the root time servers.

apt-get install ntp ntp-doc

You'll need to edit /etc/ntpd.conf and then /etc/init.d/ntpd restart to get it to notice the changes. Note that pretty much everything I talk about here has either a config file in /etc or it's own directory of config files, also in /etc. They're pretty self-explanatory - just take a look at the config files themselves and the related documentation. Everything also has a script located in /etc/init.d to control it's operation.

For this reinstall, I just diff'd my backed up config files against the newly installed files to make sure there wasn't anything new that I needed to be aware of and then just copied my old files over and restarted the service.

Next up, bind - the DNS server. I have a local DNS domain in my house that all the clients have an entry in, the linux box serves up that domain and caches domain requests so that the only nameserver the client machines need to know about is this linux box.

apt-get install bind9 bind9-doc

Bind is probably the hardest thing to configure. Handily I had all my backups (yay, me!). I'll probably write up a post dedicated to that at some point, though one thing did bite me a little: if you're restoring your configuration files from backup and get an auth error when trying to restart or reload the server, just killall named and start it up fresh as the authorization key in /etc/bind/rndc.key probably changed when you copied across the old data.

At this point, edit /etc/resolv.conf and point the nameserver line at the localhost, so that client binaries on the system itself use your shiny new nameserver.

Next up DHCP. This is a little service that client machines use to get an IP address. In a home environment this is normally handled by your wireless or broadband router, but I prefer to have the server do it as other useful information, such as name and time server information is also passed to the client. Configuration is fairly simple - check out the documentation.

apt-get install dhcp3-server

Sweet! The base services are now all configured. At this point it's probably a good idea to reboot the server to make sure all these services come up nice and cleanly.

A Few Other Things That I Do

I like to be able to mount drives from other machines on the linux box. For example, my Infrant NAS exports a “backup” share that the server backs itself up to. I use autofs for this.

apt-get install autofs

Edit /etc/auto.master and un-comment the line for auto.net. The backup share is now available at /net/blob/c/backup. FYI, 'Blob' is the name of my Infrant NAS box…

After that it was just a matter of reinstalling my crontabs from backup and then this blog and a few other things are automatically backed up to the NAS. Cool. Safety is back…

Another thing to mention is that I use Amazon S3 to backup my photos and videos. The scripts that do that are written in ruby, so that also needs to be installed.

apt-get install ruby rubygems

I need rubygems installed as it brings with it the openssl ruby package.

The last thing (modulo Samba), that I need is dynamic DNS updating. I use dyndns.org so that I can have a friendly DNS same to connect to the server when I'm not at home. The linux box handles updating the DynDns database with whatever IP address Verizon happens to be giving me at the time of update. I use inadyn to accomplish this.

apt-get install inadyn

Unfortunately, inadyn doesn't come with any form of script to get it started, or any useful documentation whatsoever. So I just copied an existing script in /etc/init.d and got it going with a few minor modifications. Let me know if you're interested in a copy.

All in all, the entire process took me about an hour to get everything setup once the base linux system was successfully installed.

Next up - Samba!

Server Meltdown Part Five - Where Spare Hardware Is Your Friend

At the end of yesterday's post I was planning to take a trip to Fry's this morning to purchase a new ethernet card for my new machine. This morning's realization is that the new machine actually has two spare standard PCI slots and I have a load of PCI ethernet cards sitting in boxes and dead machines. One of those spare cards happens to be old trustworthy Intel Pro 1000.

I disabled the motherboard integrated ethernet adapter, installed ye olde Intel card and rebooted.

Everything works.


Now that I have a working network during install, package configuration during Debian setup is working. I just installed the base desktop package as I'll manually install and configure everything else later and write up the process for my records and your reading pleasure.

Later, dear reader…

Server Meltdown Part Four - Where The NIC Hates You

It appears from reading various threads over the net that the Linux sky2 driver in conjunction with the Marvell 88E8056 Gigabit ethernet controller results in a steamy pile of poo.

I can confirm that this is indeed the case.

Again following up from my previous posts, the next step in home linux server resurrection was to attempt to install Ubuntu 7.10 x64 edition on my shiny new machine. This didn't get very far. A boot from CD ended up in a wedged machine no matter how I tried to run the install.

Hmmm, I think I'll go back to the trusty Debian distribution. I downloaded the latest stable (Etchy) net install disk. Boot. Joy! It all runs. Except the net card. Lots of kernel errors regarding the ethernet driver followed by a fatal crash.


Maybe I'll try Lenny, the “in test” release.

Same thing.

Tomorrow I think I'll be buying a vanilla net card for this puppy. Something made by Intel. For now I think I'll just install Etchy on the machine with the ethernet disabled and let the machine burn in.

Sigh - three days into this and it seems like the box isn't going to be up and running before my next trip. I thought this was supposed to be easy?

More as it happens…

Server Meltdown - A Tale Of An Upgrade

Today I came home to find that the linux box that provides all services to the machines around the house was wedged. I powercycled it, but it wouldn't come up - the drive had suffered some kind of fatal failure.


Now, this machine is pretty central to operations here at Casa Del Lacey. It provides NTP, DHCP and DNS services as well as acting as the Windows Primary Domain Controller via Samba. Handily everything else can limp along without it, but it's not pleasant.

Good job everything backs up nightly to the Infrant NAS.

Anyhow, for a while I've been thinking of replacing the hardware that the server runs on. It's a PowerMac G5 running Debian linux, but the fact that it's a PowerPC machine rather than an x86 machine has increasingly become a pain.

Handily I have a Dell PowerEdge SC1420 (64bit Xeon) sitting around that's been switched off and gathering dust for almost two years.

Don't ask.

So, with the PowerMac's hardware meltdown and the fact that I've got a reasonably good x86 box sitting around, it must be time for an upgrade. I have an Ubuntu 7.10 x64 desktop install disk in my hand, the kids are in bed and it's time to start!

9:00 pm - Disk in drive, power up!

9:42 pm - The damn thing won't power up. Das blikenlights claim a power supply failure. Poo. Not to fear! I have yet another spare machine. Last time I tried it there were “some issues”. Yup. Issues are still there. Poo2.

9.43 pm - Grab a cold beer.

9.45 pm - What the hell. I have a spare PowerMac G5! Let's go with that. It powers up! Now I need a Debian PowerPC disk…

10.18pm - ISO downloaded and burnt.

To be continued…

© 2001 to present, Steve Lacey.