Newbie instructions

How to run BMD from ubifs (i.e. run it from flash, with changes being stored back to flash, instead of lost on a reboot)

To keep things simple, I'll start off by using the pre-compiled files provided on this page then I'll add separate instructions on how to compile (and customise) from subversion-source later.

These instructions will only work if you're running Biffboot 3.0 on an 8MB-flash-bifferboard, and using ethernet flashing (i.e. bb_eth_upload8.py) - you can only use serial flashing if you have Biffboot 3.1 (which is still in beta at the time of writing). It's also essential you have a serial console cable so you can change Biffboot options. It can work with earlier biffboot versions, but it's a bit more fiddly! (ask on the mailing list if you need details)

Some of the commands need to be run on your desktop linux PC, and some on your bifferboard, so I'll prefix the steps below with PC or BB

    1. PC: Download the initrd-kernel and flash it to your bifferboard

      1. wget "https://sites.google.com/site/bifferboard/Home/bifferboard-mini-distribution/bzImage-initrd?attredirects=0&d=1" -O bzImage-initrd

      2. sudo python /path/to/bb_eth_upload8.py eth0 00:b3:f6:00:37:9c bzImage-initrd (you'll need to change the MAC address for the one on your bifferboard, and then plug in power to the bifferboard when the script tells you)

    2. BB: In the Biffboot serial-console 'setup' menu (accessed by pressing Esc just after power-on) type these commands:

      1. ubiformat

      2. rdroot

      3. save

      4. boot

    1. BB: Once the initrd-system has booted up, you should be able to mount the ubifs partition

      1. mount /ubifs

    1. BB: (optional) check that ubifs is working okay with these commands

      1. echo test > /ubifs/this-is-a-ubifs-file

      2. umount /ubifs

      3. reboot

      4. (wait for it to reboot)

      5. mount /ubifs

      6. ls /ubifs

      7. You should see the this-is-a-ubifs-file listed

    1. BB: Download and extract the rootfs to ubifs

      1. cd /ubifs

      2. wget "http://sites.google.com/site/bifferboard/Home/bifferboard-mini-distribution/bmd-root.tgz?attredirects=0&d=1" -O - | tar xzvf -

      3. (Note that the above URL isn't https, the busybox wget command in BMD doesn't support SSL)

    1. BB: Now that you have files in ubifs, you need to remember to unmount the partition properly using either the umount, reboot or poweroff commands. If you just 'yank the power' then you may have ubifs filesystem changes cached in ram, but not actually written to flash. So let's unmount it now (this may take a while)

      1. cd /

      2. umount /ubifs

    1. PC: Download the ubifs-kernel and flash it to your bifferboard

      1. wget "https://sites.google.com/site/bifferboard/Home/bifferboard-mini-distribution/bzImage-ubifs?attredirects=0&d=1" -O bzImage-ubifs

      2. sudo python /path/to/bb_eth_upload8.py eth0 00:b3:f6:00:37:9c bzImage-ubifs (you'll need to change the MAC address for the one on your bifferboard, and then plug in power to the bifferboard when the script tells you)

    1. BB: Access the Biffboot serial-console 'setup' menu again and type:

      1. mtdroot

      2. save

      3. boot

    1. Let the system boot up, and then when you 'ls /' you should see the this-is-a-ubifs-file file from step 4.

    2. That's it! You can now add extra files, install packages with opkg (now you're running from ubifs, you don't need the -force_space option), edit config files etc. and they'll still be there after a reboot. Remember (from step 6.) that you need to do a controlled shutdown with either reboot, shutdown or poweroff when running from ubifs.