Posts tagged ‘Kubuntu’

Oracle XE 10gR2 on Kubuntu 64-bit

So I started poking around for instructions on installing Oracle XE 10gR2 on my Kubuntu Hardy 64-bit installation recently. I came across this article from Oracle, which seemed like exactly what I wanted. Unfortunately, it assumes that the intended host operating system is 32-bit, which causes issues if you try to install XE through apt as the Oracle article suggests. After following these instructions, I immediately received this error:

W: Failed to fetch \ Unable to find expected entry main/binary-amd64/Packages in \ Meta-index file (malformed Release file?)

After that, any apt command issued (related or not) produced this error.

E: The package oracle-xe needs to be reinstalled, but I can't find an \ archive for it.

And finally, when I resorted to using this excellent guide instead, I ran into this problem because of the earlier failed installation.

dpkg: regarding oracle-xe-universal_10.2.0.1-1.1_i386.deb containing \ oracle-xe-universal: oracle-xe-universal conflicts with oracle-xe oracle-xe (version is present and broken due to failed \ removal or installation.dpkg: error processing oracle-xe-universal_10.2.0.1-1.1_i386.deb \ (--install): conflicting packages - not installing oracle-xe-universalErrors were encountered while processing: oracle-xe-universal_10.2.0.1-1.1_i386.deb

Luckily, I was able to find a solution to purge the failed installation from the system.

dpkg --remove --force-remove-reinstreq oracle-xe-universal

One thing that the Oracle article was useful for was creating a swap file large enough for Oracle to use, as the issue described in the article with not having enough swap space did arise when I initially tried the installation. Beyond that, the non-Oracle guide mentioned earlier worked like a charm and I now have a working XE installation on my system.

Unit Tests and Code Coverage with PHPT

My initial experiences with unit testing and PHP were with PHPUnit. While it’s a great tool and I have to give kudos to Sebastian for contributing so much to its development, I’ve come to appreciate the simplicity of PHPT tests. Recently, I wrote some for a project and realized that I wasn’t aware of how to generate code coverage reports. Many thanks to the very helpful patrons in the #pear channel on EFNet for helping me to get this working.

First, the stock Kubuntu installation of PEAR is version 1.6.1. Their first recommendation was to upgrade to 1.7.2, which was easy enough:

sudo apt-get install php-pearpear update-channelspear upgrade-all

Next, PEAR bug 13958 can prevent code coverage reports from being generated properly. This bug has an available patch, which you can apply by doing the following:

cd /usr/local/share/PEARwget -c PEAR/RunTest.php phpt_coverage_bug.patch.txt

Now to install PHPUnit. I ran into an odd issue here where following the installation documentation resulted in PHPUnit 1.3.3 stable being installed, which is obviously a fairly old version. Even pear clear-cache didn’t seem to solve the issue. I checked to confirm that PEAR was using PHP 5. The only way I was able to get around this was to explicitly specify the latest version.

sudo pear install phpunit/phpunit-3.2.19

The current version of PHPUnit, 3.2.19, also has bugs 482, 483, and 484 related to generating PHPT code coverage reports. I had to apply the patch for bug 482 to fix issues I was having, but the others may also be necessary depending on the code being tested. These issues should be fixed when PHPUnit 3.2.20 is released. In the meantime, if you want to avoid manually applying patches and you’re feeling adventurous, you can use an git checkout.

As far as I can tell, PHPUnit itself does not contain a runner for its PHPT suite extension. However, there is a runner script to do this in PEAR CVS. Download the script to the directory containing your PHPT test files and execute it with a command similar to this.

phpunit --coverage-html ../Tests-Results \    Console_CommandLine_AllTests AllTests.php

In the case of this particular command, the Tests-Results directory parallel to the directory containing your PHPT files should now contain an index.html file with your test results. There you have it. Happy testing folks!

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.

  1. Download nLite. Use it to make a local copy your Windows XP CD.
  2. Download the standalone Service Pack 2 installer. Point nLite to it as a service pack to include.
  3. Download the Intel 82801HEM/HBM SATA AHCI Controller driversExtract them for unattended installation and point nLite to them.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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!

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 to install 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.

Kubuntu + Vaio = Nice

So the tax return ended up coming in around my birthday. Since it had been a long while since I’d gotten an upgrade, I decided to treat myself to a new Sony Vaio VGN-NR298E. The first order of business once I got it, of couse, was to wipe it clean of Windows Vista. Not having ever settled on a Linux distro of preference before, I decided to give Kubuntu 7.10 a try.

After installing and booting up for the first time, I found that the wireless didn’t work right out of the box. I was able to find this forum thread, which included a link to the Intel PRO/Wireless 4965 AG/AGN network card drivers in the section marked “Wlan.” I installed ndiswrapper-common and ndiswrapper-utils-1.9, the latter of which appeared to include a version of the netw4x32 driver. However, when I issued the command ndiswrapper -l, it indicated that the driver was invalid. I removed it with ndiswrapper -r netw4x32, then downloaded the latest version from the aforementioned link and installed it as per the forum thread’s directions.

I also needed a solution to allow me to manage the music and files on my Creative Zen Vision: W. I’d had great experiences with their MuVo line, but I have to say that the experience with the Zen hasn’t been nearly as good. Creative has extremely subpar Windows-only software for interacting with the hardware, the design of which was obviously intended to keep third parties from developing their own software.

Oddly enough, I’d never heard of this before, but Gnomad2 was quite the excellent solution for my situation. It’s a simple program with an FTP client-like interface for transferring music and files to and from the Zen. If you enable the universe and multiverse repositories, you should be able to find it by searching Adept.

I also ran into the reputable difficulties with the keyboard function keys. The volume function keys will only let me toggle the volume up and down a single level relative to its current level. The brightness keys don’t work at all, which is annoying as I end up missing the feature that worked fine on my old Dell Inspiron 1150. I’ve tried a few suggested solutions for getting these to work, but no luck so far. Any feedback on this is welcome.

I couldn’t adjust myself to Konqueror as it felt like an unfamiliar, slow, and crippled version of Firefox. I ended up installing that along with the Flash Player add-on for it and my usual group of extensions. I also found the default installation lacking a program capable of playing some video formats, so I installed VLC (also available from Adept).

Overall, though, I think I’m liking Kubuntu. Hopefully Lorna Jane will be able to help me get further accustomed to it.