[BusyBox] ramdisk howto

David Daney ddaney at avtrex.com
Fri Sep 24 22:39:53 UTC 2004


Peter Willis wrote:
> have a stupid question: is it possible to partition the compactflash so 
> that the first, say, 14MB was reserved for the 
> kernel+bootloader+ramdisk, and the remaining space be simply "raw free 
> space" ? 

It may depend on the CF driver.

I have a USB connected CF reader that uses the normal usb mass-storage and
scsi drivers, and it works just like a normal scsi disk.  I partition it
with fdisk and have both ext3 and vfat file systems on it.  This all on a
mips/linux2.4.25 based system.

> The point would be that when you want to update a config file 
> or other file on which you need to write, you create a tar.gz or tar.bz2 
> of the changed files, and dd it into the free space; that way you could 
> easily confirm whether the data was corrupted ( gzip -t ) and if it was 
> your ramdisk was never changed so you can still reboot or overwrite the 
> bad data with a default tar.gz. I don't know anything about CF so I 
> could easily be wrong =) Plus there's always the possibility of using 
> some kinda ROM for the ramdisk and CF for the changed files...

My bootloader will load the ramdisk image out of a partition in the on
board NAND flash.  Other partitions in the NAND are RW on either JFFS2 or
YAFFS file systems.




More information about the busybox mailing list