Tethering a Nokia 6165i to a Compaq nc4010 using Bluetooth (Kubuntu)

This was not that hard to do – for a sysadmin and geek – but not for a general user. One of the things I like about Kubuntu is its ease of use and preconfigured and debugged desktop, but here it fails. Setting up a dialup networking connection is sorely inadequate, and is completely unintuitive. Most of this problem stems from several problems:

  • The menu structure in KNetworkManager is very obtuse and non-obvious.
  • Configurations created by kppp and by KNetworkManager (running kppp) result in two different configurations in two different locations.
  • Configuration of the ppp0: network device is not available anywhere related to networking.

A lot of this problem stems from the way KNetworkManager is set up; however, the network configuration interface should also allow for the creation of a ppp0: device.

There also seems to be no way to create a tethered link to a bluetooth device without using the command line. Not a problem for me nor for many of you, but for a general user it would be a real stumbling block. (I guess I shouldn’t be surprised; from the project page comes this bit about dial-up support: The rudimentary dial-up support gives the user the ability to connect dial-up connections configured using YaST. There is much room for improvement. As of 16/11/2007 in Opensuse 10.3, this is broken.).

Most of the directions I took from this article titled Bluetooth DUN tethering – Linux and KDE (Might work with Gnome) from PinStack.com (a support site for Blackberry users).

In this case, I will assume that you know how to pair a cell phone device with your Linux laptop; it’s fairly easy (though not completely intuitive). I’ll also assume that all of the requisite bluetooth support is available and already installed.

You’ll need to get the MAC address for the bluetooth device. This could be done any number of ways; from the command line this will do:

$ hcitool scan
Scanning ...
00:12:D1:C9:DF:5E Nokia 6165i

After the MAC address is found, then the next step is to find the appropriate bluetooth channel for dial-up networking. This can be done using the sdptool command:

$ sdptool browse
Inquiring ...
Browsing 00:12:D1:C9:DF:5E ...
Service Name: Dial-up networking
Service RecHandle: 0x10000
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

A lot of information spits out, but the relevant one for me was this entry. Now create the serial link that connects the “modem” to the operating system – in particular, a device /dev/rfcomm0 is created for communicating with the bluetooth modem (which is what the phone becomes). This is done thusly:

# rfcomm bind hci0 00:12:D1:C9:DF:5E 1

Once this is done, assuming the right channel was chosen, then kppp can be configured. Because of the conflict between kppp configuration and the KNetworkManager configuration, a setup step may be worth doing (as root):

# cd ~/.kde/share/config/
# rm -f kppprc
# ln -s ~me/.kde/share/config/kppprc

What this does, then, is make it so that your personal configuration for kppp is also used by root. Now kppp can be run from the command line (since it’s already open, right?) and you won’t have to go searching for the configuration in the menu tree:

$ kppp

After kppp is configured, you should be able to use your phone as a cellular modem. The configuration I used (for U.S. Cellular) worked, and has been described in these pages in the past.

Converting OpenBSD 4.1 guest from VMware to VirtualBox

This turned out to be easier than it would appear, although the vmware-tools needs to be extracted from the system.

The first thing that I did was to add the virtual hard drive created by VMware to the list of hard drives that VirtualBox makes available. This is in the Virtual Disk Manager from the main menu (Ctrl-D).

VirtualBox has native support for VMDK disks, the format that VMware uses. However, the documentation suggests there are restrictions, although the documentation may be obsolete: for one, it appears that snapshots are now possible, although the documentation suggests otherwise.

Having added the disk using the Virtual Disk Manager, I then created a new virtual environment and used the disk instead of creating a new disk from scratch. The disk was picked up and used seamlessly.

However, booting the environment (predictably) had problems: the VMware root disk was /dev/sd0a, but the VirtualBox root disk was /dev/wd0a. Thus, everything was fine until /etc/fstab was read, then OpenBSD presented the option to utilize a shell to fix the problem.

At the shell, it was necessary to mount the root filesystem read-write:

# mount -o rw /dev/wd0a /

Then editing /etc/fstab to use the correct disk was all it took.

However, VMware does not use an OpenBSD package to install the software, and apparently just drops it into the environment – and not in /usr/local either. All of the BSDs fiercely recommend placing every addition to the system in /usr/local – every add-on package does, from BIND to PHP to Apache to KDE to OpenOffice – everything. So for VMware to litter across the filesystem in this manner is very bad taste – and even without a package to extract it from the filesystem properly.

