Trying out Ubuntu 11.04 Beta 1
I just wanted to jot down a couple of first impressions about Ubuntu 11.04 Beta 1, as that seems to be sort of the en vogue thing to do these days.
A brief summary of my configuration:
Lenovo Thinkpad T500
Intel Core 2 Duo P8700 @ 2.53GHz
8GB 1066MHz DDR SDRAM
Intel 5100AGN Wireless
Intel GMA x4500 video (ATI graphics disabled for battery life issues)
WD 160G 5400RPM drive, with dm-crypt /home partition
To start with, I upgraded my 10.10 installation by letting update-manager -d do its thing. The process was mostly painless (a couple of customized config files needed manual intervention but that’s to be expected) and took a little over an hour to complete. Upon reboot the system was up and running without any issues which is a testament to the continued work of the Ubuntu developer community. It continues to astound me how trouble-free the various betas have been at least from the dist-upgrade front.
I’ve been using the new Unity interface for a day or two now and while I’m happy that I don’t hate it as much as I did in the alphas.
The Good:
It is fast and stable at the moment. I think compiz is a little more power-hungry on my laptop than metacity was, but not enough that it is setting my lap on fire. At least from an upgrade perspective I have not found anything that doesn’t work that used to (I maintain a local apt repository of various changes and customizations for my systems, nothing that I had working in 10.10 broke in 11.04 beta). The work on the indicators has been very good for the most part, the Network Manager applet is quite a bit better than the previous versions.
The Bad:
Compared to the new Gnome 3 interface Unity seems a little clunky, probably due to the netbook heratige of the design though I am glad that I still have the minimize buttons. The launcher/dock/whatever thing doesn’t always hide, so it sits there taking up space on screen for no good reason and you can’t move it from the left hand side which is not where I’d put it if I had the option. The Apple-like menu bar is a little irritating, but really only because I think it is highly derivative and I am sad that we couldn’t come up with something better from a design standpoint. I also find the dash to be annoying to use but I don’t really know why. Finally I’m not sure why the new date/time indicator had to lose the weather. I travel a lot and had many different locations defined in the previous applet and having an at-a-glance view of the weather was a nice feature to have.
Conclusion:
I was really worried that I’d either have to skip this release or continue using the Gnome 2 panel interface after looking at the first couple of alphas but overall am pretty happy. I will try Gnome 3 when (if?) it comes to Ubuntu and see how it stacks up. I think it’s a prettier and cleaner interface but only time will tell which I like more. The amount of work that the Ubuntu community put into this release is pretty amazing and the fact that it landed in as good of shape as it did is a really huge accomplishment.
Obligatory screenshot:
Ubuntu 11.04 Beta 1
Update, 18/April/2011 It would be really nice if they would fix this bug before shipping 11.04.
I finally wrote my first BlackBerry (handheld) App
I spent a couple days over the last couple weeks working on a BlackBerry WebWorks application. The BlackBerry WebWorks API is basically a HTML/JavaScript application compiled into a Java application for use on the handheld. It has access to a fairly large set of the RIM APIs in the device and as I am not interested in learning Java, is about the only option I have.
As a primarily hobbiest developer I found the process to be fairly straightforward, though unfortunatly extremely Windows-centric. The primary debug workflow involves Eclipse and the BlackBerry device simulators, the latter being Windows-only. Trying to debug without the sim is a non-starter as the JavaScript engine will not throw any useful error messages while running live on a device. It is not wholly awful but I really do prefer avoiding Windows if I can reasonably manage it.
There are obvious Enterprise edges sticking out through the process though happily the new, fluffy, comsumer oriented image that RIM is putting on has really improved the developer start up process. Code signing keys no longer cost money, and getting them is basically a process of signing up in a web form and waiting a few days for the files to be delivered to your Inbox.
I ended up writing a small application that takes some of the backend data that powers my personal Status Board (similar to the Panic Status Board) and displays it on the phone along with some other useful data that I can get out of the RIM APIs.

I originally was just using jQuery to fetch the JSON from my status board but was somewhat unsatisfied by the performance of pulling the data over the macro network and loading it into the page every time the application loaded so I replaced that with an on-device cache and push update system that takes advantage of the BlackBerry Enterprise Server I have (RIM offers a free push service over BIS as well but I like the idea of using the BES’s encrypted transport) hosting my e-mail.
The push server side of the equation is somewhat poorly documented, mostly through snippits of Java and .NET code that other people have implemented and some PDFs from RIM describing the format. After some trial and error I was able to pull together a workable Python update script that fetches the JSON from my status board and pushes it to the handheld. This allows fast, bandwidth friendly, scheduled, asynchronous updates and improves the user experience quite a bit. I totally understand why RIM is pimping their push infrastructure as being a vital part of what they are calling “Super Apps”. Having the data come to the user versus making them constantly update it is kinda awesome.
I doubt this application will be useful for anyone else but in the odd case that it might be the code is available in my bzr repository, which you can view at: http://repo.ub3rgeek.net/branches/blackberry/files, the status-app directory contains the handheld application source and the push-server/status-push.py file contains the push application.
Site updates — unification the themes
I spent a little time in the last day or so updating WordPress and loggerhead with themes that look pretty close to the main ub3rgeek.net page. I apologize if something looks funky. Please feel free to let me know if you find anything broken.
PXEboot VMWare ESXi 4.0 Installer
Introduction, or Why I care…
I have been meaning to install ESXi on a server I have sitting in the house for a while but a lack of CD-ROM drive has been stalling things for a while so I wanted to see if there was any chance of booting the ISO image from the network.
The server has internal storage, so I’m not RUNNING ESXi off the PXEBoot image, I’m installing it.
- Yes, there sure is
- All the guides currently around the Internet, SUCK.
Prerequisites, or what you should already know…
You will obviously require a working PXEboot Network infrastructure, which means a functioning TFTP server and a functioning DHCP server, which is setup to give out your TFTP server and PXELinux executable. There are numerous guides on this so I’m not going to go into that here. For reference, I’m running Ubuntu Server 9.10 on my TFTP host and OpenBSD 4.7-current on my DHCP server.
Process, or what the hell do I do…
Get the VMWare ESXi ISO from their website, this should be more straightforward than it is, but what can you do. Once you have the image, use something like Daemon Tools under Windows, or a loopback mount(8) under Linux to get access to the ISO. The root directory of the ISO should look something like this:
boot.cat cimstg.tgz cim.vgz cisco_n1k ienviron.tgz image.tgz install.tgz isolinux.bin isolinux.cfg mboot.c32 menu.c32 README.txt sys.vgz vmkboot.gz vmkernel.gz
If you look at the isolinux.cfg file, you will see what files are loaded for boot. I copied mboot.c32 (the chainloader), and *gz to a subdirectory in my tftpboot dir (the Ubuntu default of /var/lib/tftpboot in my case) called esxi. I then added the following line to my pxelinux.cfg/default file:
LABEL esxi
kernel mboot.c32
append esxi/vmkboot.gz --- esxi/vmkernel.gz --- esxi/sys.vgz --- esxi/cim.vgz --- esxi/ienviron.tgz --- esxi/install.tgz --- esxi/image.tgz
You should now be able to boot your system and select Network Boot, it will take a while to tftp over the image.tgz file but once it does it should fire up the ESXi installer and let you install as you would over the harddrive. A few minutes later you should have a screen telling you to reboot and then you should have a working ESXi server.
Bluetooth DUN with BlackBerry 9700, T-Mobile and Ubuntu 9.10
I just bought a new laptop (Thinkpad T500) but the only WWAN cards available built in were for either Verizon or AT&T, which is suboptimal as I use T-Mobile which uses the AWS UMTS bands (1,4,8) instead of the bands used in the US by AT&T (1,2,5,6). Since my Blackberry 9700 supports T-Mobile 3G as well as their implementation of UMA I decided to try to get the Bluetooth DUN working.

Bluetooth DUN, T-Mobile UMA
After much searching, this post got me the closest though recent changes either with the new OS 5.0 on the 9700 or T-Mobile’s network have made some tweaks necessary.
http://pegelinux.wordpress.com/2008/06/11/blackberry-curve-8310-as-bluetooth-modem-on-ubuntu-hardy/
I will not go into all the step-by-step details as it is covered above and elsewhere, but first you need to get your computer to bind to the Blackberry DUN service via Bluetooth, I chose to edit /etc/bluetooth/rfcomm.conf to make this happen automatically, but BlueManager also seems to be able to do the same thing with a much more friendly UI if you want to try that route, anyway you cut it, you need to have the DUN service show up as a /dev/rfcomm# device. Once you have completed that you will want to setup pppd(8) much like the above article suggests.
This resulted in a session that looked like the following for me:
mernisse@mernisse-laptop:/etc/chatscripts$ pppd call gprs
Press CTRL-C to close the connection at any stage!
defining PDP context...
OK
OK
waiting for connect...
CONNECT
Connected.
If the following ppp negotiations fail,
try restarting the phone.
Script /etc/chatscripts/gprs-connect-chat finished (pid 14835), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 < --> /dev/rfcomm0
sent LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5db98b32>
rcvd LCP ConfReq id=0x0 <asyncmap 0x0> <auth pap>
sent LCP ConfAck id=0x0 <asyncmap 0x0> <auth pap>
rcvd LCP ConfRej id=0x1 <magic 0x5db98b32>
sent LCP ConfReq id=0x2 <asyncmap 0x0>
rcvd LCP ConfAck id=0x2 </asyncmap><asyncmap 0x0>
sent PAP AuthReq id=0x1 user="mernisse-laptop" password=""
rcvd PAP AuthAck id=0x0
PAP authentication succeeded
sent CCP ConfReq id=0x1 <deflate 15> </deflate><deflate (old#) 15>
sent IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd LCP ProtRej id=0x1 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd IPCP ConfReq id=0x2 <addr 169.254.1.1>
sent IPCP ConfAck id=0x2 </addr><addr 169.254.1.1>
rcvd IPCP ConfNak id=0x1 <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x2 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x3 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x4 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x5 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x5 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x6 <addr 0.0.0.0>
rcvd IPCP ConfNak id=0x6
sent IPCP ConfReq id=0x7 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x7
sent IPCP ConfReq id=0x8 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x8
sent IPCP ConfReq id=0x9 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x9
sent IPCP ConfReq id=0xa </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0xa </addr><addr 14.36.76.18>
sent IPCP ConfReq id=0xb
rcvd IPCP ConfAck id=0xb
Could not determine local IP address
Connect time 0.1 minutes.
Sent 186 bytes, received 120 bytes.
sent IPCP TermReq id=0xc "Could not determine local IP address"
rcvd IPCP TermAck id=0xc
sent LCP TermReq id=0x3 "No network protocols running"
rcvd LCP TermAck id=0x3
Connection terminated.
Sending break to the modem
PDP context detached
Script /etc/chatscripts/gprs-disconnect-chat finished (pid 14843), status = 0x0
Serial link disconnected.
As you can see, a number of Naks have been received for things that do not work and the connection fails. Tracking each error down step by step I removed noauth from the peers file and replaced it with user “” to force a null user-name in the PAP authentication. I also removed userpeerdns as it appears that the Blackberry was refusing to give it to me. The final piece was that I was hitting what I assumed to be a race condition, as the Blackberry did not have an IP address to give me yet, it kept sending ConfNak to me until it finished setting up the tunnel to T-Mobile on my behalf… (see inset)

Tunnel List
mernisse@mernisse-laptop:/etc/ppp/peers$ pppd call gprs
Press CTRL-C to close the connection at any stage!
defining PDP context...
OK
OK
waiting for connect...
CONNECT
Connected.
If the following ppp negotiations fail,
try restarting the phone.
Script /etc/chatscripts/gprs-connect-chat finished (pid 15068), status = 0x0
Serial connection established.
using channel 12
Using interface ppp0
Connect: ppp0 < --> /dev/rfcomm0
sent LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x448e9c82>
rcvd LCP ConfReq id=0x0 <asyncmap 0x0> <auth pap>
sent LCP ConfAck id=0x0 <asyncmap 0x0> <auth pap>
rcvd LCP ConfRej id=0x1 <magic 0x448e9c82>
sent LCP ConfReq id=0x2 <asyncmap 0x0>
rcvd LCP ConfAck id=0x2 </asyncmap><asyncmap 0x0>
sent PAP AuthReq id=0x1 user="" password=<hidden>
rcvd PAP AuthAck id=0x1
PAP authentication succeeded
sent IPCP ConfReq id=0x1 <addr 0.0.0.0>
rcvd IPCP ConfReq id=0x1 </addr><addr 169.254.1.1>
sent IPCP ConfAck id=0x1 </addr><addr 169.254.1.1>
rcvd IPCP ConfNak id=0x1
sent IPCP ConfReq id=0x2 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x2
sent IPCP ConfReq id=0x3 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x3
sent IPCP ConfReq id=0x4 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x4
sent IPCP ConfReq id=0x5 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x5
sent IPCP ConfReq id=0x6 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x6
sent IPCP ConfReq id=0x7 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x7
sent IPCP ConfReq id=0x8 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x8 </addr><addr 14.34.55.230>
sent IPCP ConfReq id=0x9 </addr><addr 14.34.55.230>
rcvd IPCP ConfAck id=0x9 </addr><addr 14.34.55.230>
replacing old default route to wlan0 192.168.196.1
Cannot determine ethernet address for proxy ARP
local IP address 14.34.55.230
remote IP address 169.254.1.1
Script /etc/ppp/ip-up started (pid 15070)
Script /etc/ppp/ip-up finished (pid 15070), status = 0x0
^CTerminating on signal 2
Connect time 4.7 minutes.
Sent 300422 bytes, received 1437245 bytes.
restoring old default route to wlan0 192.168.196.1
Script /etc/ppp/ip-down started (pid 15112)
sent LCP TermReq id=0x3 "User request"
rcvd LCP TermAck id=0x3
Connection terminated.
Sending break to the modem
PDP context detached
Script /etc/chatscripts/gprs-disconnect-chat finished (pid 15117), status = 0x0
Serial link disconnected.
Script /etc/ppp/ip-down finished (pid 15112), status = 0x0
mernisse@mernisse-laptop:/etc/ppp/peers$
Looking at the phone it appears that it snuck into Modem Mode and I was able to ssh around and perform the speedtest that adorns the top of this post. I used the gprs-disconnect-chat file unmodified from the post I linked to, but modified the gprs and gprs-connect-chat files which you can get by clicking on their names or looking at http://www.ub3rgeek.net/gprs/

Modem Mode, UMA
Backups!
With hard drive capacity growing by leaps and bounds it is not uncommon for most people to have computers with several hundred Gigabytes worth of internal storage. While drives have gotten much more reliable the importance of good backups have only increased with more and more of our data being stored on our computers. Digital photos, movies, music, financial documents, e-mails, all live on our computers and could easily be deleted, or corrupted by user error, application faults, or a physical failure of a part in your computer.
Backups prevent:
- Data loss from computer error. (Operating System or Application Crash)
- Data loss from drive failure.
- Data loss from user error. (Accidental deletion, alteration, etc)
- Data loss from disaster. (House burns down, computer lost or stolen)
It is important to note that RAID systems ONLY address drive failures and should NOT be thought of as a backup solution.
My Goals:
I really like Time Machine. Apple did an AMAZING job with that application and bundled with the Time Capsule you get a really robust, high-capacity versioned backup solution that solves 90% of the problems that backups are supposed to solve. If you periodically copy your Time Machine backup to an external hard drive and store that at a friend’s house or in a safe deposit box or at the office, then you get 100% of the backup goals in a neat little package. You can even restore a Time Machine backup from the OS X restore CD. Slick.
Since I don’t run OS X I have to engineer a solution myself. I want a system that allows me to produce versioned backups on the network without much interaction. It must be encrypted on disk as my laptop’s /home is encrypted and storing the backup unencrypted would be a super-easy attack vector. Ideally the storage would be swappable so I can have 2 drives and swap it with an off-site drive periodically and so I could fairly easily restore the data to a new drive when the drive in my laptop (or the backup drive) scorches itself.
My Solution:
- USB 2.0 hard drive with dm-crypt whole-drive encryption
- rdiff-backup over ssh
- cron(8) and some custom scripts
I have an old IBM ThinkPad R42 laptop that I’m not using for anything anymore so I tossed Ubuntu 9.10 on it and plugged it into the network. (I would use my server but I do not have any USB 2.0 ports on that machine currently.) I connected a 250GB USB hard drive to the ThinkPad and encrypted a partition using dm-crypt to store the backups and meta-data.
I then setup ssh on the ThinkPad to trust my ssh key from my laptop and I setup sudo(8) to allow my user to run rdiff-backup without entering my password. Combined with my backup.sh script, i can fire off a backup in the background from cron(8) that doesn’t really affect the performance of my laptop over the network.
I am a big fan of jwz and this is how he does backups.
13 years with Linux
I first installed Linux from floppy disks back in 1996 on an old computer I had laying around. A friend of mine whom I knew through a local BBS had told me about this thing “Linux”, it was like Unix but for cheap Intel computers. I was amazed and after some tinkering I was also completely hooked. From that point I have always had at least one Linux machine running in my home. I got my mother to buy our first Internet connection with the promise that everyone in the house could use it, all thanks to Linux and this new thing called IP Masquerading.
That first Linux distribution was Slackware, a distribution by Patrick J. Volkerding which has always focused on simplicity, stability and having a sane collection of packages and defaults right out of the box. It is kind of like the OpenBSD of Linux if I was to try to make a really unnecessary analogy. Over the years my home server has always been Slackware, it was what I was the most comfortable with and it has never let me down. I even ran Slackware on my workstations up until a few years ago when World of Warcraft came around and I needed something a little more bleeding edge to get an X server with all the fancy direct rendering and 3d acceleration bits to make wine happy. I have trusted literally TeraBytes of data to Slackware and have not once been let down.
Over the last few days I have been struggling with a number of problems with my Sirius transcoder scripts. Between Sipie being unloved and requiring some work, and vlc being a royal pain sometimes I decided to upgrade my home server to Slackware 13.0. I have to start by saying i’m impressed with Slackware and the progress it has made over the years, a very small team (usually of one) has been able to make a stable, secure, reliable distribution for a very long time and the new version is no exception. And Slackware 13.0 is no exception to this rule, now bringing in amd64 support into the core distribution.
After a good 2 days of fighting the realization came that I just had to embrace, I have changed. The sad truth is that as with hardware I have come to expect software to Just Work(tm) and leave me out of it. I spend 60 hours a week wrestling with hardware and software in my job as a Systems Administrator for an ISP and I just don’t enjoy fighting it when I get home like I used to. My server acts as a media server for my PS3 so I can enjoy media content on my TV, a VOIP server for my home (I do not have a land line any longer) and hosts a number of status monitoring applications and stream recorders that I turn into podcasts for my private consumption. I need it all to just quietly work and cause me as little grief as possible.
So sadly it became time for me to go from loyal Slackware user for over a decade to full-on Ubuntu convert. We use Debian (and now Ubuntu) at work and I have been using Ubuntu in varying places since a friend of mine gave me a link in a chat pointing to what he promised was going to be a new Linux distribution that would change how people looked a Linux. It just made sense to convert, it meant I didn’t have to maintain 2 local mirrors anymore for security updates, I am much more comfortable with apt(8) and dpkg(8) and utilities like slapt-get(8) and swaret(8) are just kind of (very good) 3rd party hacks on top of the Slackware package management system.
It is amazing to see how far this dream has come, more and more I find myself quietly relying on various Free Software products to make my life simpler, easier and better and Slackware and Ubuntu have both been huge parts of that software stack. Thanks Pat, for 13 years of reliability, stability, security and sanity. Thanks also to Mark and Matt and the entire Ubuntu/Canonical gang for literally changing how thousands of people think of Linux. I converted my Mother a few weeks ago and have had less calls about the computer than I ever did with Windows.
BlackBerry SMS logger and site changes
Firstly let me apologize for the mess, right now I have moved the WordPress installation to a standalone domain for back-end architecture reasons. There are redirects in place for most things but some things may be broken. Accept my apologies in advance for the inconvenience.
Secondly I have removed my old Gallery instance. I’ve been using Gallery 1 for ages because I don’t see a good reason to upgrade to Gallery 2 which I consider HIGHLY inferior due to the reliance on a RDBMS. As a replacement I have redirected all /gallery/ URLs to my Flickr page.
Thirdly, as a result of moving to Bazaar from CVS, much of the code that has been linked in previous entries is now over at repo.ub3rgeek.net.
Finally, for anyone with a BlackBerry that would like to get the SMS messages off the device so they can save the memory without losing the messages, or just to be able to use Unix tools to manipulate the messages I have written a small Python script which can be used, alongside the Barry Project‘s btool program to extract the SMS messages to a set of files sorted by Phone Number of the person you are corresponding with.
You can get the script at http://repo.ub3rgeek.net/branches//top/bbtools/files. Feel free to let me know if you find it useful.
Revision Control Revision
I’ve been using CVS for revision control for quite some time for a number of different things here, not the least of which being a public repository of scripts and miscellany that I have tossed into the Internet for public consumption. Recently I have started to feel the desire to change to one of the newer version control systems out there. Git and Hg smell a lot of ‘ooh shiny’ syndrome and we use Subversion at work so I was sort of naturally drawn towards Bazaar. It doesn’t help that I’m a huge fan of Canonical and Ubuntu, and as that seems to be the VCS du jour over there these days I figured that this would give me a good excuse to learn it.
The moral of this story as I’m sure no one cares why I chose which VCS is to say that any of the code hosted on my CVSweb and linked to in one of my previous posts is likely to have moved to the new loggerhead interface over at repo.ub3rgeek.net. If you happen to follow me on FriendFeed or watch the home page here, you will see updates from my bazaar commits as they happen.
Fancy, eh?