by Rick Lehrbaum (Dec. 12, 2006)
I recently decided to retire Red Hat 7 after seven years of loyal service as a firewall/router-OS on my home LAN. Like a red-headed stepchild grown old, it had become cranky from extended neglect, and no longer would even shutdown or reboot without issuing nasty messages.
The OS was running on old hardware, the cheapest PC I was able to get back in 1999 when I launched my home business. We're talking about a 350MHz AMD K6 processor and less than 256MB of DRAM, with only 156MB usable by the system.
|Spread the word:|
digg this story
Back in the fall of '99, my son and resident Linux hacker spent a week installing and configuring RH7 on the system -- setting it up as a router, firewall, and samba server -- all with command line tools. And, I must say, for the minimal initial investment and zero upkeep costs, it's been a decent system over the years. But lately, its escalating misbehavior was getting on my nerves, so I decided to finally put the tired old OS out to pasture.
After all, you can get excellent firewall/routers -- even Linux-powered wireless ones -- these days, for under a hundred bucks, and they utilize some rather exotic componentry to protect their human companions, so I decided that much of the heavy lifting could be handled by a nifty little gadget. In that case, all I'd need to use the trusty old K6 box for would be file serving, web serving, samba serving, and a bit of grunt-work like automatically backing up and archiving data from the handful of popular websites that I manage.
Now, I may write a lot about Linux, but unlike some of my partners-in-crime, I'm no Linux guru. Lately, though, I'd been noticing how user-friendly Linuxes like SLED 10, which I use as my desktop OS, have some slick, user-friendly wizards that make it easy to setup and configure firewalls, webservers, routing, and various other services.
So, why not try building my own home server?
The basic strategy of the project would be to:
The first step was easy. I acquired a Linksys BEFSX41 and got it running lickety split as a firewall/router, with no problems whatsoever. Gosh, what a difference from 1999!
- Acquire a sub-$100 Linksys or D-Link firewall/router gadget for use as my home LAN's broadband interface
- Use the tired old K6 PC (behind the firewall) for shared bulk storage, as a backup appliance, as a webserver, and for future home LAN projects such as mp3 streaming over WiFi, etc.
Rather than blow away my cranky-but-working K6 server and have nothing to fall back on, I decided to prototype the required functions first, on a spare, relatively-low-end system, the Thinkpad 2662-35U that I had used recently for evaluating a gaggle 1-CD Linux distros. That way, I could get everything working to my satisfaction, and then simply migrate it the old K6 PC.
I began by loading the Thinkpad up with a couple of the 1-CD distros left over from the recent Thinkpad Linux desktop investigation. If you read my article, you know that MEPIS was my top choice as a desktop for the Thinkpad. So, I checked out whether I could manage the required server functions on that distro, first. I had no trouble enabling ssh, rsync, and samba servers, the core requirements for building my home LAN; surely, this would be a piece of cake.
Now, to move the prototype into production on my old K6 box.
The Great GRUB Boot-loop Mystery
I started out with Kubuntu, one of my favorites from the Thinkpad Linux desktop project, and quickly realized that the box's really-low-end video, slow processor, and minimal RAM were going to interfere with using the slick new graphical interfaces and tools that I had expected to benefit from. To my chagrin, none of my top-choice 1-CD distro's seemed capable of handling the old K6 system's video. They'd boot, but would leave me with a blank screen.
Oh I know, I know... with sufficient fiddling I knew I could probably have resolved the video problem. But then it dawned on me: why burden an under-powered old system with a modern graphical install, anyhow, when all I needed was to run server-side apps that ought to be configurable from the command line.
With a sigh, I resigned myself to the notion that this would probably need to be a command line-based process all the way, due to the constraints of my old K6 box. And, maybe this was a blessing in disguise: after all, I certainly would rather perform all the subsequent administrative and maintenance tasks remotely, from my desktop PC. The problem was, while I knew I could install all the required services, how would I get them running automatically without learning to use a bunch of arcane system init scripts and such. Oh well, if this was to be, so be it.
But, then I remembered it: Hadn't Ubuntu announced a server distro earlier this year? I browsed to ubuntu.com, and downloaded and burned a CD with the Ubuntu server edition. My heart pounded as I popped in the still-warm CD into my old K6 box and pressed the reset button.
The server edition was not like any Ubuntu I had ever seen before. Instead of trying to bootup into a GNOME windowing environment, it presented an old-fashioned text-based wizard consisting of a series of blue screens with checkbox-style menus. I provided responses to the prompts from about a dozen of these blue screens, and within a few minutes was asked to remove the CD so the computer could reboot from the OS that had just been written to the hard drive.
On reboot, the system displayed an error message when it tried locating the GRUB bootloader. Something like...
GRUB error at stage 1.5...
...and it kept looping on this error.
I googled the problem, and found one posting that suggested using the "alternate" version of Ubuntu instead of the server version, to avoid this problem. I repeated the now-familiar download/burn/boot sequence, booted up the Ubuntu alternate CD, selecting the "server" option by typing
install server, and it went through what seemed to be an identical series of blue screens and prompts, just like the server edition. In the end, I was faced with the identical result: the GRUB error loop.
Then, it came to me: why not try the standard Debian network install? Perhaps that would work better on this old hardware. My next thought, though, was: "Was I 'geek enough' to use the 'real thing,' a plain, vanilla Debian GNU/Linux OS? Dare I?"
I'd already had a couple of months exposure to using apt-get with MEPIS, Kubuntu, and several other Debian-based distros on the old, spare Thinkpad. And besides, what did I have to lose! I'd already blown away the original RH 7 installation on the old K6 box, and the alternative -- doing a "fresh install" using an old copy of RH 7 or 8 -- would surely be no picnic.
So, after downloading/burning the latest Debian 3.1 R4 net install CD, I popped it into the K6 box's CD drive and booted her up.
Interestingly, it looked EXACTLY like the Ubuntu server edition! That realization filled me with both hope ("This won't be so hard!") and fear ("Will it come to the same unusable conclusion?").
I proceeded with the install and eventually arrived at...
Ready to boot the "Debian Base System"
(Click to enlarge)
After I clicked "Continue," I soon ended up face-to-face with same old GRUB boot failure:
GRUB error at stage 1.5...
What on earth could be causing this?
After a bit more googling, the "ah-hah" finally dawned on me: My old K6 box was trying to boot from a nearly-40GB hard drive partition, using a 1999 BIOS! Was I mad?
I had foolishly let the automatic partitioners lead me down the garden path of setting up the drive as one large partition containing the kernel, OS, and data, plus a small second partition for swap. As google kindly reminded me, there was a time back in the latter years of the 20th century when you had to install the MBR (master boot record) in a small partition at the beginning of your hard drive -- otherwise the BIOS couldn't boot from it.
With that in mind, I decided to seize control of the partitioning process. I popped the Debian net install CD back in, rebooted, ran the installation wizard again, and, this time, specified a small (~100MB) partition for "/boot", a 500MB partition for "swap", and the remainder of the drive for "/".
After running through the now-familiar software installation procedure -- it's really a breeze using the Debian net-install CD -- I held my breath as I attempted the "reboot your new OS" bit following the CD's install process. Would the GRUB failure still occur?
This time, there was no GRUB loading error and the system booted up the Debian Base System without a hitch. The net-based installation process then kicked in, and the installer presented me with another dozen or so blue screen installation menus, including these:
Package selection menu
(Click to enlarge)
SAMBA workgroup entry form
(Click to enlarge)
"Thank you for choosing Debian!" ...but, will it boot?
(Click to enlarge)
My new Debian server finally boots!
(Click to enlarge)
Post-install configuration and test
With that accomplished, I set out to set up the required services.
That turned out to be far, far easier than expected. Contrary to its reputation as an esoteric OS reserved for Linux gurus, the Debian net-install wizard had not only installed a web server, print server, and file server when I checked the appropriate boxes at the blue-screen prompts, but it had initialized them as well, including configuring the system to automatically launch those services on boot-up.
I checked, and quickly verified that the ssh server (sshd) was running following boot; I was able to ssh into the system from my Linux desktop. Similarly, the samba daemon (smbd) was also running, and I was easily able to create a test smb.conf file and verify that I could access a samba-shared directory on my new Debian server from my wife's Windows XP desktop.
Not only that, but checking that "Web server" box during the installation dialogs had installed and started Apache on boot-up. Here too, a quick check from my Linux desktop established that I could successfully access the default Apache html page on my Debian-based server:
Yes, Apache runs, too!
It's been about two weeks, now, and my new Debian-based server has run flawlessly. No cranky messages. No unexplainable slow-downs. No worries, whatsoever.
In fact, I ended up so pleased with my first "pure Debian experience," that I decided to try installing Debian as a Linux desktop on the old, spare Thinkpad and see how it compares to the 1-CD distros that I wrote about in my recent article. I was beginning to wonder whether distros like Ubuntu were simply Debian, relabeled.
To find out how well "pure Debian" works as a Linux desktop, I performed another net-install on the Thinkpad -- this time, only checking the "Desktop environment" on the "Debian software selection" screen of the installation wizard.
The result? To make a long story short, I quickly came to the conclusion that there's a very big role for Debian-derived distros like Ubuntu, Freespire, MEPIS, Linspire, Ubuntu, Kubuntu, Xandros, and the like. Oh sure, I was able to easily get GNOME and KDE installed, and most of the basic bits and pieces were there, but the overall gestalt of the system -- how well it worked out-of-the-box at supporting multimedia, Flash, audio, fonts, and so on -- was far, far inferior to what those Debian spin-offs provide.
Mind you, I'm 100 percent convinced that I could have successfully created a completely satisfactory configuration of a Debian GNU/Linux desktop... given enough patience, that is. But frankly, I've got too many more-pressing things to do with my time than reinvent the Ubuntu/MEPIS/Freespire wheel ;-)
On the other hand, for my simple home LAN server application, Debian turned out to be a dream come true!
Join the discussion here
(Click here for further information)