[Peeweelinux] Couldn't find valid ramdisk image

Troy Engel [email protected]
Tue, 04 May 2004 09:29:19 -0700


Ashley Rolleston wrote:
> 
> On another note, I am adding an ftp server to my system. What is the best
> way of creating a partition on my compact flash card that will be
> *persistant* for files that users upload using the ftp server?

(Can't help with the RAMDISK, sorry - knowledge on that area is minimal)

I use ext3 fs for my persistant partition on 128m CF card. The initial 
build target is "Uncompressed ramdisk, boot from ext2 partition". This 
makes a sdb1 and sdb2, leaving the rest of the CF card blank. (Note that 
it will *erase* the card when building, so you want to post-populate the 
ext3 partition with stock data)

Then, after that build I have another script which formats the extra 
portion as ext3 (I have upgraded to 2.4 kernel) like so:

   echo "Creating filesystem..."
   mke2fs -j -b 1024 -m0 /dev/sdb3
   mount -t ext3 /dev/sdb3 /mnt/usbdev

...and then populate it with some precocked data. Then, I do a little 
trickery to mount it on boot -- first, extract and copy rc.modules to 
your custom/ folder, then add the lines:

   # this is so we can mount our ext3 /opt
   mkdir /opt
   echo "/dev/hdc3 /opt ext3 defaults 1 2" >> /etc/fstab

at the end. Add it as a custom script, and the boot order of PWL will 
ensure that it's mounted before the rc scripts run (ie, your FTP server) 
so it'll be ready to go.

hth!
-te

-- 
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com