Loading Your Root Filesystem

Normally it's easiest to use bbl to load the root filesystem from a .tar.gz image. However, sometimes it's useful to do the process manually, either because bbl isn't available or isn't configured correctly, or in order to debug things.

The instructions below assume that you have a file debianrootfs.tar.gz which you would like to load into the Balloon board, and that you have a serial console and USB networking set up.


First, get a serial connection to your Balloon board's console working. Switch on the board, and press space to get to the bootldr prompt. Boot into the boot/recovery kernel:

set bootscript=exit
boot flash

Log in as root (no password). Mount the root filesystem:

mount -t yaffs2 /dev/mtdblock1 /mnt/root

Now connect the USB cable from your Balloon to host PC. Bring up USB networking on the Balloon:

ifdown usb0
ifup usb0

The following instructions assume that your Balloon has IP address and the host PC has address as described in USBNetworking. The host PC might need ipmasq running to enable network traffic to and from the Balloon. This depends on your local setup.

On the Balloon board, change to the right directory and delete any existing filesystem contents:

cd /mnt/root
rm -rf *

Deleting the existing filesystem may take 5-10 minutes. Now start netcat waiting for data and feeding into tar:

netcat -l -p 7000 | tar -x

Now, on the host PC, go into the directory where your filesystem image lives and start zcat unzipping the tarfile via a progress bar generator (pv) so we can see what's happening, then into netcat to send it to the Balloon.. Note that if you don't have pv, you can either install it (sudo apt-get install pv) or just remove that part of the command below.

zcat debianrootfs.tar.gz | pv | nc -w 15 7000

The process takes some time, so make some tea. On a Balloon 3 board here with a Debian root filesystem, it took about 12 minutes to transfer 152MB of data.

Balloonboard: LoadingYourRootFS (last edited 2012-08-23 16:15:56 by ChrisJones)