Phergie on C7Y
I've written a two-part article for C7Y on experiences gleaned from developing the PHP 5 IRC bot Phergie. You can check out the C7Y web site for part one and expect part two to appear there next week. Feel free to leave comments in the article's forum.
Do What I Mean and Not What I Say!
If you posted a comment recently and don't see it on the blog, I apologize. I managed to accidentally delete some when going through comments to approve them. If you wouldn't mind, please repost them, as most had very good content relevant to their respective posts. Thanks!
Dual-Booting XP and Kubuntu on a Sony Vaio
So it turns out the Holy Grail, Promised Land, or whatever you want to call it, does exist after all. After a number of different approaches and attempts, I finally got my Sony Vaio VGN-NR298E dual-booting Kubuntu and Windows XP. The solution turned out to be a well-known one: nLite.
With it, I was able to not only roll the drivers for my SATA drive into a custom XP CD, but also SP2 as well. It also offers options to include other drivers as well as post-SP2 Windows hotfixes and custom configuration options. I have to give major kudos to the nLite folks, as I imagine I would have given up at attempting to do this had it not worked as splendidly as it did.
So, without further ado, here's the final recipe for succes in this endeavor. Obligatory disclaimer: I take no responsibility should you not have the same success or suffer damages by following these instructions. Other obligatory disclaimer: The only reason I went to this much trouble to dual-boot to XP is because I can't find another solution that allows me to play my games.
- Download nLite. Use it to make a local copy your Windows XP CD.
- Download the standalone Service Pack 2 installer. Point nLite to it as a service pack to include.
- Download the Intel 82801HEM/HBM SATA AHCI Controller drivers. Extract them for unattended installation and point nLite to them.
- At this point, you can choose other drivers to include on the CD. Below is a list of those that are relevant to the Vaio. Be sure to have either Ethernet or Wifi drivers included in the CD or on a storage medium that Windows can recognize natively without external drivers.
- I ran into a small issue at this point that may or may not be pertinent to your case: the only machine on which I had a CD burner available was a Linux server machine. nLite was helpful in this regard, though, and offered an option to make the ISO file it created mkisofs-compatible. Using this, I was able to copy the ISO over the network to the Linux server, use mkisofs to test it and cdrecord (man page examples on this utility are helpful) to burn it.
- Boot the custom CD. Note that you no longer have to hit F6 at the point where you normally would to install custom drivers; the installer will simply detect that they're available on the CD and load them from there. Installation should be pretty normal after this point. Partition your drive however you like, being sure to leave enough room for Kubuntu to load. You'll probably notice the installer forces you to leave 8 MB free, presumably for the NT boot loader. Once you're in Windows, you can reset your screen resolution and manually install any drivers you didn't roll into the CD. Once you're connected, install any further Windows updates that might be necessary.
- Once XP is set up to your liking, pop the Kubuntu CD in, boot from it, and access the installer on the desktop once KDE has loaded. In order to not have Kubuntu overwrite your XP installation, you'll have to opt to partition manually. You'll notice that the installer sees the 8 MB that XP made you reserve earlier. I'm not sure why, but the installer sees this as free space. At any rate, I just consolidated that space into the Kubuntu partition and let it set aside its 3 MB to load GRUB. I'm not sure how to keep the NT boot loader and not load GRUB, so if you prefer that route, you'll have to dig around on your own to find out how. Set up your root and swap partitions and continue.
- Installation should again proceed fairly normally. Once you've loaded your installation for the first time, connect your machine to an ethernet cable and launch Adept, the package manager GUI for Kubuntu. Do a search for Windows and you should find a package called Windows Wireless Drivers. Install this for wireless if you need it. Beyond that, install updates and you should be good to go.
And that's all there is to it, folks. It was a wild ride to figuring out the process, so I hope my efforts help someone else looking to do the same thing. Cheers!
Watch Your Include Path
It's pretty rare that I encounter a bug in the software I run that hampers my ability to work or my server environment's ability to function normally. However, I encountered one last week that has taken me and several Rackspace support technicians nearly a week to figure out, namely PHP bug #43677.
The bug is in at least PHP 5.2.5, if not in previous releases in the 5.2.x branch. For the moment, we've downgraded the PHP installation to RHEL version 5.1.6, which I'm told includes backports of relevant bug fixes from the 5.2.x branch, to see if that doesn't stabilize the situation.
So, if it seems that PHP starts to "forget" your include_path setting, your issue may be with PHP and not Apache as I initially suspected since the include_path setting was being set via an Apache configuration file. Hope this saves someone else time and grief.
More Kubuntu Developments
I finally figured out how to control the monitor brightness via this forum thread using the xbacklight command. I'm really happy for that, because it was a bit of a strain on my eyes and I couldn't find a way to do it through the desktop manager. One other nice point about the forum thread is that it also walks you through how to execute this command automatically when battery power kicks in.
Kubuntu doesn't install it by default, but if you search Adept for ndiswrapper, you should get an option to install Windows WiFi Drivers. This includes drivers for the Intel PRO/Wireless 4965 AG/AGN card, and once installed, it worked without requiring me to track down and install drivers manually.
I wanted to see if some of my games would work under Kubuntu. I tried Wine, but wasn't able to get it to run Warcraft III without crashing immediately after selecting the play option from the splash screen. Apparently the supporting libraries for my particular graphics card (Intel 965 chipset) are fairly buggy when it comes to hardware acceleration.
I also attempted to install VMware in order to run the game in a virtual machine, but that was a dead end as well: the game won't run with the display drivers provided by VMware tools
and that it's not possible to install the host machine's drivers and
have them work correctly. Incidentally, this forum thread provided some feedback about how to remove a partial installation so that aptitude will allow you to do a reinstallation.
sudo dpkg --purge --force-remove-reinstreq vmware-server ended up doing the job.
So, as much as I hated the idea of having to go back to Windows, I set out to configure my system to dual-boot. Small problem: I have a SATA drive, which requires special drivers that Hitachi claims can only be installed via a floppy drive. My laptop doesn't have one, and I'm not overly inclined to purchase an external one just toinstall XP.
My friend Jeff Jones pointed me to a forum thread detailing how to integrate the SATA drivers as well as Service Pack 2 into a custom XP CD. Since I didn't have another existing XP installation, I had to use a VMware machine. It took some digging to find the Intel 82801HEM/HBM SATA AHCI Controller drivers and how to extract them for unattended installation. I used XP-ISO-Builder to create a custom ISO image and DeepBurner Free to burn it to CD.
In attempting to boot with the CD, though, I got as far as being prompted to install the drivers before being presented with the error "The file iaStor.sys is corrupted." Setup wouldn't proceed any further, so I gave up on it for now. If you have any experience with a working solution rolling SATA drivers into a custom XP CD, I'd be interested to know. Feel free to leave a comment on this blog entry.