News:

Registered a URL and setup a forum as the IPCam stuff really needed its own site vs my irregular blog posts about IPCam hacking at http://www.computersolutions.cn/blog

Author Topic: Creating a RAMFS image (How to make a ram disk image)  (Read 6261 times)

  • No avatar
  • *****
July 17, 2011, 02:53:36 am
I generate a ramdisk image using simple tools.

See below for sample script I use.

I run this from my images folder.  You'll need to change the path to your ramfs files location to something appropriate for you to use.


genramfs.sh
Code: [Select]
#!/bin/sh

#Dangerous, but i'm  lazy
rm tmpramfs.img OPENIPCAMramfs.img
mkdir /tmp/ramfs

dd if=/dev/zero of=tmpramfs.img bs=1k count=1024
mkfs.minix -c  tmpramfs.img
mount -o loop -t minix tmpramfs.img /tmp/ramfs

# Change the folder below to the location you store your files and folders for the ramdisk
cp -av ../romdisknew/* /tmp/ramfs

umount /tmp/ramfs
gzip -v9 -c tmpramfs.img >OPENIPCAMramfs.img