Showing posts with label gentoo. Show all posts
Showing posts with label gentoo. Show all posts

Thursday, June 18, 2009

Adventures in Gentoo

I made some abortive attempts at installing Gentoo on my old PowerBook G4 a few years back. I haven't fooled around with it since. I decided to give Gentoo another chance, so I popped the 20090616 minimal install CD into my old Pentium II tower.

I was unsurprised to meet with trouble running a bleeding edge kernel on legacy hardware. Here are the issues I encountered and how I solved them:
  1. I get an error that says, "Undefined Video Mode Number: 317." I pressed Enter to see the list of available modes. After some quick calculations, I decided 80x43 (option 2) was most appropriate for my monitor dimensions. It looks okay, so I'll stick with that setting.
  2. The install CD hangs at wd7000 while loading the kernel modules. A bug report pointed me to a segfault that occurs when the pata_qdi module loads. Booting with the kernel option noload=pata_qdi results in a successful boot.
  3. Near the end of the boot sequence, I see, "ERROR: cannot start nfsmount as rpc.statd could not start." A comment on another bug report indicates that setting RC_NET_STRICT_CHECKING="yes" in /etc/conf.d/rc allows NFS to start at boot time. I never had to do this because the error disappeared after installation.
  4. Throughout the installation process, my hard disk was detected as /dev/hda. However, when I finished installing GRUB and rebooted, I got an error:

    CHECKING ROOT FILESYSTEM...

    fsck.ext3: No such file or directory while trying to open /dev/hda3

    /dev/hda3:

    The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

    * filesystem could not be fixed.

    I soon realized that my new Gentoo system, unlike the install CD, was using SCSI emulation. As a result, it detected my hard disk as /dev/sda instead of /dev/hda. I popped in the install CD, rebooted, and went through the process of mounting my filesystems and chrooting again. Then I simply changed every occurrence of hda in /etc/fstab to sda. For some reason, GRUB had automagically updated /boot/grub/menu.lst with the sda names, so there was nothing to do there.

    After one more reboot, everything is hunky dory.

Thursday, December 21, 2006

PowerPC + NVIDIA + Linux = Headaches

Earlier this week, I got the idea into my head that I would reformat the hard disk on my 12" 1.33GHz PowerBook G4, model number M9183LL/A, and install some flavor of Linux on it. I'm not talking about a dual-boot system. No way, José! I want the distro I choose to be the only OS on the machine. Well, easier said than done, it seems.

I rather arbitrarily picked Gentoo, mostly because I've been itching to try it and partly because Drexel University's CS machines run it. I'm glad it wasn't the first time I was installing a Linux distro; a Gentoo installation requires you to manually configure your kernel. Thankfully the Gentoo Foundation's docs made it a painless procedure. Unfortunately I neglected to download the ISO for the Package CD until I had already completed the base installation. At this point, I realized the ISO is too large to fit on a 700MB CD-R. I wasn't interested in going out and buying 870MB discs, so I decided I had nothing to lose by moving to a different distro. (Net install wasn't an option because it seems our ISP only allows one MAC address per customer with its basic service.) Ubuntu was next on my list, since I had great success with it when I was a newbie.

I downloaded Ubuntu 6.10 Edgy, the current release.1 The streamlined graphical installer—and video interview with Nelson Mandela, included on the Live CD—made me think twice about continuing. I've grown accustomed (or, some might say, desensitized) to poorly color-coordinated, often inscrutable Linux interfaces. This new Ubuntu installer bears an unsettling resemblance to the Windows XP installer. It asks you the same questions: language, time zone, user name and password. The only potentially intimidating part is partitioning your disk, and it offers to do that for you. Personal prejudices aside, Edgy did deliver a functional Linux OS in a matter of minutes with minimal effort on my part.

Of course, as with any Linux installation, there were some lingering issues to be resolved:
  • I immediately noticed that I couldn't adjust the screen brightness. The Fn+F1 and +F2 key combinations displayed a brightness indicator, but the actual level didn't correspond to the indicated level. In fact, it didn't change at all.
  • Next I discovered that suspend doesn't work.2 When I closed the lid and the switch engaged, the screen went blank, but I could still hear the fan spinning.
This was intolerable. The only way I ever got close to the advertised 5 hours of battery life (at left) was through judicious use of the power management functions; I always keep the brightness down when I'm unplugged and let the machine sleep when it's idle.


To be deprived of power management spoils mobile computing for me. I wasn't ready to give up on Ubuntu, so I turned to Google.
  • The NVIDIA GeForce FX Go5200 equipped in my PowerBook lacks an official driver for the PowerPC (PPC) architecture. This goes for all NVIDIA GPUs. That's a pain.3
  • Power management is perhaps the most challenging aspect of configuring the Linux kernel. It requires tight integration of your OS, BIOS and hardware.
  • A daemon called pmud may alleviate some of the problems users are experiencing running Ubuntu for PPC. (I've already come up with a slew of clever puns for the post I'll probably be writing about it. Consider yourself warned.)
While searching for information on the power management problem, I came across several pages describing successful Debian installations on the PPC. As a satisfied Debian user, this immediately piqued my interest. I'm planning to try a net install sometime in the next few days. Due to the aforementioned ISP limitations, I need to find a place where I'll have uninterrupted broadband ethernet access for an hour or two. For now, here are links to two hits I found particularly informative:
I hope to be posting soon with better news. Adieu!
1 There is also Ubuntu 6.06 Dapper, which promises 3 years of support on the desktop. I read yesterday that it's more stable on the PPC than Edgy.
2 For the uninitiated, there are two types, suspend-to-RAM and suspend-to-disk. The former freezes all processes and stores their state in RAM, powering off all other hardware. This allows for fast resume but does have the disadvantage of causing an unclean crash in the event of a power interruption. The latter saves the processes' state to the hard disk and shuts down the entire system. As you might expect, it takes longer to resume from suspend-to-disk.
3 There are myriad petitions online urging NVIDIA to release open source drivers. It seems NVIDIA hasn't heard or doesn't care. I wouldn't hold out hope for seeing these drivers anytime soon.