ubuntu

PHP4 for feisty - pbuilder for beginners

I helped Robbster out on #clug today, building php4 for feisty (it’s been dropped after edgy, in favour of php5). If you want to install it, don’t care about security holes, and want to use the debs I created, add this line to your apt sources list, and go wild:

deb http://ftp.leg.uct.ac.za/pub/stuff/tmp/php4-feisty ./

If on the other hand you want to know how to do it (so when the next PHP security hole appears tomorrow, you can build the latest version yourself), read on:

I’ve never used pbuilder before, so it was fun:

# aptitude install pbuilder

Edit /etc/pbuilderrc to point to your closest mirror, and uncomment the COMPONENTSline (so that you get universe included)

# pbuilder create

Now pbuilder is ready for work. Get the latest sources from debian (Download those 3 files at the end, dsc, orig.tar.gz and diff)

# pbuilder build *.dsc

Sit back and watch…

When it’s done, you probably want to create a trivial repository of your debs:

# cd /var/cache/pbuilder/result/; dpkg-scanpackages . /dev/null | gzip -c -9 > Packages.gz

Then add this to your sources.list

deb file:///var/cache/pbuilder/result/ ./

Wohoo. Remember to watch out for those security holes…

Sharing a 3G connection with Ubuntu

Seeing as I carry around a vast array of equipment, in my massive, 10Ton backpack, I normally have a 3G card at hand. If I’m visiting someone who doesn’t have broadband themselves, or I’m sitting in a Coffee Shop with other laptop-lugging friends I might want to share my 3G connection with friends, via WiFi. (assuming I have a data bundle that month, or they understand the horrific 3G data pricing)

I wrote a little script to make this easy

  • It’s clearly Atheros-specific, but I’ve included more generic commands in comments. Obviously interface names would need to be changed
  • I dial the 3G connection before I run this, and disconnect afterwards, but it would be trivial to change that…
  • My dnsmasq.conf contains only the line dhcp-range=10.42.42.10,10.42.42.254,12h
  • Dnsmasq is configured not to run on startup, via update-rc.d

/usr/local/sbin/3g-ap:

#!/bin/sh

/etc/dbus-1/event.d/25NetworkManager stop
# Atheros:
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap
# Other:
#iwconfig ath1 mode master

iwconfig ath0 chan 3
iwconfig ath0 essid SR
iwconfig ath0 enc s:13Char-Passwd

ifconfig ath0 up 10.42.42.1 netmask 255.255.255.0
/etc/init.d/dnsmasq start

iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o ppp0 -s 10.42.42.0/24 -j MASQUERADE
sysctl -w net/ipv4/ip_forward=1

echo "Done - when finished, hit enter"
read ignoreme

/etc/init.d/dnsmasq stop
iptables -t nat -F POSTROUTING
sysctl -w net/ipv4/ip_forward=0

# Atheros:    
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode sta
# Other:
#iwconfig ath0 mode managed

/etc/dbus-1/event.d/25NetworkManager start

Laptop battery woes

My Acer Ferrari 4005’s battery is on it’s way out. From around 3hrs when new, it’s down to 20 mins, at the lowest screen brightness.

I’m even getting error messages from gnome-power-manager, telling me it doesn’t even think my battery’s capacity is valid :-)

Gnome-Power-Manager message telling me my battery is not valid :-)

/me is getting tempted to replace it with a MacBook (but don’t tell it that)

Hardware sucks

I spent a morning trying to debug my LTSP server, which wasn’t booting after it’s feisty upgrade.

I assume it was something to do with RAID & LVM on the root initially, but after I got through that, it still wouldn’t boot.

Aah, but the recovery option worked

Ok, so maybe it’s something with usplash, restart and boot without quiet but with splash. Boots.

Eventually I found that it just needed a few extra seconds of spin-time in the grub screen (increase timeout to 10), and now it works.

Bloody hardware!

Wiki work on GPRS/3G

I’ve touched up the CLUG wiki GPRS/3G page today. It’s now a complete dump of my knowledge on the subject - a page I wish had existed when I started mucking with mobile data.

Now I’m just waiting for the 3G card that I bought on eBay to turn up, so I can get a slightly more usable connection than asthmatic GPRS when I’m on the run.

Syndicate content