Uncompressed root fs to ramdisk.

Kyle Harris [email protected]
Fri, 26 May 2000 13:17:41 -0400


Oooops. Spoke too soon. Now if I login thru the console, then logout, I
get the "respawning too fast" error. I guess /dev/tty must always be
rw.  I wonder if /dev can be its own mount point, or does it have to be
on /? There must be someway to make / ro and still have everything work!

Kyle.

Kyle Harris wrote:
> 
> Ralph,
> 
> I found that I can remount / read-only after mingetty runs and
> everything works fine. No more errors when trying to spawn mingetty on a
> write only device. Once they're open it appears making them ro has no
> effect. I added the following line to the very end of /etc/inittab.
> 
> tk:23:once:/bin/mount -n -o remount,ro /
> 
> Ralph Stickley wrote:
> >
> > Kyle,
> > Thanks for the help!
> >
> > --- Kyle Harris <[email protected]> wrote:
> > > Ralph,
> > >
> > > Please see below.
> > >
> > > Ralph Stickley wrote:
> > >
> > > > 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:
> > >
> > > /dev/xxx are special "files" called nodes. It provides a mechanism for
> > > accessing devices through a major and minor number.
> > >
> > Ahhh! thats the mknod thing does ... Still not sure how the permissions
> > get changed on these files even with a read-only file system...
> >
> > Of course, init finds rc.sysinit before I execute a mount...
> >
> > Hey, does the kernel mount the "root=/dev/hdx" device specified to Lilo?
> > Then it can read inittab and use the /dev stuff.  Then rc.sysinit
> > mounts this as read only.
> > Only guessing here, then why doesn't my initial console work ?
> > Does this mean my file system is mounted read/write at boot time ?
> >
> > Hmmmm...I guess I'd have to study the kernel source code to find this...
> > any clues ?
> >
> > > >
> > > > mount /dev/ram /var
> > > > /tmp -> /var
> > > > /dev/tty0 -> /tmp/tty0
> > > > ...
> > > >
> > >
> > > I like this idea of having /dev in the ramdisk.
> >
> > Only some items are linked...others seem to work even though they are in
> > read only file system...(like /dev/ram :)
> >
> > > But how does this work
> > > since you need /dev/ram in order to create and mount /var? And the
> > > kernel wants a console early in the boot sequence.
> > >
> >
> > Oops...caught me :-)  I get a nasty message from the kernel at boot time.
> > Something about not being able to open initial console. Ok. Tough! Hmmmm...
> > wonder if that screws up other stuff ??  I have no clue whats going on
> > here with these /dev/ node things...
> >
> > > > 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 ?
> > >
> > > for a 2 MB disk, I use mke2fs -m0 /dev/ram0 2048
> > >
> > Ah...another flag!  Should have figured..Thanks for the help :-)
> >
> > Later,
> > Ralph
> >
> > > Kyle.
> > > ---------------------------------------------------
> > > 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
> > ---------------------------------------------------
> ---------------------------------------------------
> See the list archives at http://adis.on.ca/archives/
> See the PWL homepage at  http://embedded.adis.on.ca
> ---------------------------------------------------
---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://embedded.adis.on.ca
---------------------------------------------------