Should anyone ask, I updated mythtv to run on Ubuntu on amd64.

I decided to switch my somewhat flaky multimedia MythTV box to Ubuntu.  Since it’s in the living room I run a diskless (and therefore completely silent) AMD64 based system that connects to my backend server via it’s own VLAN on gigabit ethernet (with jumbo-frames).  The problem is that there was very little documentation about setting up Ubuntu in a diskless fashion and even less about doing it for a “foreign” architecture.  I needed an Amd64 environment, and the other PCs that I had access to were Intel 64bit or AMD32.

So I headed over to Robin’s network where he runs an AMD64 based media PC (also on Ubuntu, although needn’t be).

Should I ever have to repeat this setup, these are the commands I executed:
To grab the initial set of packages and unpack them:

debootstrap –resolve-deps –arch amd64 –include=ssh,apt,postfix,cron –verbose edgy /tmp/mythbuntu-from-slomnet http://archive.ubuntu.com/ubuntu
mount –bind /sys /tmp/mythbuntu-from-slomnet/sys
mount –bind /proc /tmp/mythbuntu-from-slomnet/proc
chroot /tmp/mythbuntu-from-slomnet /bin/bash
vim /etc/fstab# /etc/fstab: static file system information.
#
#

proc /proc proc defaults 0 0
10.7.12.1:/var/lib/diskless/mythtv / nfs rw,async,hard,lock,nfsvers=3,tcp,rsize=32768,wsize=32768 0 0
10.7.12.1:/home /home nfs rw,async,hard,lock,nfsvers=3,tcp,rsize=32768,wsize=32768 0 0
10.7.12.1:/home/simon/Music /home/mythtv/music nfs ro,async,hard,lock,nfsvers=3,tcp,rsize=32768,wsize=32768 0 0
10.7.12.1:/mnt/vault/video /mnt/vault/video nfs rw,async,hard,lock,nfsvers=3,tcp,rsize=32768,wsize=32768 0 0
/dev/loop/0 none swap sw 0 0
/dev/hda /media/cdrom udf,iso9660 ro,user,noauto 0 0
vim /etc/network/interfaces

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp
#up ethtool -s eth0 speed 100 duplex full autoneg off

auto eth0
iface eth0 inet static
address 10.7.12.6
netmask 255.255.255.0
network 10.7.11.12.0
broadcast 10.7.12.255
gateway 10.7.12.1
mtu 9000
vim /etc/initramfs-tools/initramfs.conf

BOOT=nfs
vim /etc/initramfs-tools/modules

forcedeth
af_packet
nfs
lockd
forcedeth
af_packet
nfs
lockd

update-initramfs -u -c
apt-get clean # we don’t want to have to xfer all the left over .deb packages

exit chroot
umount /tmp/mythbuntu-from-slomnet/proc # because we are tidy
umount /tmp/mythbuntu-from-slomnet/sys # and don’t throw rocks
tar cvfjl /tmp/mythbuntu-from-slomnet.tar.bz /tmp/mythbuntu-from-slomnet

rsync -e ssh … to imagilan

my menu.lst for netbooting looked like this (not the small r and wsize - this seems to be a bug in the early life of a forecedeth module loading.  Later on I ramp up the packet size and things really fly)
default MythBuntu
timeout 10
prompt 2

label MythBuntu
kernel /linux/mythbuntu/vmlinuz-2.6.17-10-386
append initrd=/linux/mythbuntu/initrd.img-2.6.17-10-386 ip=dhcp root=/dev/nfs nfsroot=10.7.11.1:/var/lib/diskless/mythtv nfsopts=nolock,tcp,wsize=2048,rsize=2048,rw acpi=force rw

reboot and “Bob’s your uncle”

Should anyone ask, I prefer my neighbours to see up-side down images.

It’s the silly season here and I noticed I had a couple more people using my wireless access points to check their email and surf the web. Since all traffic goes through a transparent proxy on my network I decided to have a little fun with the redirect_program directive in my squid.conf configuration file. I set it to:

redirect_program /home/simon/bin/redirect.pl

and then added the following to redirect.pl:


