EmbeddedRelated.com
Forums

ramdisk problem.

Started by Archer January 8, 2006
we are using arm-linux for development. Our reference board offer a way
to boot linux using ramdisk with compressed filesystem. I don't know
whether it would be written or not? would it applicapable for us to
write data in to the .gz file?

In article <1136778642.067769.256240@f14g2000cwb.googlegroups.com>,
	"Archer" <xydarcher@163.com> writes:
> we are using arm-linux for development. Our reference board offer a way > to boot linux using ramdisk with compressed filesystem. I don't know > whether it would be written or not? would it applicapable for us to > write data in to the .gz file?
Do you want to a) write to the ramdisk filesystem during runtime of your system or b) do you want to add your own files to the contents of the ramdisk when the system comes up? if a) Yes, You can do that, but whatever files you write will be gone after the next reboot if b) The initial contents of your ramdisk is given by the contents of the .gz file. Embedded Linux distribution vary, but in most cases, this will be a compressed _file_system_, i.e. a bunch of files with directory structure and all in a single binary file. To change its contents, you need to uncompress it first (with gunzip). Then you should be able to mount it on your host computer using the loop device, i.e. mount -o loop <filename> /mnt (the actual command may vary slightly among distributions). After that, you should see your embedded system's root directory under /mnt. Add your files to the directory structure under /mnt, then unmount /mnt, compress the file system again (gzip) and load the new .gz file to your target. HTH Rob -- Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG http://www.elinos.com Klein-Winternheim / Germany http://www.sysgo.com