Any card can be made to do something interesting by putting a script called NBLXLoad.sh on the first partition. The shell script in this file will be exectuted in the initrd (Initial Ram Disk) environment after the kernel boots. It will normally be used to perform software installation/updates.
Note the system only checks for the NBLXLoad.sh any special operation scripts must be called that to be run.
This is performed quite simply, the files necessary are in every daily build
These files should be copied to a FAT formated CF card:
These files are:
The BooSt script nBkPro.img does this:
nand -ignore erase 18 ee8 (Ignore forces boost to erase the blocks) nand partition e8
(you can verify if the erase procedure has worked by doing a nand check) (using nand - ignore erase 18 fe8 also erases the user data on the nand and give a completely clean restart)
This will leave the “OS” partition (3MB (nand sectors 0-18), containing BooSt and the kernel) alone and erase the rest of the flash (except from the 4MB user partition - use fe8 instead of ee8 to nuke that too). The partition command defines the “OS” partition block e8 (ie being 3Mb - 18blocks for BooSt, the rest for the Kernel and Initrd).
More details about the nand and BooSt commands to change it are in Using BooSt.
Once the card and boost have been prepared, simply insert the cf card. If you observe on the serial console you should see the nand being programmed. Once programmed the boot should continue and the system should now be bootable from nand.
Note that the kernel is copied into nand by BooSt, whilst the root filesystem is copied in by the NBLXLoad.sh script.
REMOVE the CF card before you restart or the system will reflash on the next boot!
The nand may be cleared by replacing the above NBLXLoad.sh script with the NBLXLoad-clear.sh from the krnbuild/nand/ directory (copies of the current version of these scripts are in the http://nexus.psiondev.com/~autobuild/ (Link is dead) also). Note the script should still be called NBLXLoad.sh (i.e. you need to rename the script once copied) and should be removed if you continute to boot from the CF card or the erase will happen every time.
It is possible to use one card for both installing images to nand flash, and for booting and running from the CF. To do this you need at least a 256MB card so there is space for a 70MB DOS 1st partition and a 170MB Linux partition.
This allows room for the above-listed files to go on the card for nand-flashing, and for a rootfs to live in the Linux ext2 partition for running from CF. The cards supplied with the Netbook are generally partitioned 4MB/500MB and new ones are generally partionned/formatted all DOS so you need to re-partition them as above.
Cfdisk is the tool for partitioning. When you insert your CF card it appears as a device. That is likley to be /dev/sda or /dev/hde depending on your hardware. Know which you use and be sure because if you repartition one of your main disks accidentally you will regret it. Cfdisk is a friendly tool and is easily driven with menus. What you need to do if something like this:
Next you need to format these new partitions so you can copy stuff onto them - remember to adjust you device name to suit your set-up:
Now you can mount the partitions and copy files to them as normal.