#!/usr/bin/perl
$|=1;
$count = 0;
$pid = $$;
while () {
chomp $_;
if ($_ =~ /(.*.jpg)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/web/www.imaginator.com/squid/$pid-$count.jpg", "$url");
system("/usr/bin/mogrify", "-flip","/var/web/www.imaginator.com/squid/$pid-$count.jpg");
system("/bin/chmod", "a+r","/var/web/www.imaginator.com/squid/$pid-$count.jpg");
print "http://www.imaginator.com/squid/$pid-$count.jpgn";
}
elsif ($_ =~ /(.*.gif)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/web/www.imaginator.com/squid/$pid-$count.gif", "$url");
system("/usr/bin/mogrify", "-flip","/var/web/www.imaginator.com/squid/$pid-$count.gif");
system("/bin/chmod", "a+r", "/var/web/www.imaginator.com/squid/$pid-$count.gif");
print "http://www.imaginator.com/squid/$pid-$count.gifn";
}
elsif ($_ =~ /(.*.png)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/web/www.imaginator.com/squid/$pid-$count.png", "$url");
system("/usr/bin/mogrify", "-flip","/var/web/www.imaginator.com/squid/$pid-$count.png");
system("/bin/chmod", "a+r", "/var/web/www.imaginator.com/squid/$pid-$count.png");
print "http://www.imaginator.com/squid/$pid-$count.pngn";
}
else {
print "$_n";;
}
$count++;
}




Resulting in:



and an evil laugh.

Should anyone ask, I prefer my neighbours to see up-side down images.

It’s the silly season here and I noticed I had a couple more people using my wireless access points to check their email and surf the web. Since all traffic goes through a transparent proxy on my network I decided to have a little fun with the redirect_program directive in my squid.conf configuration file. I set it to:

redirect_program /home/simon/bin/redirect.pl

and then added the following to redirect.pl:


#!/usr/bin/perl
$|=1;
$count = 0;
$pid = $$;
while () {
chomp $_;
if ($_ =~ /(.*.jpg)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/web/www.imaginator.com/squid/$pid-$count.jpg", "$url");
system("/usr/bin/mogrify", "-flip","/var/web/www.imaginator.com/squid/$pid-$count.jpg");
system("/bin/chmod", "a+r","/var/web/www.imaginator.com/squid/$pid-$count.jpg");
print "http://www.imaginator.com/squid/$pid-$count.jpgn";
}
elsif ($_ =~ /(.*.gif)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/web/www.imaginator.com/squid/$pid-$count.gif", "$url");
system("/usr/bin/mogrify", "-flip","/var/web/www.imaginator.com/squid/$pid-$count.gif");
system("/bin/chmod", "a+r", "/var/web/www.imaginator.com/squid/$pid-$count.gif");
print "http://www.imaginator.com/squid/$pid-$count.gifn";
}
elsif ($_ =~ /(.*.png)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/web/www.imaginator.com/squid/$pid-$count.png", "$url");
system("/usr/bin/mogrify", "-flip","/var/web/www.imaginator.com/squid/$pid-$count.png");
system("/bin/chmod", "a+r", "/var/web/www.imaginator.com/squid/$pid-$count.png");
print "http://www.imaginator.com/squid/$pid-$count.pngn";
}
else {
print "$_n";;
}
$count++;
}




Resulting in:




and an evil laugh.

Should anyone ask, the US patent system is completely broken.

A patent is supposed to be granted when, “the solution to a problem is not obvious to a person skilled in the art and the invention involves an inventive step.” Here’s an example of just how broken the system is. Surely 6 Billion “prior-arts” can’t be wrong:

Apparatus for moistening adhesive coatings on postage material and the like which includes an enclosure having a container of liquid therein. A plunger is provided to lift an absorbant applicator from the liquid and pass the applicator through an opening in the side of the enclosure. A closure member for the opening is opened in response to the applicator movement. The applicator may be in the form of a human tongue and the closure may be in the form of a human lip.

Read the full patent on the USPTO website.

Should anyone ask, I have been reading the international dialing codes

The process of dialing a number and a telephone ringing on the other side of the world is very intersting.  To me at least.  It gets even more interesting when you think about how things like how to bill the call. The whole process is called ENUM.

