Archive for the ‘Debian/Ubuntu’ Category

Further Addendums

Thursday, July 2nd, 2009

Yet more on “Life is Good..“:  This same hardware can be gotten up and running on Ubuntu 9.04 by manually downloading the debs for the 2.6.30 kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.30/ . Things got a little hairy when I hit the nvidia drivers. The theory runs that DKMS should handle all those details automatically. For me, DKMS choked on the nvidia module. One reader on Launchpad suggested installing the drivers first, then the drivers. This didn’t quite work when I tried it. I had to install the new kernel (probably for the source and headers), then run the updated drivers that the reader referenced, then reinstall the kernel (so that DKMS would pick up the new module and use it). I’m sure there’s more rhyme and reason to it all than that, but this is what I had to do to get it running.

Setting up Bridged Networks (in Linux) For Dummies

Monday, January 26th, 2009

I set up VirtualBox to do virtualize some odds and ends testing I was doing (specifically, with the intent of freeing up a laptop to be reissued) and encountered the wonderful problem of trying to bridge the connections to the network at large. With VMWare Server, this is delightfully trivial. The bridged connections are already set up and all you have to do is pick it off the list when setting up the virtual adapter. VirtualBox works the same way, but you have to set up the adapters yourself. So, here are my notes on doing it.

At the system level, what you are doing is creating a bridge (which enslaves a hardware interface) and creating virtual adapters off of it. What you get is something like this:

On Debian (and, by extension, Ubuntu) you can create the devices by editing the /etc/network/interfaces file and adding the following sections:

  1. auto br0
  2. iface br0 inet dhcp
  3. bridge_ports all tap0 tap1
  4.  
  5. auto tap0
  6. iface tap0 inet manual
  7. up ifconfig eth0 0.0.0.0 up
  8. down ifconfig eth0 down
  9. tunctl_user <user>

The first section creates the bridge and enslates eth0 to it. The second section creates a TAP interface that is assigned to that bridged device.

Alternatively, you can manually run commands like the following to accomplish this task. If you go this route, you will want to take your commands, put them in a shell script, and rerun them at boot time so that your interfaces are recreated after booting up. The utilities are brctl (for the bridge) and tunctl (for the TUN interface). Given the sections above, it is actually pretty easy to know what sequence of commands to run, so I’ll leave that as an excercise for the reader (with the help of the man pages/help section).

There you have it. All you need to know to go crazy and create seven million bridged network devices. While my reason and example here is setting up VirtualBox, it is not the only use for it. Other uses include operating system virtualization, running multiple services on different IPs (i.e. bridging Apache to another address than the main system one), and other general tomfoolery.

Chicken Package–Updated

Thursday, April 5th, 2007

In my continued travels on the subject of Debian Packages, I came across a discussion of checkinstall. Basically, the high and low of it is that checkinstall is quick and easy–but the packages will not necessarily work all that well in a clean room environment. This combined with the fact that the paths in the previous package are not quite right, prompted me to build a new package “the right way”. It is now available.
Before I talk about the solution, I wanted to mention a couple of things that researching this problem brought into greater perspective for me.

That out of the way, here is what I did: First, I downloaded and extracted the source. Then I cd’d into the base source directory. Then I ran:

$ dh_make -n -e my-email@my-domain.dom

This command generates default build scripts for the Debian package (note: you will need to ensure that the package for dh_make is installed). The next step is to edit the control file. This will, by default, be created under debian/control. The main changes needed are to the description and to the dependencies. The documentation on the specifics can be found here. As it is relatively straight forward I will not go into detail on it here. Once you have finished with that, you would need to edit the various rules in the rules file. If, however, your software is fairly standard automake
then you probably don’t need to do anything. If, on the other hand, you were using NAnt, Ant, HMake, or some other custom build system you would have to modify the rules file to build properly. After all of this is squared away, simply run

$ fakeroot debian/rules binary

If the previous step was completed correctly, dh_make will spit a shiny new Debian package out
in the parent directory. A good old fashioned dpkg run and the package will install on your system.