Uncompressed root fs to ramdisk.
Mattias Sjogren
[email protected]
Tue, 23 May 2000 23:07:46 +0200
Alright! I'll give it a try in a minute, we have to sort out
some problem with the powersupply (batteries) to our
computer first...
We have the default 4 MB's ramdisks. As far as I know the
ramdisks are created at boot (16 at 4MB a piece). I just
create them with mke2fs -m0 /dev/ram0...2.
I'll see if I can login with an ordinary user...
/Mattias
Ralph Stickley <[email protected]> skrev:
> Good Job!
>
> Not sure about the minigetty thing. I think the /dev/tty
> things (are they
> files , pipes ? does anybody know ?? ) have to be in R/W
> partition. I just
> linked to my ram disk:
>
> mount /dev/ram /var
> /tmp -> /var
> /dev/tty0 -> /tmp/tty0
> ...
>
> Where /tmp is a link to the /var mount point for the ram
> disk. That might help
> ?
>
> Do you create more than one ramdisk ? How do you specify
> the size of your ram
> disk ?
>
> BTW, If I don't login with root privledge, I can never
> get my console window to
> open. (Something to do with ttyP0 and ptyp0 I think...)
>
> Little bits here and there to clean up yet....so little
> time :-)
>
> Good luck,
> Ralph
>
> --- Mattias Sjogren <[email protected]> wrote:
> > After some minor initial problems we're now up and
> > running... Our only remaining problem is that mingetty
> does
> > not like to be run from the read-only disk. Init says
> that
> > it respawned too many times.
> >
> > I have /var (inc a touched run/utmp), /tmp and /root as
> > mounted ramdisks. I boot of one big partition that I
> want
> > read-only.
> >
> > /Mattias
> >
> > Ralph Stickley <[email protected]> skrev:
> > > 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
> > > ---------------------------------------------------
> >
> > http://www.docs.uu.se/robocup/
> > ---------------------------------------------------
> > See the list archives at http://adis.on.ca/archives/
> > See the PWL homepage at http://embedded.adis.on.ca
> > ---------------------------------------------------
>
>
> __________________________________________________
> 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
> ---------------------------------------------------
http://www.docs.uu.se/robocup/
---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at http://embedded.adis.on.ca
---------------------------------------------------