Setting up a chrooted Debian Environment on the Fritz!Box 7390 allows you to run almost any software on your Fritz!Box (at least, if it’s compatible with the box’ MIPS CPU). These instructions shouldn’t harm your Fritz!Box if you follow them carefully – however, there’s no warranty, you do it on your own risk.
To get started, you need the following:
- A Debian based system with debootstrap installed (aptitude install debootstrap)
- Telnet must be activated on the Fritz!Box (with latest firmware, just call #96*7*)
- An USB flash drive with at least 512 MB free space, formatted as ext2/3
Note: We will set up Debian Lenny, as Debian Squeeze seems not to be compatible with the kernel employed by the Fritz!Box. You will get errors like “Cannot utime: Unknown error” using dpkg or tar with Squeeze. Read here (German) and here for more information.
The entire setup takes about one hour.
- On the Debian based system, mount the USB flash drive and create a new directory ‘lenny’ on it.
- Execute the following command (after correcting the path to your lenny folder):
debootstrap –foreign –arch=mips lenny /mnt/usb/lenny ftp://ftp.de.debian.org/debian/
- After debootstrap completed, connect the USB flash drive to the Fritz!Box.
- Log in to the Fritz!Box via Telnet. When prompted for a password, use the one you set for the web interface.
- Change directory to /var/media/ftp/. Your USB flash drive should be mounted automatically as USB2-0-FlashDisk-00.
- Get a Busybox version that features chroot, such as the busybox_1.16.1_7390_static.bz2 from here and extract it into the current folder.
- Mount proc: mount -t proc proc /var/media/ftp/USB2-0-FlashDisk-00/lenny/proc
- Let debootstrap complete the installation: ./busybox_1.16.1_7390_static chroot /var/media/ftp/USB2-0-FlashDisk-00/lenny /debootstrap/debootstrap –second-stage
- The installation is completed now. You can use the following script to chroot into your freshly installed Debian environment:
cd /var/media/ftp export DISTDIR=USB2-0-FlashDisk-00/lenny umount $DISTDIR/proc mount -t proc proc $DISTDIR/proc rm -f $DISTDIR/etc/fstab touch $DISTDIR/etc/fstab cp -f /etc/resolv.conf $DISTDIR/etc hostname > $DISTDIR/etc/hostname cp -f /etc/hosts $DISTDIR/etc ./busybox_1.16.1_7390_static chroot $DISTDIR /bin/bash