Archive for April, 2008

Ubuntu LTS migration for the GUI challenged

Monday, April 28th, 2008

With the release of Ubuntu 8.10 (Hardy Heron) and its designation as the new LTS version, I decided to upgrade my one local server from Dapper to Hardy, with the small challenge of I didnt want to do it via a gui. This is partly because I did not have a X client on my laptop this morning, and partly because it will allow me to trial the upgrade of one of my Remote hosted systems.

Some issues specific to the Rhodes environment are noted at the end.

Get up to date:

aptitude update
aptitude upgrade
aptitude dist-upgrade

All fairly painless and out of the ordinary, bar the need to add the dapper-proposed repo to my /etc/apt/sources.list

Installing the requires base packages:

aptitude install update-manager-core

Before doing the upgrade I decided to set up the CDROM ISO as a local repository in order to save bandwidth whales etc.. (Having a system with real internet access, or a working apt-proxy may be a better solution). Once the Hardy DVD is available in a few weeks this may go a lot faster, as libraries such as QT and other components of main will be included in the larger image.

$ mount -t iso9660 -o loop ~bvi/ubuntu-8.04-server-i386.iso /cdrom
$ apt-cdrom add

This should show output similar tot he following as the CDROM is added tot he Repo list.

Using CD-ROM mount point /cdrom/
Unmounting CD-ROM
Waiting for disc...
Please insert a Disc in the drive and press enter
Mounting CD-ROM...
Identifying.. [b36baea778d37bbf48a3c8bd75b5cffb-2]
Scanning disc for index files..
Found 2 package indexes, 0 source indexes and 1 signatures
Found label ‘Ubuntu-Server 8.04 _Hardy Heron_ - Release i386 (20080423.2)’

And should add a to the top of your /etc/apt/sources.list similar to the following:

deb cdrom:[Ubuntu-Server 8.04 _Hardy Heron_ - Release i386 (20080423.2)]/ hardy main restricted

Finally the update can be performed

do-release-update -p

The -p parameter is due to the fact that the LTS as defined at http://changelogs.ubuntu.com/meta-release-lts is still showing dapper as the LTS, and should be able to be omitted in the future. with the -p, the meta-release-lts.proposed file is used instead.

the bulk of the base operating system was happily upgraded form CDROM repo in a matter of minutes, and the remaining pile of mostly universe and multiverse packages took around an hour to download

3 hours and a reboot later and the server is happily running Hardy.

All in all its about the same time for doing a ‘buildworld dance’ with FreeBSD, along with a massive level of portupgrade.

Post Reboot

In order to validate the upgrade, we can make use of the Linux Standard Base support for Debian
utilities ( aka lsb_release)

We have gone from:

$ uname -a
Linux spy.ict.ru.ac.za 2.6.15-51-686 #1 SMP PREEMPT Tue Feb 12 16:59:15 UTC 2008 i686 GNU/Linux
$ lsb_release -a (output trimmed)
Distributor ID: Ubuntu
Description: Ubuntu 6.06.2 LTS
Release: 6.06
Codename: dapper

To:

$ uname -a
Linux spy.ict.ru.ac.za 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 8.04
Release: 8.04
Codename: hardy

In reflection, far less pain than I expected certainly not enough to make me want to employ a depenguinator on this server yet.

Rhodes Specific notes:

  • Preferably use ubuntu.rucus.ru.ac.za as your repo unless you would like your quota flattened. Hopefully it will be up.
  • ftp://ftp.rucus.ru.ac.za/pub/linux/ubuntu/hardy has the ISO files
  • You will need appropriate proxy settings in order for the do-release-upgrade to be able to access the changelogs.ubuntu.com site.
Share this post: Share this post with the world.
  • TimesURL
  • Muti
  • Facebook
  • StumbleUpon

Hilbert Curve TNG - Unix port

Sunday, April 20th, 2008

