Saturday, July 30, 2005

xdm and Xsession

Okay, so I was sort of right about the initrd being missing. Turns out a custom kernel wouldn't have that, but then it's not supposed to. In stead it has a system map. I'm not quite sure how it all works, but I did get the ALSA drivers installed as a module on my old kernel, so I have sound. I started putting music and movie files onto athena. Apparently the samba client in KDE is broken, because I have to use Gnome to access shared folders on Windows machines. The server works fine, but I would like to get it set up a little better. Currently I just have a shared folder which resides in the /tmp directory that I use as a drop box when transferring files that aren't in shares from Windows over the network. I still haven't messed with the TV tuner. I think that'll be my next big adventure. Speaking of adventures, I did "emerge --update world" which updated all the software on my machine at once earlier this week. I had some trouble and had to use a debug version of a library in kdewebdev, but once past that hurdle, it chugged right through over 60 updates. In the end, about 50 condig files had new versions. I tried using etc-update to merge the files in with my old ones (to keep the old changes I'd made, while applying the new changes the developers had made), but it was getting late, and the interface was confusing, so I just overwrote all my old config files. Well, upon restarting, I was greeted with the xdm logon screen, and upon entering username and password, was logged on to a system with the most basic interface I had ever seen. It was grayscale (with about 4 shades of gray) and the only thing useful I could do was open terminal windows. So, that's what I did, and I soon figured out that one of those config files must have been overwritten. Turns out, I had overwritten the file that specified which display manager to use, hence xdm (the default) in stead of gdm. Also, in stead of logging me into KDE or Gnome, it had logged me into the default Xorg desktop environment/window manager. So, I fixed the config file (/etc/rc.conf), along with the hostname and domainname files that had also been overwritten, and I was good to go. I set up an account for RFH, and configured KDE to look and behave exactly like Windows XP, so he'll feel right at home and won't have to learn anything or expand his mind at all. In answer to all his "just get Windows Media Center" duckspeak, I have this to say: It's not about having something that works, it's about making something that works. It's about learning and customization, it's about designing and manipulating a system to fit your liking. Otherwise I would have just bought an off-the-shelf DVR, plugged it in, and then sat back down on my butt to watch TV. It would have been much cheaper, and a lot less time consuming. That's why it's called a 'hobby.'

Sunday, July 24, 2005

Kernel Panic

Note to self: do not overwrite the kernel without first saving a backup of one that is known to work.

Saturday we got the cable installed, so it was the first time in almost a month that Athena had an Internet connection. I installed quite a few programs, including Firefox, Thunderbird, and OpenOffice, Azureus and a bunch of small utilities and minor apps.

Then I decided to try to make the sound work, and for this, I had to add the driver to the kernel. The kernel is the core of the operating system and one of its jobs is to get everything else up and running, including hardware. Consequentially, the kernel must be able to read the boot disk, and initialize hardware. I thought I had done everything right: I found a Howto on the subject, which told me to look up which driver I needed to on a table, which I located and enabled in the kernel configuration program. Then I recompiled the kernel and copied it to my boot partition. No big deal, right? I didn't remove anything, just added a module. Well, you already know what the result was. I had kernel panic a few seconds after the bootloader tried to launch the operating system. I had to go get my LiveCD, mount all the paritions, chroot over to the new environment, configure and compile a new kernel (this time I used genkernel), which I then copied over to the boot partition and rebooted. This all occured after midnight, so it wasn't until almost 2:00 that I had Athena back up to her old self. No sound support, but everything else humming along nicely.

I think the problem might be that I used genkernel to begin with, so when I added the sound driver I wasn't adding it to my current configuration, I was adding it to some other configuration that was the default starting point for a custom kernel. That, and/or I think I missed a step somewhere where the initrd (initial root disk) gets generated. I think maybe I should have been making a new one, but the Gentoo Handbook section on manual kernel configuration doesn't have that part (or I didn't notice it for some reason). It might have gotten generated and I forgot to copy it over.

Anyway, I might have another go at it sometime this week, but I'm definitely going to do it this time as a separate kernel and initrd, with a separate bootloader entry in Grub (that way I can boot either one from a menu on startup).

Speaking of bootloaders, the thought has occured to me that it would be relatively easy given this tool to (and I would probably do this on one or more separate drives) boot a true 64-bit version and possibly have the option of Windows. Samba server pretty much makes having Windows on the box unnecessary, but I definitely want to get 64-bit Gentoo going, and possibly even a handful of other distros as well. I'll probably keep my x86 installation around and use it primarily, because there are some programs that don't port well to 64-bit (Firefox being one--although Mozilla is pretty good in a pinch) that I would like to have around.