So, I did it. One of the few remaining computer geek rites of passage is complete. I have successfully configured and compiled the Linux kernel for my personal computer; and booted into a GNU/Linux operating system. And since that has been checked off my list...
I went in, reformatted the hard drive I used, and installed Gentoo instead of LFS[1]. Why? Let's just say I have an overwhelming new respect for the packagers at Canonical, Debian, RedHat - compiling isn't the most exciting thing to do, and they do it extremely well. With that said, I like the flexibility of on-site compilation that Gentoo provides. It stands to reason that an executable that is compiled specifically for the hardware it's run on is usually going to outperform the same code when it was compiled for a standard architecture. This won't hold true for all cases, but I've noticed quicker start-up time with lynx (a text-based web browser)[2].
Gentoo took me about 5 hours to get up and going from start to finish (in comparison, it took me around 20 hours to get LFS going, 2 the last time I had to reinstall XP from a rescue disc, and about an hour for Ubuntu). And I mean from the start of formatting the 20GB hard drive until crossing my fingers and rebooting. The crossing of the fingers was fairly important: I had done the entire install over VNC[3], chroot-ed in a terminal from inside of Ubuntu. Basically, that means I built a sandbox in the living room, and a new set of tools. The tools would only affect things that were in the sandbox -- in other words, just the new operating system. I was being doubly careful, because if I messed up building the sandbox I could have totally fscked[4] my entire system. I wouldn't be able to test the setup of three fairly important programs: GRUB, dhcpd, and sshd.
GRUB is the bootloader. A bootloader is a very low-level programs that tells the hardware where to find the operating system. Every computer has one, and you usually don't think about it -- until you mess something up so badly you have to go into "Recovery Mode". That F10/Esc keypress during the memtest? That tells the bootloader you need to change something. If your bootloader isn't configured correctly, you're pretty well locked out. You can change the configuration temporarily -- if you have access to the machine itself. I'm at work. The machine's at home. If GRUB ain't working, I'm SOL.
The other two programs are daemons: small background programs that monitor and take care of a fairly specific task. Think less Beelzebub and more Maxwell. dhcpd is the daemon that asks for and records a network IP address from the DHCP server in the local router. Without it, you don't see the network because the network doesn't see you. sshd is the other half of the remote login requirement: it listens for incoming connections and authenticates the user trying to get it: it's the lock on the door. Actually, it's more the like a hotel's stairwell door: if you have the key, you can get through, but if you don't, tough luck.
If I missed a step setting up any of those three programs -- using the wrong format (sda1 instead of hd0,0), forgetting to rc-update, pointing to the wrong device (wlan1 vs eth0) -- I'm locked out until I can get home and fix it. For the two minutes or so that it took to shutdown Ubuntu, run a full memory test, wait the 10 second delay I built in in case I want to change GRUB, and complete the Gentoo boot sequence, finger-crossing was inevitable.
So, what's next. Well, I haven't had a chance to emerge[6] X Windows yet; and I probably won't until I decide on a Window Manager. I could stick with GNOME; since that is what I'm used to. KDE4 was sluggish on my system, but that was 3 point-upgrades ago. I tried out the new version of Enlightenment (thanks to the latest build of MacPuppy-Opera) and was fairly impressed, though I've been wanting to give Fluxbox a try for a while now. Not to big of a decision, since I can always go in and change my mind later. In fact, I'll go ahead and load Fluxbox when I get home this morning; it should be done by the time I get up this afternoon. (X11 is a fairly large program; I have no doubt it will take a while to compile. Best to start it while I'm sleeping.
[1] Linux From Scratch. They give you a bunch of C and C++ code, and walk you through putting everything together. To extend a baking metaphor... Ubuntu (like most other LiveCD distros) is like going down and picking up a chocolate cake from the bakery. Unless you do something very wrong between the time you pick it up and when you put it on the table; you're going to have a tasty cake that looks good. Gentoo would be around the level of your grandma's handwritten recipe: a lot tougher than the local baker, but if you read the directions - and follow the little notes she made in the margin - you'll be okay. You may end up with something that looks more like brownies than that bakery cake, but it will still taste delicious.
Linux From Scratch - then - would be like someone giving you a pound of cocoa, a jug of oil, a sack of wheat, a cow and a chicken. You can still make you cake; but you have to milk the cow (download the packages) yourself, mill the wheat (make the tools themselves), and wait for the eggs to be laid (compile everything) before you can even think about getting started. That said, I wouldn't trade the experience for anything; it only took me two tries, and that was because I didn't follow the directions I was given the first time.
[2] So, you're probably wondering why I still use a text-only browser? Aesthetics; really. I like the way it renders pages more. Especially pages like google or wikipedia; where it's mostly text anyway.
[3] VNC is the generic version of Remote Desktop: I open a connection to my computer, so I can see (and control) what happens on my screen at home.
[4] Yes, that's what I meant. It's a computer pun. fsck is a command to check - and in some cases, fix errors in - the file system. If you're having to run this command very often, back up your data, because something may be f****d up.
[5] Yes, your standard Windows installation has one as well. You just don't see it because it's limited to standard and limited/recovery modes.
[6] emerge is the front-end to Gentoo's Portage packaging system. Installing a program in Gentoo is fairly simple:
USE="<flags>" emerge <package_name> <options>
Monday, August 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment