First Time Linux

Hard drives

As in Knoppix, the drives are given names beginning with /mnt/hda followed by a number. If you've got more than one physical drive, then they can be called mnt/hdb. However, now we've got a fully-installed system, you don't have to refer to the basic drives like that any more, instead the root of the system (actually at /mnt/hda6/) is just /, and the home directory (again, actually at /mnt/hda8/user), is at ~, or alternatively /home/user.

The C: drive of windows (still NTFS, still read-only) is also given the alias /mnt/windows, and the transfer partition (FAT32 format, read-write for both operating systems) which is called E: by windows, is called /mnt/transfer.


The drive automatically appears as /mnt/cdrom and reads CDs and DVDs just fine. Writing CD-R still doesn't work though if the CD already contains a session - it looks like this is a bug in k3b which doesn't allow the writing of multi-session CDs. Writing to CD-RW works, but only if the disc is completely wiped first - which turns into an exhausting process if there's already a lot of stuff on there and you just want to add a few things to it - you then have to copy everything from the disc to the hard drive (and wait...) then wipe the CD (and wait...) and then copy everything back onto the CD again with the new bits (and wait again...).

USB thumb drives

USB thumb drive from Iomega

Mandriva automatically detects when the USB drive is plugged in, and mounts it automatically too. And, in a bonus compared to Mandrake 10.1, it doesn't seize the system up while it does it! Yay! The drive appears as /mnt/removable and works brilliantly.

The writes to this drive are still asynchronous, so it's good to make sure any writes are finished before unplugging the drive - otherwise you risk a corrupted mess. Right-click on the icon and select 'Unmount' just to be sure. Sometimes Mandriva doesn't offer you a desktop icon, however, so in that case you can unmount the drive manually from a command window. Mine is at /mnt/removable so to unmount it just type umount /mnt/removable - note it's umount not unmount! Another way to manage the unmounting is to use the little application KwikDisk, which sits in the task tray and lets you unmount with a right-click.

Recently, and I'm still not sure how it happened, one directory on the drive got corrupted, which meant it couldn't be deleted, and no new files could be written to the drive at all. I deleted everything else, but this one corrupted directory couldn't be read or deleted. The answer was to do a reformat of the drive, and it seems the only way to do this is from the command line: mkdosfs -c /dev/sda1 but note that the drive has to be unmounted for this command to work (odd), and therefore you have to use the device name, which in my case is /dev/sda1, but it's a very good idea to double or triple check this before doing the format!!


USB Trackball from Logitech

Again, this trackball works out of the box, although disconcertingly it seems to rewrite the xorg config file as it does so. This has the unwelcome effect of re-enabling the annoying 'tapping' on the touchpad, requiring an extra edit of the xorg.conf file to turn it off again.

Update: By disabling the service "harddrake" which was set to run automatically at boot time, the xorg.conf file is no longer being rewritten and the settings now remain. I can now boot with or without the mouse/trackball, plug it in at any time and it will be recognised, without altering the tapping and horizontal scrolling settings of the touchpad.


eTrex Vista GPS from Garmin

After getting the GPS to work with Knoppix (using garble), everything works exactly the same with Mandriva. Uploading tracks and waypoints (including altitudes) is a breeze, and after a little editing of the garble files it now uploads a bitmap of the screen display too! I still need an app to edit the tracks and delete the wayward points, this search is ongoing. The bugs I found with garble I reported to the sourceforge page, but that remains deserted since 2002. I've therefore made my modifications available on this site, so you can now find all the garble source (version 1.1) in the downloads section.

Two new applications have arrived since I got urpmi working - the first is a command line tool called gpsbabel which is able to get the waypoints from the GPS with the command gpsbabel -i garmin -f /dev/ttyS0 -o csv -F gpswaypoints.csv although in this form it only outputs the latitude, longitude and waypoint name, not the altitude. Using the output format gpx gives an xml output including altitudes, it's just a bit more difficult to parse. Gpsbabel can also load track data with the option -t as the first parameter - and again it can output in a variety of formats including csv (sadly only with lat and long) and gpx (with tricky-to-parse xml but including altitude and timestamp). Its main strength seems to be in waypoint format conversion, to and from various text, xml and binary formats.

The second addition is gpspoint, another command line tool, with a somewhat confusing console GUI called mgpspoint. Use the command line instead, the command gpspoint -t -d /dev/ttyS0 gives some test information, and gpspoint -dw -d /dev/ttyS0 downloads the waypoints and displays them. The output format is a little strange, eg type="waypoint" name="ZERNEZ" altitude="1470.9" latitude="46.69781" longitude="10.08982" symbol="waypt_dot" display_option="symbol+name" so although it does give altitude and even symbol type in the output, it needs some manipulation after downloading. The switch -dt does a similar thing for track data, and this time includes a "unixtime" parameter (seconds since 1970) for each trackpoint as well as latitude, longitude and altitude.

Another application for the GPS is called PyGarmin and is available from Unfortunately it doesn't (yet) understand the data format of my eTrex Vista (A802, anyone?) and so can't download waypoints or tracks. But who knows, maybe the Garmin code can be used to add this feature to PyGarmin?


Canon Ixus v2

Much improved camera functionality here with Mandriva and digikam. Now the camera is auto-detected by the system as soon as it is plugged in to the USB and switched on. Initially the system was calling a script to launch Konqueror to give direct access to the file system on the card (odd - I thought this camera didn't support USB mass storage?!) - but this isn't optimal for a couple of reasons. Firstly, it saves the pictures with the user root, requiring awkward permission-changing later, and secondly it gets very confused when the camera's card is changed. So I edited the script to launch digikam instead.

Digikam is a great find, and does much more than I first realised. It not only gives you a flat view of the files on the camera (as opposed to a directory view), and not only shows you which ones you haven't already downloaded (with a little * icon for 'new'), and not only lets you upload all the new ones with just a couple of clicks (Select - New Items, Download - Selected Items), but it also gives an impressive tagging functionality to let you identify and organise all your photos.

By creating tags for people you know and places you've been, and applying those tags to photos in your collection, you can quickly access all the photos of that person or that place, or that activity, or whatever else you've tagged, wherever they are on your file system. With multiple tags and tag categories it becomes a really powerful tool for finding photos when they're scattered around your directories.

Another camera

Panasonic FZ5

New toy! This new camera is a Panasonic DMC FZ5, and the cooperation with digikam isn't quite the same as with the Ixus. By default when the camera is connected to the USB port and switched on, the import question box pops up as before, but clicking 'import' leads to Konqueror rather than digikam. The camera is automatically mounted as an extra drive (exactly like the thumb drive above) at /mnt/removable which allows files to be copied from the camera using Konqueror. The disadvantage is that then you have to deal with the subdirectories on the card rather than a flat view. There's also no way of seeing which images have already been downloaded.

Firing up digikam's automatic camera detection comes up with a Panasonic FZ20, which is wrong and doesn't work ("camera is not connected"). Even compiling the latest gphoto2 to include an option for the FZ5, and selecting it manually, gives the same error message. The trick turned out to be to manually add the camera as a generic "Mass Storage device" instead. With this selected, digikam can download the images as before, but apparently without the 'select new' option. At the moment the 'import' button still fires up Konqueror, however, so I have to press 'Cancel' and fire up digikam myself.

As far as the camera itself is concerned, it works great and produces great pictures. The lens is fantastic with an enormous (12x) zoom and an amazing anti-shake system. The size is manageable (rather than compact) and the operation is intuitive and clear.

Some minor points to be counted against it include the cheap plastic lenscap, which is fiddly, and the slow focussing especially in low light. It has a sensor to detect portrait or landscape mode for photos but zooming in in playback mode resets portrait photos back to landscape again - clearly a bug. There's also no flash override function, to force flash use for backlit subjects, and worst of all there's no panorama mode for taking a series of photos with matched focus and exposure settings.

I emailed Panasonic to ask about this lack of a panorama mode and whether there was a way to lock the exposure settings on the FZ5 for a panorama, and got a very poor response. More than a week later, the emailed reply was a brusque, and obviously automated, one:

I would explain that you will need a third party software.

It wasn't quite explained how any "third party software" would help in any way. I clarified my question once again and after several weeks got a brief reply stating that there's no such mode on the camera - you can lock the exposure using the manual mode but there's no way to set or lock the focus. And it also means there's no on-screen guide to help with overlapping the pictures, and the files aren't named differently to help identify them later.

Card reader

Parallel port card reader from Hama

Doesn't work, because the method I was using with Knoppix doesn't work with a 2.6 kernel. But as I've not got a keyboard port on this laptop anyway, it's no great loss not to be able to access this card reader.

Parallel port zip drive

Parallel port zip drive from Iomega

As tested with Knoppix, this is an old 100MB Zip drive from Iomega which connects to the parallel port. It's a bit of an antique curiosity now but useful for transferring data from older PCs when network ports and USB sockets aren't available.

I followed the recipe at the Knowing Knoppix Wikibook by connecting and powering up the drive, inserting a disk, and executing in a terminal (as root) modprobe imm to load the required modules for accessing the drive. I knew I'd only be using this drive very rarely so I didn't change my fstab to accommodate it, instead I just created a mount point with mkdir /mnt/zip and then mounted it directly, specifying that my user is allowed to access the drive too (rather than just root): mount -w -o uid=501 /dev/sda4 /mnt/zip - that option specifying the user (-o uid=501) is based on userid rather than username, and the 501 was determined by looking at the file /etc/passwd for the entry for the chosen user.

After mounting this drive, it is then accessible as the normal user in Konqueror or from terminals etc and files can be read and written as normal. Just be careful to explicitly unmount the drive before ejecting the disk.

External USB hard drive

Nexstar external USB hard drive from Vantec

Another new toy, this is an external hard drive for extra storage space and a bit of peace of mind in case my internal laptop drive decides to die. One of the main reasons I chose this one was because its 2.5-inch format doesn't require an additional power supply, it should be able to draw all its power from the single USB cable. This makes it much more convenient for portable use, and especially for international use. However, the cost per gigabyte is quite a bit higher than the much larger, 3.5-inch bricks.

This Nexstar 3 case came with a 120 GB drive already installed and formatted (as VFAT), but it was a breeze to repartition and reformat it as desired. Things started to get a little trickier when I decided it would be cool to install a new version of Linux on this new drive so I can play with an alternative distro without repartitioning my internal drive.

Because I knew that Mandriva 2007 Spring worked on this machine and that I was familiar with the install process, I decided to first try to install that again on the external drive, but the subsequent boot didn't get past a grub hang. I reinstalled again using lilo but still just got error messages on boot. After puzzling with the initrd I tried to install Debian to see whether it was just a Mandriva problem, but with the same result - finally I found the answer on an ubuntu forum, it was to do with the bootloader config. In this case grub was trying to access the external drive as hd1 but due to the boot process it had now become hd0. Manually editing the grub config solved the problem, so now this USB drive has Debian Etch installed, plus plenty of space for ext3 and fat32 partitions for general storage.

PCMCIA card reader

PCMCIA SD card reader from Sandisk

Live versions of both Mandriva 2008 and 2008.1 refuse to talk properly to the Panasonic camera above (long story but the problem seems to be KDE-only as the gnome live CD manages to mount the camera ok). Therefore I looked around to see what the options for a USB card reader were, and the answer was: surprisingly cheap, only 5 CHF for what looks like a bulky USB stick with a card slot. But then I saw a PCMCIA version, which has the advantage of being able to stay plugged into the laptop permanently (hence not needing to go and look for the adapter) plus it doesn't take up one of my precious USB slots.

So this is the result, it cost only 10 CHF (about 6 EUR) and works immediately, no messing about, on both 2007.1 and 2008.1. It auto-mounts at /dev/sda1 just like a USB stick does, and digikam can also use it to download photos. Result. The only downsides: it can only read SD cards (plus some Sony formats), but not the compact flash used by the old Ixus. And getting the card back out of the reader is fiddly, you need a bit of fingernail to grab the card's front ridge.

Another GPS

eTrex Vista HCx GPS from Garmin

The etrex Vista mentioned above is getting old now, it's got some display issues (probably due to a deteriorating connection between the main board and the display), power issues (probably related) and just recently it's started becoming a little unreliable with downloading, requiring several retries to get the data ok (possibly due to worn electrical contacts). So I invested in its successor, an etrex Vista HCx.

The main benefits of this one (as well as being much cheaper than the old one was!) are a bright colour screen instead of a grey lcd, a higher sensitivity receiver (hence the "H" in the name), and longer battery life. It's also got a USB interface rather than serial, so it was interesting to see if the track downloading still works.

First impressions were disappointing - neither garble nor gpsbabel could get any points out of it. garble had slightly more success, getting the time without problems, but the data format must not be supported. I checked my version of gpsbabel to see if there was a new version out, and sure enough there was - so I temporarily changed my repository sources to 2008.0 and urpmi'd the new version of gpsbabel. Hey presto, waypoint and track downloading! Very impressive. However it still doesn't do all that garble can do, so the task of figuring out how to get garble to support it is ongoing.

Update: The program Qlandkarte can do the screengrabs which gpsbabel can't, so efforts to update garble have stalled. However, Prune can now call gpsbabel directly to extract waypoints and tracks which is a bonus! And not only that, with the latest version of Prune it can overlay the GPS data onto Openstreetmap tiles (or other open*map tiles) and send the edited data back to the GPS again (also using gpsbabel).

USB Webcam

USB Webcam from Philips

I wanted a USB webcam for video-telephoning (eg for Skype), and so bought a Philips SPC1300NC especially because it was said to use the standard UVC driver (and hence doesn't need its own, proprietary drivers). Unfortunately it didn't work with Mandriva 2007.1 but after upgrading to 2008.1 it now works. It's automatically detected and didn't need to have anything special installed for it. Skype uses it fine, and you can even use mplayer to view the feed directly:
mplayer -tv device=/dev/video0:driver=v4l2:width=640:height=480:fps=30 tv://
You can look in dmesg to see which device name has been allocated.

Using the Dell laptop, there was an unfortunate problem with two-way video, where Skype would immediately crash. Something to do with available ports, but whether it was a bug in Skype or a bug in X or a bug in the video drivers or a hardware limitation, was never clear. Anyway, with the new Shuttle K48, the webcam works great for two-way video using Skype, with good picture quality (obviously dependent on both parties' internet connections). Also, the application "Cheese" works well for taking snapshots with the camera.

USB Wireless dongle

USB wireless dongle from TP-Link

I was reluctantly forced into setting up wireless networking, due to the unfortunate socket placement in the new flat. Our internet provider gave us a free wireless modem, which was nice, but I didn't have any wireless capability on the Shuttle. So I got the USB dongle shown on the right from TP-Link, which promised 300 Mbps and therefore hopefully a similar networking performance like I used to have with good old wires. It didn't quite turn out like that.

Out of the box, and despite what I'd read before carefully choosing my purchase, this dongle wasn't supported by Debian Squeeze. It turns out that TP-Link changed the internals to use a different and newer chipset, without changing the product code TL-WN821N. So older versions of this product code work by simply adding a kernel module, but this newer one requires an entirely new kernel. So I had to get a newer Debian kernel (2.6.38) in order for it to work.

With the new kernel, and after entering the passphrase for the WPA authorisation, I suddenly had easy internet access from all applications, which was a great relief. However, testing the speed with revealed that you suffer a lot from using wireless rather than being plugged in with a wire to exactly the same router. Signal strength is not brilliant but should be sufficient to provide a decent speed, yet the online tests show around a third of the speed via wireless. It's ok to use but latency is noticeably increased too.

Another quirk - when I installed Debian I was using a wired network of course, and the setup helpfully added a DHCP check over eth0 to the bootup sequence. Once I was fully wireless, this DHCP check stalled the boot process, with the machine waiting for a long time to try to get a response from the absent wire. The solution was to find the file /etc/network/interfaces and delete the line which said "auto eth0" - then the boot whizzed along. It takes a few seconds for the wireless to get set up after login but at least you don't have to type in the passphrase again.

There's still an intermittent but repeatedly-occurring problem with this wireless driver, where if several applications are trying to use the internet at the same time, something seizes up and the whole machine has a spasm. It's so bad that it can't even shut down properly, because it can't stop the "avahi daemon" or any of the applications which are hanging trying to use the internet, and therefore can't even umount the hard drives. So it has to be brutally powered off, which obviously is awful. I'm still hoping there's a solution to this but it looks like an easier solution might be to get another wall socket installed and go back to reliable wired networking.

As a result of these problems, and the lack of success with resolving these system crashes, I have to say that this is the first peripheral which qualifies for a do not buy - either the hardware is poor or the linux compatibility is poor but either way you'd be advised to spend your money elsewhere.