Uncompressed root fs to ramdisk.

Ralph Stickley [email protected]
Fri, 19 May 2000 06:39:53 -0700 (PDT)


Hi,

The solution I used to protect the system (copied from some other
distributions):

Format the Compact Flash as follows:
1. hdx1 Create a boot partition (~1MB)
2. hdx2 Create a Read Only partition (~28MB)
3. hdx3 Create a Read/Write partition (~1MB)

Now load each partition:
1. hdx1 Copy boot.b and kernel-2.2.14 (or whatever your image is)
2. hdx2 Copy all files here
3. hdx3 format/erase

Now run LiLo and tell it where the boot image is (/dev/hdx1) 
and where the file system is (root=/dev/hdx2)

Note fstab never has to mount the boot partition. All system files are
maintained on the read only partition and never get corrupted. User files are
vulenerable, but can be backed up on-to the Read only partition as required.

The trickery is all in rc.sysinit. At boot up, you have to mount everything
and then load the default files to the read/write partition. This
needs to be checked and reformatted if it gets corrupted.
I also create a ramdisk to store the /tmp /var /whatever files in.
this gives about 4MB of space to let the system store stuff.


Some files on the Read Only partition may need to be updated on
occasion.  A simple script will allow access to do this 
(mount -o remount...).

So far, this works for me, doesn't take much ram.  I don't know how
to get the permissions set properly, how to get the devices to work
everytime and other little problems....

The applications I have working (on 32MB CF) so far:
Netscape 4.7/Citrix/x3270/fvwm95

All system configuration is done through fvwm scripts (clock, mouse,
keyboard, beep, network, startup applications, screen background).

Hope this helps,
Ralph

--- Mattias Sjogren <[email protected]> wrote:
> Hi all!
> 
> I have just got going with PeeWee Linux and it looks great
> so far... My only problem is that I want to load the
> uncompressed root filesystem to ram to avoid corruption on
> sudden power failures. I know that this is easily done with
> a compressed root fs but that makes it so hard to change so
> I don't want that.
> 
> I'm booting from a 16MB Flash pcmcia card in an ide adaptor
> using LILO. 
> 
> Another small question... How do I get the statup scripts to
> automatically run fsck on the root fs? I have a '1' at the
> right place in fstab but that doesn't help and I get no
> errors...
> 
Don't know, I have the same problem...some option in mount I suppose...


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://embedded.adis.on.ca
---------------------------------------------------