Uncompressed root fs to ramdisk.

Ralph Stickley [email protected]
Wed, 24 May 2000 06:52:19 -0700 (PDT)


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
---------------------------------------------------