Note: This is an old article I just put into the Blog. I no longer live in Barcelona, nor do I even own Neruda anymore. Life goes on....
I have an old WinBook XP 486 that I got off a friend here in Barcelona for 20000 Pesetas (let's see-- 166.386 Ptas/Euro... let's say it was cheap.) Aside from minor problems (blinky screen, psychotic batteries...), it was (and is) a good machine that needed a home and a loving parent.
It came with Windows 3.11 installed. Nothing wrong with windows, except that I hate it. So of course I installed Linux right away. Good fun, soon I was coding my Perl and c and c++ right there on the couch with my wife, Sònia and dog, Bups (and later my son, Daniel). I even got X-Windows up and running (no small feat with only 500MB of hard disk). If you're interested, I run BlackBox as my windows manager.
I christened the WinBook "Neruda" (my main box is called "Cervantes").
I thought about "Linux From Scratch"...
One day, I was cruising around the web looking for something nerdy to do, and I came across http://www.linuxfromscratch.org/. They had an idea that really appealed to me: creating your own Linux distribution from the original source code. I run Slackware 7.1 Linux, but I generally don't use packages to install my software-- I download the source and do the tar, configure, make, make install dance. So I figured this would be more of the same, good fun, and I'd custom make a system that was exactly what I wanted.
...But my disk was too small
All really a great idea, except for one thing. I forgot to Read The Fine Manual. Had I done so, I would have seen that there is a list of files involved in the build and the sizes necessary for them during the installation. Even though I didn't store the tarballs on my WinBook (I put them on another machine and used NFS to retreive them), I still would have needed about 750MB to complete the installation. (750MB > 500MB) = duh.
I could have re-installed SlackWare on Neruda and called it a day. However, my head was full of dreams of creating a perfect distribution for my little WinBook, and I've always wanted to get a little bit deeper into the operating system. On the same excellent site where I found the original link to Linux From Scratch, I found a link for minix (http://www.netspace.net.au/~gok/resources/) with a couple of guides on how to get it installed. I downloaded the docs, read them, downloaded the newest version of minix, 2.0.3 from http://www.cs.vu.nl/pub/minix/, and followed the instructions to create the 9 installation disks necessary (10 if you add the networking part)
minix disks in hand, installation starts
Except for a minor screwup which made me think I had fried my hard drive, the installation went breezily. I should say, I had access to the Internet, a windows machine (my wife's), and another Linux box during the installation. Like my dad says, when you're working on the family car, you need another car to run to the hardware store in.
The instructions for installation are in the minix Usage MAN page. In the installation process, this is absolutely necessary, as some of the parameters of the installation are not immediately obvious (especially names of hard drive: linux's /dev/hda1 is /dev/c0d0p0s0 in minix 2.0.3.) However, be careful about slavishly following the directions-- for example, they assume you are installing to the second partition on the primary hard drive (/dev/c0d0p0s1). This wasn't true in my case: I only created one partition on my hard drive, as I only wanted minix on my WinBook, but I typed in all the instructions as if they were correct for my setup. When it came time to boot up the system, I typed the command
which means "boot off the second partition of drive 1. I got the error:
installboot: Unexpected EOF on /dev/c0d0p1
Which made me scratch my head. I finally realized my error-- I should have typed:boot c0d0p0
to get to my one good partition. The error code even makes sense: minix was trying to create a file system on the second partition of the hard drive, which had a size of zero, so it found EOF right away!
The moment of truth
Anyway, it worked. I finally got the parameters all right, did a test boot after the installation without turning the machine off, and was ready for the big final test: would it boot up after I turned it on?
I wanted to say that my hand wavered over the on/off switch as beads of sweat threw themselves off my brow, but I always had the idea in the back of my mind that the installation procedure only took about 20 minutes anyway, if I had to do it again, I could, and if that failed, there was always Slack.
I flipped the switch. And it worked. I signed on as root. That worked too. I did a passwd and put in a root password. Nice. Finally, I fired up vi (great), created the following file:
saved it, then typed
cc hello.c -o hello
I was in business
Neruda (minix) has been up and running for three days now. I've been able to do what I like doing on unix boxes, reading man pages, writing bash scripts and c programs, and generally having a pretty good time. I can't connect to my other machine through the network card, since it's a PCMCIA card and minix doesn't support that out of the box.
So why is this any better than what I had before?
minix was designed to teach people how operating systems work. Linus Torvalds learned from it, and based Linux off of it. All the source code for the system comes included. Neat. I checked down at the local Casa del llibre (I live in Barcelona) and had them order me a copy of Sistemas Operativos, which is the Castilleon translation of Operating Systems by Andrew S. Tanenbaum (ISBN 970-170165-8) who is the original inventor of the system, and I'm going to understand how an operating system works Really Soon.
If you decide on this route, what you need are:
A PC: an XT with 64K RAM and 35MB hard disk will do (it'll be slow, but it's not like we're doing the graphics for Shrek here.
9 or 10 3.5" floppies to create installation disks
An internet connection to download the files, or a friend who has either that or the disks
An operating computer running linux, unix, BSD, or even (shudder) Windows to create the disks with (use dd on the *nix/BSDs, there is a utility called FDVOL on the minix site for the MS version)
Patience, a sense of humor, caffeine, etc