Booting TonidoPlug 2 from an External USB Disk with an Internal SATA Disk Installed

By default, a TonidoPlug 2 will always attempt to boot from an internal SATA drive if one is present. To alter this behavior, changes must be made to the U-boot environment variables. This tutorial will show you how.

This will most likely void your warranty!
Bad U-boot environment variables can BRICK your plug!

This tutorial requires you to connect to a TonidoPlug via the Serial Console and SSH.
Please be thoroughly familiar with these techniques before you begin.

To boot from an External USB drive with an internal SATA drive installed, you must set the boot partition to sdb1 and remove the SATA drive from the boot sequence. When a SATA drive is present it is always /dev/sda and the USB drives start with /dev/sdb.

  1. Connect to your plug using the serial console. A how-to on serial consoling can be found on threads in the support forums.
  2. Interrupt the Marvell U-boot loader by pressing CTRL-C after you see “NAND:”
  3. At the console shell prompt (Marvell»), set the USB boot root partition to sdb1.
    » setenv bootargs_usb ‘root=/dev/sdb1 rw rootdelay=10
  4. Remove the SATA drive from the boot sequence.
    » setenv bootcmd ‘run bootcmd_usb; run bootcmd_nand
  5. Set the default root partition to sdb1.
    » setenv root '/dev/sdb1 rw rootdelay=10
  6. Save the environment variables to flash.
    » saveenv
  7. Disconnect the serial cable.
  8. SSH into the TP2 and enter reboot at the shell prompt.
    # reboot

As long as a SATA drive is present, the first USB drive will be /dev/sdb

To restore your TP2 to it’s original settings:

  1. Connect via serial console and interrupt the boot.
  2. Enter the following setenv lines at the Marvell shell:
    » setenv bootargs_usb ‘root=/dev/sda1 rw rootdelay=10’
    » setenv bootcmd ‘run bootcmd_usb; run bootcmd_sata; run bootcmd_nand’
    » setenv root '/dev/sda1 rw rootdelay=10’
  3. Save the changes to flash.
    » saveenv
  4. Disconnect the serial cable and reboot from the SSH shell.

help at the serial console will list the available commands.
printenv at the serial console will output all the environment variables.

It’s a good idea to enable logging on your console client or copy and paste default environment variables into a text file before you start as a reference in case you need to undo a change later.


Source: http://www.tonido.com/forum/viewtopic.php?f=37&t=4178