However, using locate, we can find the vmware-tools (or what looks like all of them):

# locate vmw

These files and directories can then be removed, although if the disk is to be used by VMware again you may not want to. However, using a virtual environment in two different products on a regular basis sounds like a recipe for disaster.

Running Kubuntu Intrepid Ibex Alpha 6 on a Compaq nc4010

e1000e driver in most recent Linux kernel causes corruption!

Before you try using Intrepid Ibex Alpha 6: there seems to be a problem with the e1000e driver that causes the hardware to be corrupted and could render the e1000e card useless – and even unrepairable. Even if you are using a Linux system that currently uses an e1000 driver, the new Linux kernel shifted some of the e1000 support to the e1000e driver. If you are using the Compaq nc4010 as this article describes, you should be fine: the nc4010 uses the tigon3 driver. There is a bug entry in the Ubuntu bug lists, and the linux-net mailing list has a thread on the bug. It also would appear that a fix went into the -mm kernel tree (a recognized Linus tree spinoff) as of 2.6.27-rc5-mm1. If you are hardy enough to run Ubuntu Intrepid, perhaps you could tangle with the experimental -mm kernel as well – and sleep better at night knowing your hardware won’t be wasted.

This turned out to be quite a challenge. Firstly, there was no way to install it directly – the previously mentioned Billix didn’t accomodate Intrepid and I didn’t have any large enough USB sticks to put a USB bootable image onto – assuming there is one for Intrepid.

However, remaining undaunted, I was able to install Intrepid without too much trouble – though any nontechnical user would have been stopped right up front. How’d I do it?

First, I installed VirtualBox onto another available system – using VirtualBox 2.0 – and then downloaded the Kubuntu install CD to that system. Installing Kubuntu Intrepid Ibis to VirtualBox was not a problem; everything went well. It was, however, quite slow! It turned out I had much less memory in the system than I thought – so between the 512 Mb in the system and the 300+ Mb that was allocated to the VirtualBox instance, I did a lot of waiting (sigh).

I made sure that the hard disk that was created in the virtual environment was smaller than the actual disk used by the system I was going to put Intrepid onto.

Once the virtual environment was complete and the install was finished, I stopped the environment and reconfigured for less memory. I then restarted the environment with a DSL disk (so as to not use the created virtual disk in any form).

I extracted the hard disk from the Compaq nc4010 that was to have Intrepid installed onto it, and removed it from the hard disk cage that notebooks like to use. I then connected the hard disk to a USB port using a cable adapter.

Now – with the virtual environment running DSL and a unused disk configured with Kubuntu Intrepid, and the host system running OpenSUSE 10.3 with the target disk attached via USB, the only thing left was a disk copy over the network. Using nc (or netcat) permitted the copy going direct from the virtual guest to the virtual host.

The networking had to be set up, and required the bridged mode. It appeared that the host had to already be configured for networking and active in order for the guest to be able to talk to the host (using NAT), but perhaps that was just me.

Once networking was set, the only thing that was needed was to copy from the guest:

# nc -p 4117 < /dev/hda

And copy to the host:

# netcat -l -p 4117 > /dev/sda

Note that this copy will copy the entire disk, including partition tables. This was by design and worked fine (apparently).

The biggest problem (aside from speed and memory overcommitment) was the fact that nc did not stop after copying all of the data from the hard drive – and there was no visible progress report anywhere. The destination disk had no activity light; nc had no progress report available; and so forth.

Another “problem” was the fact that the command nc did not exist on OpenSUSE but did in DSL: OpenSUSE used the full name for the command, netcat.

Once everything was copied, I could shutdown the virtual guest environment, and put the hard drive back into the original host (using the cage as mentioned before).

This did work and worked beautifully. The biggest problems came not from the installation, but from the fact that the installation is Alpha 6. Some of the programs on the task bar don’t have a proper background, several things crashed, icons are missing for some programs in the menu (including some programs that have icons shown elsewhere, like Amarok). I don’t know whether to be aghast or just patient – it is alpha software, after all. I’d just expected the most obvious bugs to be gone, but whatever.

Lastly, every time I hear that name…. am I the only one who thinks of the man called Intrepid?

