The firmware is rather, well, limited. So I decided to run Debian on it. That can be done by flashing customized firmware. (Difficult, and you'll loose your warranty) or by chrooting Debian. I've build a package to chroot Debian on the box, from an USB stick or disk.
- You'll have to start Debian manually at each boot.
- You'll loose the 'remote usb' option. (Maybe not necessarily, but I don't have a Windows PC, so I couldn't test a way how to keep it. Can't use it anyway)
- Debian is *far* more powerful than the firmware
- If you don't like Debian, just reboot and you'll have your firmware back
Take an USB stick or disk of at least 512MB. Partition it in two partitions.
First partition FAT, 8MB is far enough
Second partition (at least 500MB) ext2/3.
Download the tarballs here
Extract fatpart-homebase.tar.gz to the fat partition, extract the other 2 tarballs (as root) to the ext2/3 partition.Enable the telnet daemon
on your Homebase.
Login, and execute
(The A1 part can be different). Your shell will be closed, and after about a minute you should be able to login over ssh, username root, password root. (Next time it won't take a minute, the first time the host keys have to be made.)
Alas I didn't find a way to automate this without flashing. You'll have to start StartDebian.sh manually at each boot.
When executing ps -A, you can see (among other processes) a 'sh' running, and a rc.chroot. If you kill these, you will *not* be able to shutdown or reboot properly.Rootfs
This is a 'normal' debootstrap Lenny rootfs, with a few adjustments:
- Added dropbear and udev
- Changed root password to 'root'
- Modified /etc/init.d/dropbear to generate host keys, if they don't exist
- Modified /etc/init.d/mountall.sh to not send a signal to PID 1 (will halt the box)
- Added /etc/init.d/rc.chroot. This script will 'init 2´ inside the chroot, and pass on shutdown or reboot commands to the firmware.
- Exchanged /sbin/reboot, /sbin/shutdown and /sbin/halt. These scripts send a signal to rc.chroot.
This script kills all firmware processes except init, getty, wpa-supplicant and dhcpcd. The last two processes could be killed to, but then you'll have to setup the network in Debian first. More on Homebase network here
It will mount the Debian rootfs, and chroot it, running /etc/init.d/rc.chroot
When /etc/init.d/rc.chroot exits in a controlled way, it will kill all Debian processes, unmount the Debian mounts, and shutdown or reboot the box.Logging
By default a logfile is generated on the FAT partition.
/Edit: June 16Errata
There are some bugs. /tmp doesn't have the right credentials. Solve it:
chmod a+w /tmp
chmod +s /tmp
/var/log/lastlog doesn't exist. Solve it:
When using wireless on my box dmesg (and some logfiles) are flooded with 'reset tx=0 rx=3' and 'bmiss'. I don't know what to do for dmesg, but the solution for the logfiles is: create a file in /etc/rsyslog.d/, with contents:
:msg, isequal, "reset tx=0 rx=3" ~
:msg, isequal, "bmiss" ~