Livebox (Inventel DV4210) Building A New Filesystem

First you need to get a copy of an existing filesystem. There are various versions around, generally the later ones should be more stable. You need to be aware that there are different versions released for UK, FRance and SPain. I do not know if they are universal, but earlier versions certainly had different adsld programs that were specific to the country as the VCI/VPI were hardcoded and UK uses 0/38 while FRance uses 8/35. Also, when locked to an ISP, the UK version would only allow certain styles of username to connect. You can get a copy of the filesystem from a running Livebox, or via JTAG or from the web. See here for the few versions that I have. These are all unmodified.

I have just used tcpsock on the Livebox along with netcat on a Linux PC to copy an image of the filesystem from the Livebox to a PC. I used wget to copy the binary tcpsock to the Livebox and renamed it to send with executable permissions. When the tcpsock binary is renamed to send, it defaults to sending data otherwise it receives data, so the command

cat /dev/mtd0 | ./send
will pipe the contents of /dev/mtd0 (RedBoot) to port 4001. Running
netcat livebox_ip_address 4001 >RedBoot
on the PC will result in the contents of the /dev/mtd0 partition of the Livebox being transferred to the PC into the file called RedBoot. This obviously requires command line access on the Livebox.

Assuming that you have an existing filesystem, you need to unpack it using either cramfs tools or squashfs tools. Obviously if you have a split filesystem you might need to make changes on both the user_fs and user_2_fs images.

You can now change the bits that you want,

If you are running from a SQUASHFS image, you must have already changed the RedBoot loader and now need to remove the check that is carried out on the user_2_fs partition. See SquashFS Check for details.

To remove the requirement to login, see Root Access for details.

To add a Telnet Server, see Telnet Server for details.

To add an SSH (Dropbear) Server, see Dropbear Server for details.

To inhibit autoupdate, see Update Inhibit for details.

To mount NFS Drives, see Mounting NFS Drives for details.

To mount USB Drives see Mounting USB Drives for details.

Once you have made all the modifications you want to the file system, you need to pack it using either cramfs tools or squashfs tools before flashing it back to the Livebox.

I have used the commands within RedBoot to copy the image to the Livebox and then flash over the existing Image,

Once the image has been flashed you need to reboot the Livebox while holding in button 1 until all the lights are lit. Then release the button. This will erase the current jffs partition and recreate it using the files from within the /etc_ro_fs directory of the new image.