I learnt some interesting things about the international country codes:

  • Antartica has no country code instead you have to dial the country code of the particular base you wish to speak with

  • The Vatican City has it’s own country code, but instead uses Rome dialing codes

  • country codes  90 to 99 used to be used for intercontinental traffic before 1960


I started reading about this because I followed a link from the E.164 page.  I like e.164 because it maps my telephone number to an ip address that can be looked up in dns.    So if you call me on my VOIP number from your VOIP provider the call is mapped to an ip addresses and never touches the PSTN.

Should anyone ask, I now have LDAP authentication working in Apache 2

It was not nice.

AuthType Basic
AuthName "Imaginator username and password"
AuthBasicProvider ldap
AuthzLDAPAuthoritative On
AuthLDAPURL ldaps://ldap.imaginator.com/dc=imaginator,dc=com?uid?sub
AuthLDAPBindDN "cn=nss,ou=auth,dc=imaginator,dc=com"
AuthLDAPBindPassword "**********"
AuthLDAPGroupAttribute memberUid
require ldap-group cn=buddycloud-corp,ou=groups,dc=imaginator,dc=com



So it sort of works. But what I would really like is for a way to authenticate on POSIX groups which have a memberUid which is something like:

memberUID: simon

Update:

AuthLDAPGroupAttributeIsDN off is the magic bit! This forces a filter on the uid rather than the full DN. LDAP as always Rocks!
rather than doing a

memberUid: cn=Simon Tennant,ou=People,dc=imaginator,dc=com

Sigh.

Should anyone ask, I am now running Apache 2

…and it was a relatively easy upgrade. I had an old and crufty Apache 1.3 that has now been migrated to a nice 2.0 configuration. Multiple SSL virtual hosts is a nice addition (although until OpenSSL is changed to include some sort of host sending outside of the ssl tunnel there will still be the problem of SSL certs not matching.



Please let me know if you find something not working correctly.

Should anyone ask, I have been listening to "Heart Transplant"

The story of the world’s first heart transplant operation, carried out in Cape Town in 1967 by a team led by Professor Christiaan Barnard. Both parts here (Real Audio)




Part 1



Part 2

In case anyone asks, my new telco is PowerClean and linksys

When I was out in the center of town today and made 2 international phone calls through wifi access points named PowerClean and linksys. I would have perhaps paid ePlus €10 for the 2 calls, but instead I paid 0¢ when calling via my own Asterisk server and out to the PSTN via Voip Discount. Eplus needn’t worry, I’ll keep paying my rip off subscription to them a little longer. All this is possible using the Nokia E61 which I can highly recommend as a phone.

DD-WRT Rocks

I upgraded one of my Linksys WRT54G Routers with the DD-WRT software. It’s been running a couple of days now and is really great. It replaces a mediocre interface with a clean functional and usable interface. So far the router has also been reliable and extensively used for voip calls and general wireless connectivity.

The DD-WRT puts a slimmed down linux onto the Linksys access point. It even comes with a netflow export feature which is very cool.

Here’s a picture of the interface in action:

:

DD-WRT Rocks

I upgraded one of my Linksys WRT54G Routers with the DD-WRT software. It’s been running a couple of days now and is really great. It replaces a mediocre interface with a clean functional and usable interface. So far the router has also been reliable and extensively used for voip calls and general wireless connectivity.

The DD-WRT puts a slimmed down linux onto the Linksys access point. It even comes with a netflow export feature which is very cool.

Here’s a picture of the interface in action:


:

What I'm listening to

If I should die, let it be known that I read the following blogs:













































































…and listened to the following podcasts:

















































Website

 
Subscribe URL



 



 



 



 



 



 



 



 



 



 



 



 



 



 



 


Just in case.

simple maths

Looks like Verizon wireless has problems with maths.



 Audio file here



He has a blog too.



No wonder people are scared to use GPRS or 3G data services.

Ruby on Rails is Cool!

2 good reasons to use it:

  1. you can build a blogging ‘site in 15 minutes

  2. you have a crazy rails developer showing how to build a site in 15 minutes: .mov here


Almost as good as the Iron Chef.

S.

search

Powered by Blogger.

Follow by Email

Should anyone ask, on building strong teams

My thinking about building strong teams My work goal is: work with smart people, on interesting problems, that improve our lives. So I start...