Saturday, September 6, 2008

How to Turn an Older Tablet Notebook Into a Functional Machine: Part 1 Initial Boot and Installation

The laptop used for this testing is one fickle beast. Most of these techniques should work on any given system that may be causing you problems but, fair warning, some issues are hardware specific and will need to be tweaked, mostly in minor ways.

The laptop used is a Toshiba Portege M205-s810 with 512MB DDR133 RAM, a 1.5Ghz Intel M CPU and a 60GB hard drive. The system is four years old, has no optical or floppy drive, a broken bios that makes booting from USB next to impossible and no installed operating system (courtesy a series of terrible mistakes I made some time ago, long story but more on that some other time).

The first step was choosing a distribution. I initially wanted to go with Debian as this is the system that I'm most familiar with. Almost every distro that runs in my house is Debian based, the one exception being a Compaq Presario 8600 from 1996 with 24MB of RAM that uses a Slackware based system. After perusing through the Debian web site and various tutorials while I got my bearing I decided that Debian would not be a good match for the system I wanted to build. The reason was a simple one. Before this little experiment I had never so much as attempted to install an OS over the network and I wanted to keep things as simple as possible. OpenSuse would have been a viable option if not for hardware detection issues due to the tablet element of this PC. All said and done I chose Ubuntu to use as the base system. You can get a pre-made package for installing Ubuntu over the network from the official website. (NOTE: Network installations are broken under Hardy so Gutsy must be used for the time being)

Now it came time for the network boot process. There is a handy guide to doing this on the Ubuntu support site. Two guides actually. The caveat here is that not every process is going to work for your setup or your system. The quick guide offered by the official site recommended temporarily shutting down the firewall. Something I would advise against under most circumstances.

This step of the process occupied more of my time then anything else. The endless tweaking of config files, trying a variety of tftp daemons and carefully building firewall rules to cooperate with the installation was maddening. All said and done I spent over 18 hours total working these issues out. It didn't help that my home network is built to be as secure as possible and I didn't spend much time ensuring that adding machines temporarily for this sort of thing would be easy went I set everything up. The lesson here is to think long and hard about the choices you make when building a home network. You may want to spend the extra time to build the scripts necessary to make such changes as painless as possible instead of dealing with it later.

Of course to do this you're going to need a server. As it's only a tftp transfer almost any old server will do so long as it has an NIC and the right tools installed. The tools I used to make this work were dnsmasq and atftp, both of which and be found in the Ubuntu repositories and installed with a simple apt-get from the command line.

The alternate method to how I performed the install requires an ftp or http server as well and a slightly more capable machine as it will need to serve the install program the rest of the files it needs. Again in the name of keeping things simple I chose to perform the install over the internet and cut out that process.

I'm not going to go into detail on making the network boot work because very comprehensive instructions can already be found on the Ubuntu support website. I see no need to repeat them here. I will just say that you need to make sure your firewall rules are properly handled or your in for a world of hurt. I would advise assigning the rules regarding this process by mac address rather then ip for security reasons.

Now, assuming you've succeeded in getting the laptop to boot from your server you should be staring at an installation screen. This is where the first major configuration choices came into play for me. As this laptop was destined to provide a mobile development work station, I did not want it bogged down with a heavy desktop like Gnome or KDE. I even passed on using XFCE as I decided that it was still too memory and space intensive for my liking. Removing the default desktop Gnome after installation is easy but bothersome. Skip this unnecessary hassle and type:

# cli

(where # is the prompt) at the installation prompt to install a command line only system. This will save a good amount of space by not installing Gnome and all it's bloat and simplify the later process of customizing your distribution to your needs and wants. (In all fairness to the good people of the Gnome development team, I use it as my primary desktop on all but two computers I own. It has it's place and my wife and I both love it. Just not on computers that I need to be as fast as possible with limited resources to that end)

Other options are available at this command line including a rescue mode and a shell. If you plan on using your wireless network and have WEP or WPA enabled you will need to enter the shell and load the appropriate modules for 802.11x support. The modules do not come included with the network installation package but can either be added before hand or introduced via USB drive now that the computer will actually read it. I'll admit that rather then go through this ordeal I stuck to installing via Ethernet but at some point I will attempt to do a wireless install and get back to ya'll on how that goes.

The install is mostly automated but several steps can be manipulated by hand if you so choose. It will make an attempt at auto configuring your network connection via DHCP or allow you to enter the information manually. If you attempt a wireless install at this point it will inform you that WEP/WPA support is not enabled. It will work if you turn off encryption on your network but I would advise against that for obvious reasons.

NOTE: I know it sounds stupid but make sure that any removable media is removed before starting the installation process. On my first go around I forgot to remove my USB stick and wound up with GRUB thinking that my USB drive should be the hd0. Not hard to fix but a royal pain. Sometimes it's the simple things that get you.

The installation averaged around 20 minutes to complete on my network and hardware. Yes I said averaged. To ensure that my setup was sound and not just some fluke I attempted and completed the installation a total of five times and also successfully performed one rescue boot. (The rescue boot was not part of the test. I had a kernel oops and a corrupt file system when the four year old battery in my laptop decided to die without warning during package installations)

Once the system reboots you will have a functional command line only Ubuntu system on which to build. Part 2 will talk about setting up wireless and choosing come applications as well as some basic cli tricks that save me a ton of time during set up of fresh systems.

LINKS (In case you missed them in the article) - The Official Ubuntu Website - Network Install Tutorial 1 - Network Install Tutorial 2

No comments: