Friday, March 06, 2009

Ubuntu and offline software installation

I often find myself working with systems that are not connected to the internet. Many of these systems are running Ubuntu and I find myself wishing I had installed a particular package after the disconnect has occurred. Since network access is not an option, I was looking for an easy approach to identifying all dependencies for a particular package, downloading them and burning them to a CD for offline installation. It turns out that this is not as easy as one might like.

The first problem is package dependencies can be recursive. If A requires B and B requires C, then a recursive dependency search is required. Software installation apps such as apt-get and aptitude are adept at resolving these dependencies, but it is not helpful to me since the target system is offline. I took a look at and indeed, the package descriptions do offer dependency identification based upon distribution version as well as architecture.

I went about developing a script that, given a package name, an architecture, and a distribution version (i.e. hardy), gets a list of all first-order dependencies. From there, it pulls in the dependencies recursively until a complete list has been developed. Given this list of dependencies, I can extract a download URL for the package of interest as well as all dependencies.

Unfortunately, there is a significant problem with this approach. First, most packages have dependencies such as libc and glibc that are common to even a minimal Ubuntu install. In some cases, these common default packages can inflate the dependency list substantially. Since my offline system already has these packages, I would like to avoid tracking them if possible.

To avoid this problem, I modified the script to only list package dependencies from the "Universe" repository. Since it is easy to acquire a DVD containing most packages from the "Main" repository, this should allow the script to only identify packages that would not likely be in a base install without burning the entire Universe repo to media.

In any case, the script is located here:

It is a work in progress, but serves its purpose for me at the moment :)

Update: After a few use cases, I have decided to remove the Universe-only dependency resolution. It does not identify packages from Main that are not in the default install media, which are required for offline installs.

New version here:

Monday, October 20, 2008

SSH on Inspiron 910

Just received my Dell mini running Ubuntu Linux 8.04 about a week ago. Everything has been working great except for SSH over wireless. I found a description of the problem, as well as a fix here:

Essentially, this command fixes the problem:

sudo iwpriv eth1 set_vlanmode 0

Apparently, a patch has been checked into the kernel upstream :)

Thursday, October 02, 2008

More on the HVR-950

Starting with Ubuntu Intrepid Ibex, support for the Hauppauge HVR-950 is included directly in the Linux kernel. This means that the lengthy procedure spelled out in my previous post are no longer needed to enjoy HD OTA television on your desktop. Unfortunately, the firmware is not included, so you must follow these instructions to download it, extract it, and move it to the correct directory:

Much thanks to this post for steering me in the right direction:

With this fix, I can now use the tuner on my backend MythTV setup!

Sunday, September 14, 2008

McCain's Tax "Decrease" compared to Obama's

One of them looks more like millionaire charity to me. Can you tell which one? Thanks to the Washington Post for putting together this graphic :)

Monday, August 18, 2008

Don't forget the fudge!

To set up a local NTP server, these two lines are very important:

fudge stratum 8 refid NIST

Friday, August 15, 2008

US Airways Sucks

After spending 1 hour on the plane waiting to take off because there were thunderstorms in the area 4 hours prior, I thought my red-eye flight home couldn't be worse. However, with 15 minutes remaining before boarding the flight home, I heard an announcement that the "first officer" was still waiting to board his flight from PHOENIX to LAS VEGAS, so we would be waiting for at least an hour. Apparently the flight from the adjacent gate had most of its crew aboard that flight as well, so they were also delayed an hour. Thanks US Airways for wasting 400 man hours of time!