Difference between revisions of "USB Boot"

From WikiDLXTV
Jump to: navigation, search
(Initial content)
 
m
Line 7: Line 7:
 
Disk-based firmwares can be stored in two ways:
 
Disk-based firmwares can be stored in two ways:
  
1) In a single file formatted as a readable filesystem (either Ext3 or cramfs).  The benefit of Ext3 is that it will give you a fully writable filesystem, allowing you to modify the firmware as needed.  The firmware is stored into a file called "root.bin".
+
1) In a single file formatted as a readable filesystem (either Ext3 or cramfs).  The benefit of Ext3 is that it will give you a fully writable filesystem, allowing you to modify the firmware as needed.  The firmware is stored into a file named "root.bin".
  
2) In a flat filesystem.  Your USB disk *must* be formatted using the Ext3 filesystem for this to work.  The filesystem is located in a folder called .rootFS, at the root of your USB disk.
+
2) In a flat filesystem.  Your USB disk *must* be formatted using the Ext3 filesystem for this to work.  The filesystem is located in a folder named ".rootFS", at the root of your USB disk.
  
 
== The normal boot process ==
 
== The normal boot process ==

Revision as of 19:47, 17 March 2011

Introduction

By default, the firmware is stored into non-volatile flash memory on your device (also called NAND). However, WDLXTV will also allow you to boot another firmware that is stored on a USB disk. This allows you to try newer versions, or have a writable version of the firmware which you can modify.

Firmware storage

Disk-based firmwares can be stored in two ways:

1) In a single file formatted as a readable filesystem (either Ext3 or cramfs). The benefit of Ext3 is that it will give you a fully writable filesystem, allowing you to modify the firmware as needed. The firmware is stored into a file named "root.bin".

2) In a flat filesystem. Your USB disk *must* be formatted using the Ext3 filesystem for this to work. The filesystem is located in a folder named ".rootFS", at the root of your USB disk.

The normal boot process

When powered on, the WDTV will boot from the firmware stored into its NAND storage. The firmware will then check if either a valid root.bin or .rootFS can be found on the disk mounted as /dev/sda (meaning your USB disk must be the first one detected and configured by your WDTV. More later on how to work around this). If one is found, then it will transfer control to that firmware copy, and proceed with the second stage of the boot process.

Selecting a different boot device

If you have multiple USB disks plugged on your WDTV, there is a chance that the one containing your root.bin or rootFS might be detected too late, and end up being designed as /dev/sdb. Starting with 0.4.5.3, you can now specify which device to boot from, by using the UUID_TAG config keyword. Starting with 0.4.7.0, you can directly select the device through WEC, which will be even simpler.

To manually do so using config_tool, you need first to determine what is the UUID of the disk containing your firmware. In Linux, the UUID is kinda like a unique volume serial number Through telnet/SSH this can be achieved by running the command:

blkid

Locate your disk/partition amongst the listed entries, and note the UUID associated to it. For example, an ext3 UUID might look like 13144a57-30f6-48c6-abcb-c2c6c05501c9. Then, set the UUID_TAG to that value:

config_tool -c UUID_TAG="13144a57-30f6-48c6-abcb-c2c6c05501c9"
config_tool -s

From now on no matter if that disk is detected as sda, sdb or sdz, WDLXTV will look on it for the presence of a valid root.bin/rootFS.

Selecting a different disk-based firmware

In some cases, you might have more than one firmware located on a disk. For example, you might have one using the 1.03 BaseFW, and another with the 1.02 BaseFW. Starting with 0.4.5.3, WDLXTV will let you chose which firmware to boot from, through the use of the ROOT_TAG config keyword.

First, you need to tag your firmware. This is simply done by renaming it to .rootFS-tag or root.bin-tag, tag being any arbitrary label you can assign. For example, your USB disk might contain:

.rootFS-SVN
root.bin-103
root.bin-WD104

If you want the WDTV to boot from, say, root.bin-103, then set the ROOT_TAG to "103":

config_tool -c ROOT_TAG="103"
config_tool -s

(specify the tag without the leading dash).

Starting with 0.4.7.0 you can also set the ROOT_TAG value through WEC.