Category Archives: Debian

Upgrading Debian Squeeze to Wheezy on an ALIX2.

0
Filed under Debian, Linux

The last machine on my home network still running Debian Squeeze was my PC Engines ALIX2 based router. The ALIX2 doesn’t have any video output though it does send all bios output to the serial port. I also configured grub, the kernel and getty to all use the serial console for input/output by following the instructions in the Remote Serial Console HOWTO. While I did make sure I had a USB-to-serial adapter handy, I didn’t require it and managed to complete the upgrade via SSH.

I followed the Debian Wheezy upgrade instructions without incident. The only tricky item was the kernel:

Debian’s 686 kernel configuration has been replaced by the 686-pae configuration, which uses PAE (“Physical Address Extension”). If your computer is currently running the 686 configuration but does not have PAE, you will need to switch to the 486 configuration instead.

You can check for PAE support by checking /proc/cpuinfo. The Debian instructions provide a simple grep command you can copy and paste to look for the correct flag. The ALIX2 doesn’t support PAE so I removed the installed kernel and replaced it with kernel-image-486 as instructed. The grub config was automatically updated though I did double check. You can run update-grub to update grub if required.

After a reboot the system came up with the new kernel running Debian Wheezy. Debian Wheezy is still a couple of days away from official release however I have been running it for weeks on a laptop, a kvm host and a bunch of virtual machines without any issues.

Nginx

0
Filed under Debian, Linux

Recently replaced lighttpd with nginx on Debian squeeze. Used spawn-fcgi to manage PHP as php-fpm is not in squeeze yet. Had a little trouble with reliability until I set a couple of environment variables before spawning the PHP processes. Since using the script below to start php all has been well.

#!/bin/bash
PHP_FCGI_CHILDREN=2 \
PHP_FCGI_MAX_REQUESTS=1000 \
/usr/bin/spawn-fcgi -s /tmp/cgi-php.socket -u www-data -g www-data \
                    -P /var/run/cgi-php.pid \
                    -- /usr/bin/php5-cgi

Next I would like to look at setting up varnish in front of nginx.

Easy Debian/Ubuntu chroots.

0
Filed under Arch, Debian, Linux

Until recently I had been using Adobe’s 64 bit Flash Player plugin. Unfortunately the 64 bit Flash Player has been removed from Adobe’s site with no clear indication of exactly when it will return. For a while I continued to use the last released version however this version contains major security vulnerabilities and I eventually removed it. I don’t use Flash that much but I did miss it every now and then so decided to do something about it. I’m not a fan of multi-lib setups or nspluginwrapper so went with a 32 bit chroot. At first I tried an Arch Linux 32 bit chroot however I experienced issues with some GUI applications not working correctly and segfaulting. While I look into this I installed a Ubuntu Lucid 32 bit chroot using debootstrap.

Debootstrap is a handy way to install a Debian/Ubuntu base system into a directory. It is available in the AUR. Installing a base Lucid 32 bit system is as easy as:

[mike@mercury|~] $ sudo mkdir /opt/lucid32
[mike@mercury|~] $ sudo debootstrap --arch=i386 lucid /opt/lucid32/

To manage entering the chroot I installed schroot. Schroot allows a normal user to enter a chroot. It also handles copying files from the host into the chroot as well as mounting any required filesystems inside the chroot. This comes in handy for keeping /etc/{resolv.conf,hosts,passwd,shadow} and so on in sync as well as mounting /{proc,dev,tmp} inside the chroot. I also mount my /usr/share/fonts directory this way so Chromium has access to my fonts. I still need to do something similar with ny mouse cursor icons. Once configured schroot allows me to launch my 32 bit web browser via:

[mike@mercury|~] $ schroot -c lucid32 -- chromium http://www.archlinux.org

I now have flash working again.

New Router, dnsmasq and Jeff Golblum!

0
Filed under Debian, Linux

I’m currently running a combined router and file server. In the interests of security I’m in the process of setting up a new router. I’m installing Debian Lenny on the router as it doesn’t get rebooted often (in the past it has gone over a year without being rebooted) and a rolling release distribution such as Arch doesn’t suit this usage pattern.

I normally use dhcpd and bind for serving up dhcp and dns but this time tried dnsmasq. Dnsmasq is described on it’s webpage as:

Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server. It is designed to provide DNS and, optionally, DHCP, to a small network. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file. Dnsmasq supports static and dynamic DHCP leases and BOOTP/TFTP/PXE for network booting of diskless machines.

Setup is dead easy. Add your local machines to /etc/hosts and check that you have a dns server listed in your /etc/resolv.conf file. I used OpenDNS’s servers for this. Once this is done you will be able to resolve global names and local names. Much easier than mucking around with bind zone files. I wish I had tried it earlier.

Earlier this week one of Australia’s adopted, he is actually from New Zealand, prize idiots Richard Wilkins reported the untimely death of Jeff Goldblum. Stephen Colbert’s response is fitting and quite funny.