Installing OpenSUSE 10.3 onto a HP nc4010

I installed OpenSUSE 10.3 onto a HP nc4010, and it went smooth. I am still working out the problems (here and there) as well as creating a number of new problems as I keep piling on the software (I always do that….)

This time I downloaded Billix and expanded it to cover installs of OpenSUSE 10.3, OpenSUSE 11.0, and Fedora 9. Billix is not actually a Linux distribution; it is a collection of distributions that are installable from the USB stick or CDROM (as well as utilities such as chntpw, memtest+, and Darik’s Boot and Nuke).

The biggest problem with installation so far seems to be that the grub installers I’ve seen so far cannot cope with the situation that Billix presents:

  • The boot disk (install disk) is the first in the chain (i.e., hd0).
  • The operating system is being installed on the second disk (i.e., hd1).
  • The startup disk (after installation) will be what is hd1 during installation, but will become hd0 on startup.

The end result is that the operating system install does almost everything just right but then installs grub onto the USB stick, and configures it to boot the hard disk. Thus, if you boot normally, the process halts mysteriously with no message; if you boot with the USB stick in place (booting from USB), then the USB stick will boot the operating system located on the hard drive.

Recovering both Billix and the native operating system are easy enough. To recover Billix, just redo the master boot record initialization process:

  • Install the MBR: install-mbr -p1 /dev/usbstick
  • Reactivate and reinstall syslinux: syslinux -s /dev/usbstick1

Note that install-mbr requires the disk device (such as /dev/sdb) whereas syslinux requires the relevant partition (such as /dev/sdb1).

Once the disk is properly configured, it is just a matter of finishing the install process. The install process reboots to finish, and it is all quite straightforward. Installing OpenSUSE is a breeze, and the amount of work that has gone into making a very easy-to-use desktop Linux is obvious from start to finish.

Even the bluetooth daemon, which caused problems after hibernation under Kubuntu, had absolutely no problems in OpenSUSE. Even turning the device on and off using the button on the laptop worked beautifully.

One thing that stood out was that there is no way to pair a bluetooth device. Nope. But let me explain…. If you try to pair a device, there is no way to do it. If you try to use your bluetooth device (copy files to it, etc.) then the system will ask you to pair the device at that time. I would have prefered both options, but oh well.

The experience in using OpenSUSE has been a delight; everything has been designed to present you with the best possible Linux experience possible. The choice of task bar applications on startup, the configuration of the desktop, the entire experience shows an attention to detail that many distributions do not have.

As a system administrator, you should try Billix. As a user, you should try OpenSUSE. Simple, eh?

Running Kubuntu on the Compaq nc4010

I’ve not been a big fan of Ubuntu in the past – and perhaps mainly from the aesthetics of it, as well as its reliance on Gnome – but I’ve neer felt I gave it a good test. Favoring KDE as I do, I loaded Kubuntu and gave it a run. I’m already a big fan of APT (through having used APT-RPM all these years) – and Kubuntu didn’t disappoint.

As I mentioned before, Kubuntu recognized everything on the system – bluetooth, PCMCIA, USB, wireless, ethernet, sound, video – it all worked.

Now after several weeks, how does it stack up?

I still don’t like the dpkg way of things: RPM is designed (and properly so, I say) to run unattended. If you use rpm to install, you don’t have to respond to any sort of install choices (there is no “partial install” – either it worked or it didn’t). APT is wonderful: dpkg is not – but that’s just my opinion.

I was surprised to see that, in Kubuntu at least, Synaptic seems to have given way to something called Adept. Not sure which I like better. I do know that I just despise the “dynamic search” that searches while you type. It slows everything down. I also don’t like the fact that I can’t sort things by groups – for instance, I’m always installing shells and languages of all sorts. Can’t I just look at those groups specifically?

I also found that with this hardware, the bluetooth adapter is always disabled (or seems to be) after hibernation. Using the key to re-enable it doesn’t help; the key is either intercepted or ignored by Linux. It’s not hard to make sure it is active after hibernation. First, make sure that the bluetooth is on at startup; if not, press the bluetooth button at the top. During the initial boot, the BIOS is in charge and it knows how to react to a press of this key – and the bluetooth light (blue) will come on.

