Debian on the linksys wrt54gs

linksys

I installed OpenWRT on the linksys access point that I picked out especially so I could run linux on it (worth the extra $20). OpenWRT is a nice, small system, and it's already made the access point a lot nicer.

But I thought I'd go one step further and put Debian on it. Of course even the "s" model has only a little flash memory, not enough to store Debian. So I installed and set up nfs client stuff on the access point, and a server on my laptop.

root@fly:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 7296      4224      3072  58% /
dragon:/srv/nfs/fly    4806904   4207520    355200  92% /debian

Getting Debian debootstrapped was tricky, since debootstrap uses some POSIX shell things (like printf) that are not in OpenWRT, and also has a binary that it needs to run, which wouldn't, since OpenWRT uses uclibc. That also ruled out cdebootstrap, and in the end I tarred up a mipsel chroot from my cobalt raq and used that. Which works nicely:

root@fly:/debian# chroot . su - joey
joey@fly:~>uname -a
Linux fly 2.4.30 #1 Sat Apr 23 18:13:56 EDT 2005 mips GNU/Linux

I'm not sure where to go from here. Ideally I want to be able to run arbitrary programs from Debian on the box even when my laptop is not around to provide the NFS root. Whether to accomplish that with filesystem trickery, by getting rid of OpenWRT and using flashybrid, or just getting an environment on the Debian side that can build uclibc binaries, or what, I don't know.

In the short term, I should probably start by building a working .ipkg of cdebootstrap. Until then, if anyone wants a small Debian sarge mipsel tarball that can work on this box, I have one handy.