How to set up a chrooted Debian Environment on Fritz!Box Fon WLAN 7390

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.

Let’s start:

  1. On the Debian based system, mount the USB flash drive and create a new directory ‘lenny’ on it.
  2. Execute the following command (after correcting the path to your lenny folder):
    debootstrap –foreign –arch=mips lenny /mnt/usb/lenny
  3. After debootstrap completed, connect the USB flash drive to the Fritz!Box.
  4. Log in to the Fritz!Box via Telnet. When prompted for a password, use the one you set for the web interface.
  5. Change directory to /var/media/ftp/. Your USB flash drive should be mounted automatically as USB2-0-FlashDisk-00.
  6. 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.
  7. Mount proc: mount -t proc proc /var/media/ftp/USB2-0-FlashDisk-00/lenny/proc
  8. Let debootstrap complete the installation: ./busybox_1.16.1_7390_static chroot /var/media/ftp/USB2-0-FlashDisk-00/lenny /debootstrap/debootstrap –second-stage
  9. 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

Thanks to the users at and!

Leave a Reply

Your email address will not be published. Required fields are marked *