If the bluetooth is not active after Kubuntu comes up entirely, it may be necessary to restart the bluetooth services:

/etc/init.d/bluetooth stop
/etc/init.d/bluetooth start

Don’t use bluetooth restart; it may be that more time is needed or something else. It may or may not be necessary to restart kbluetooth; if so, stop it from the task bar and run it from the System menu under the K menu.

With kbluetooth, you can tell if bluetooth is active or not: if the entire icon is gray (including the symbol) then there is no bluetooth adapter recognized. If the symbol is white, then there is an adapter present (though it may not be active).

There is also the Synaptics touchpad – but this is good stuff. The touchpad has capabilities that are not well-explained out there:

  • Using a two-finger tap or a three-finger tap results in a right-button click and a middle-button click respectively (at least that’s what it looks like).
  • Dragging your finger from top to bottom (or vice versa) on the extreme right side results in scrolling (similar to a mouse-wheel).
  • Dragging your finger from left to right at the top may result in scrolling left-to-right (I couldn’t test this out).
  • A double-tap and swipe is the equivalent of dragging an object – or at least, it is the equivalent of holding down the mouse button.

I found that both ksynaptics and touchfreeze (for configuring the Synaptics capabilities) are missing from repositories; only gsynaptics is present. There is good documentation from Ubuntu on how to set up a Synaptics driver; I recommend it.

The system as a whole does get hot – and, for whatever silly reason, has exhaust vents on the bottom (a silly idea in my opinion). No wonder people’s laps got hot. I have three film canisters that I set in a triangle to support the machine; it works beautifully. I plan to fill them with sand to keep them from moving around.

This combination of software and hardware is wonderful – the machine is nice, and the system is nice. Everything was integrated with a click: DVD playback, MP3 support, Flash support – it all came down with just a click. Everything is supported. I love this machine.

Compare and contrast: your favorite *NIX

I seem to find myself attempting to find good, quality answers to questions that usually invite flamewars. I usually manage to do alright.

I’ve discussed the merits of Linux and BSD in recent days. Why does it matter? Who cares if Linux is better than BSD – or if Solaris is better than Linux?

It is important, especially in the corporate data center, because we must justify the use and support of whatever system we want to use. It is not enough to say it’s better – we must justify our choices to people who don’t care which one looks better or which has the better development model.

What do executives care about? Stability and reliability. Twenty-four hour phone support. On-call support. Security against hacks. User base. These are some of the things that executives (like CIOs and CEOs) want to know about. Even for open source desktops, these same qualities are of importance to them.

If you know the ins and outs of all of the systems that are available, then you can better judge which may be good and can explain your choices (or prefered choices!) to your CIO or other management. Better still – can you back it up with examples and details? If you’re going to pitch FreeBSD (or a FreeBSD-based desktop) you’ll have to.

This is also why many times the systems that are installed are not the most reliable (they are the most well-supported) or the most technologically capable (they are the most widely known). This is truly unfortunate – it is the oft-reported “barrier to entry” (in this case, it is the network effect) – but it’s the way it is until you find management willing to take a chance.

Birthdays! (GNU, Debian, Google, and more!)

I just can’t believe all of the birthdays in the recent weeks.

The Debian Project celebrated 15 years on August 16th. There is a nice wiki page about the celebration (known as Debian Day) which occurs every year around the world.

FreeBSD also celebrates 15 years. The announcement of the celebration was made in the freebsd-announce mailing list by Matt Olander. The celebration will be at Meet BSD California ’08 on November 15-16 in Mountain View, California (and at Google no less!).

The GNU project turns 25 in September. There is a delightful film by Stephen Fry describing GNU and what it is and what it’s done (and an article about the film), and there is an article by Matt Lee about GNU and how it will celebrate.

Google turns 10 on Sep. 7. There are photos of what the Google computing center looked like over the years from a talk by James Dean give at the 2007 Seattle Scalability Conference.

One more birthday (though not one to celebrate!) is the one-year anniversary of the RIAA’s legal campaign against on-campus file sharing. Ars Technica has a nice article about it, and there is a nice response by Bill Wyman. It’s also the four-year anniversary of the RIAA’s general legal strategy against file sharing; this is covered nicely in an article by David Kravets at Wired. That article starts with an impressive number indeed: 20,000 lawsuits? Astounding…

Any other anniversaries I missed?