The Hilbert Curve Rework project is progressing well with version 2.05 having been released, by Nick earlier this week. Ive now taken the opportunity to port the current Windows code across to unix and particularly FreeBSD. Around 10 lines worth of changes later the app built and ran on my FreeBSD 7.0 system. For once the mantra of the C/C++ work actually proved try - write once, run anywhere. I really wish Java was that simple.

A couple of issues still need to be addressed:

  • Rework the source to we can maintain a single source three for Windows and Unix targets- this is mostly slog rather than thinking work.
  • There is a bug in that some images are coming out a little wrong, but I think this may have to do with line termination issues the good old \r\n vs. \n issue again.
  • Write some decent docs!

With a bit of luck Nick should be returning to Grahamstown for a month or so thanks to some funding from the Center of Excellence in the department. Working on the Hilbert project will be one of his main priorities.

Share this post: Share this post with the world.
  • TimesURL
  • Muti
  • Facebook
  • StumbleUpon

Remote FreeBSD install - Depenguinator TNG

Saturday, April 19th, 2008

Daniel Gerzo, has recently published an article as part of the FreeBSD documentation project on how to install FreeBSD on a remote system, when one doesn’t have the luxury of a IP KVM or other remote console. Unfortunately most hosting providers seem to think Linux in its gazillions of flavors (really who would want to run Gentoo?) is the preferable option to windows.

The basic process is about creating a magic memory File System 9MFS) based mini FreeBSD install one can then ddover the base MBR on the system This gets you jsut enough of a Real OS to carry on with the rest of your install.

What this means for me is the possibility of doing some nice rmeote upgrade, or more acuratlye nuke and paves on some remorely hosted equipment. The big cath of course is your remote systems should have sufficient bandwidth (, or at least a local copy of the ISO or CD handy and mounted. Exploring other hosting providers may also now be feasible, now that I can run my favorite server OS without having to try persuade remotes upport to just put a BSD CD in and let me pay for a KVM access window :-)

Share this post: Share this post with the world.
  • TimesURL
  • Muti
  • Facebook
  • StumbleUpon

Internet Redlight districts

Tuesday, April 8th, 2008

Taking some data gathered form various filters I’m investigating for the local schools network,a nd combining with some custom scraping tools which Blake has been assisting with Ive drawn a map of the location of some 15 000 IP addresses representing the seedy side of the Internet.

Hilbert Plot of a pile of porn sites

The image is rendered using the Hilbert Curve Program developed in conjunction with Nick Pilkington, as a project for VizSec 2007 last year.

Share this post: Share this post with the world.
  • TimesURL
  • Muti
  • Facebook
  • StumbleUpon

Sorting IPv4 Addresses with GNU Sort

Tuesday, April 8th, 2008

While processing some rather large lists of addresses as part of a side project, I needed to be able to sort them in a numerical order within a shell script. I had a file with lines like:

  • 69.90.132.19
  • 69.90.132.22
  • 66.152.91.84
  • 208.122.204.181
  • 69.90.132.22
  • 69.90.132.31
  • 216.131.106.249
  • 216.131.84.26
  • 67.55.105.252
  • 208.64.44.102

Standard sort using sort –n only sorts on the first octet, and although it’s a improvement on alphabetic sorting its not ideal. The solution comes in specifying a pile of switches to sort:

sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4

This gets it sorted in Numerical order, by octet, using a period (dot) as a separator between octets. Combining this with a –u flag gives one a nicely sorted, unique list of IP addresses. This could probably be extended to IPv6 without too much hastle.

Share this post: Share this post with the world.
  • TimesURL
  • Muti
  • Facebook
  • StumbleUpon

Lair Back online

Monday, April 7th, 2008

After nearly two years offline, lair.moria.org is back. A couple of things have finally transpired. I have moved off the PII 400 with 128 MB of ram to some new hardware that should go belly up, and at the same time moved provider networks, which should improve reach ability and a number of other backend factors ( no more having to jump through proxies to make use of webservices).

Quite a bit of content has been preserved, and will be being loaded over the next few weeks, as and when the need for WAB, occurs while I’m writing.

Share this post: Share this post with the world.
  • TimesURL
  • Muti
  • Facebook
  • StumbleUpon