Dual-boot Laptop – Vista and Kubuntu 9.04…

I started last night.  First, I decided to use the 32-bit LiveCD installer.  I booted off the CD after shutting down Microsoft Windows Vista Home Premium, and soon was at the GUI (I chose the first option; to test before installing).  Once there, i opened up a konsole session, ran “sudo -i” to get root, and installed gparted – “apt get install gparted”.  After it installed (to RAM of course), I ran it to see what I could do.

NOTHING.

I could not resize the 140 GB partition Windows called a “C drive”, because I forgot to defragment it first.  Crap.  So I booted back into Windows, Safe Mode.  I found the defrag tool under the System Accessories, but it would not run.  I tried from the command prompt as well.  I rebooted, into SAFE Mode With Console, and it still wouldn’t work.  I finally just rebooted into Vista normally – then it worked.  It gave no status other than a flickering hard drive light and a spinning cue that meant it was not finished.  Eventually, it did finish.  It claimed to have been doing it on a schedule, and the last defrag was back on the 5th of May, yet it took over two hours to complete.  Guess what?  It made all the difference in the world.  I suspect it wasn’t really defragmenting after all.

Once I rebooted into Kubuntu Live CD and reran gparted, I was able to resize it.  The first attempt failed – I cut it too close to the bare minimum space i could shrink the drive.  I decided to split it 50-50, giving about 70 GB for each side, and then it worked.  This took another hour, but I had 70 GB or free space.  I went into cfdisk and manually made a 10 GB bootable partition for root, a 3 GB for /var, a 2 GB for /tmp, a 2 GB for swap, and the rest for /home.  i then rebooted into Windows.

Windows behaved as expected, like it had been punched int the mouth, but didn’t know by whom.  It rescan itself, determined that everything was still ok, and rebooted again.  This reboot came up fine.  Satisfied I had not broken Vista, I rebooted a final time back into the Live CD.

I went ahead and formatted everything with XFS except the swap partition:

  • mkfs.xfs -f -d agcount=1 -i attr=2 -l lazy-count=1,size=128m,version=2 /dev/sda3
  • mkfs.xfs -f -d agcount=1 -i attr=2 -l lazy-count=1,size=128m,version=2 /dev/sda5
  • mkfs.xfs -f -d agcount=1 -i attr=2 -l lazy-count=1,size=128m,version=2 /dev/sda6
  • etc…

I then made the swap partition and then installed, choosing to manually select my partitions and not to format them.   I went to bed, abd when I woke up and checked in the morning, it was done.  I had been unable to get wireless to work (no proprietary drivers needed, just would not work) on the Live CD, so I had connected it up via network cable.  Once I booted into the new system, I saw that it had a GRUB entry for Windows (it works).  After logging into KDE, I was able to set up a working wireless connection with no real drama.  I also modified my /etc/fstab to mount the XFS partitions with the following options:

noatime,nodiratime,logbsize=256k,logbufs=8

I edited /etc/X11/xorg.conf and added in the section to reenable the CTRL-ALT-BACKSPACE zap for X:

Section "ServerFlags"
      Option          "DontZap"               "false"
EndSection

I installed the medibuntu repositories, the kubuntu-restricted package, the sun-java6 package, the non-free flash package, the libdvdcss and libdvdread packages, lots of TTF fonts, the MSTTF core fonts, skype2, firefox, thunderbird, and the packages needed for a DoD smartcard.

Links:

Medibuntu

DoD CAC

Thunderbird setup with AKO

Kubuntu-restricted and Sun-JRE6

Xorg no-zap

Results:  It boots and shuts down much faster than Vista.  It is a Compaq lapto, Pentium Core-Duo, 1 GB RAM, uses the ath5k driver for wireless, has an integrated Intel graphics adapter (maybe 800 fps max on glxgears), and a 160 GB SATA drive.  It has sound, a mic, speakers, a DVD writer, some USB ports, and a network jack.  Overall, not too bad for what I need it to do.  But it is a little shaky and unstable from time to time, so I have shut off the compositing effects and unloaded some troublesome widgets (RSS news widget especially seemed flaky).  But the suspend and hibernate functions work great, and the webcam i bought (Logitech) worked right off the bat with skype.  So did my smartcaard reader.  I also installed the Acrobat Reader from the Adobe website – with it, I added the coolkey security device and am able to sign fillable PDF files with my card.  DVDs also play (region-free, of course).

So, these are my ramblings on the notebook.  I dual-booted because my wife insisted I keep Vista, just in case the Linux machine she is on dumps.  But she is getting more comfortable without Vista already – I can tell.

Logitech Orbit Webcam on Kubuntu Hardy…

I have a Logitech Orbit AF USB webcam, with Pan-Tilt-Zoom (PTZ) controls.  I got it to work on an earlier kernel, on a different computer, by compiling in a custom module, and loading some other modules, and doing some things I never bothered to document.  So, I completely forgot how to make it work on my main computer.

Two things have changed:

  1. The newest kernels (2.6.28.5 and higher, certainly) definitely have the drivers needed for this camera.
  2. I am writing it down this time.

I went through a couple days (off and on) of pain for this one.  No matter what, I could not get modules to load or drivers to compile.  I do not remember the details – they are irrelevant anyway.  What I did notice is that on Hardy Heron (Ubuntu 8.04), I did not have a “/dev/video” entry of any sort.  Making one did not help.  To test the camera, I installed “cheese”.  Just running “cheese” without configuring it was sufficient to test.

I tried rolling a new 2.6.29 kernel, but kept getting weird compiler seg faults.  I did not dig into this, and have no answers for anyone suffering from the same issues.  Instead, I went back to my current kernel source, 2.6.28.5, and ran “make menuconfig”.

In the “Device Drivers” section, under “Multimedia Devices”, I enabled “Video for Linux” (V4L), including support for API 1.  Next, under “Video Capture Adapters”, I enabled the “Autoselect..” option and checked all the modules.  I also enabled the last item, “V4L USB Devices”.  Under this menu, I enabled support for “USB Video Class (UVC)” and UVC events and selected all the modules.  Lastly, I enabled support for “GSPCA Webcams” and selected all the GSPCA modules, for good measure.

I compiled and installed the kernel (ignoring the warnings about building over an existing kernel), shut down entirely (cold boot), powered back up with the webcam plugged in, and logged in as usual.

I checked for “/dev/video” and discovered an entry.  This is a good sign.  Next, I fired up “cheese” and after a small delay, my webcam video was displayed.

Success!

I also tested with Skype and Kopete.  Works in both cases.

I do not have PTZ control, although I did get that working on the last computer.  I do not really need it here though, so I will not pursue it unless I get really really bored.

Sorry this is not a more involved solution, requiring all kinds of strange software contortions.  As it turns out, all I had to do was use a current kernel and enable the proper modules – Ubuntu did everything else. I suspect the UVC support did the trick, since I had most everything else already checked, but I went ahead and wrote this as if I had started from scratch to capture all the details.

This stuff is getting too easy…

Follow

Get every new post delivered to your Inbox.