Re: ramfs: mounting ramfs as / at boot time

From: Dave Cinege (dcinege@psychosis.com)
Date: Thu May 25 2000 - 19:26:29 EST


Werner Almesberger wrote:
>
> Dave Cinege wrote:
> > It happened anyway.... : P DOOOOHHHH! <slamming head on desk>
> > NO MAS! NO MAS!
>
> ;-)) Well, you know the alternative: continue with the "pull everything
> into the kernel" approach and special-case ramfs handling in mount_root.

YES! Great! I want it! How do I go about doing it? What is it I should call to
have ramfs on /? I haven't a clue.
 
> > > - you load a small initrd, and boot as usual, with or without /linuxrc
> > > - your initrd environment creates and populates the ramfs (*)
> >
> > That's not going to work very well in an embedded system with only 8MB of ram
> > and a (possibliy) unmountable boot device, OK?
>
> My experience with the Psion S5 suggests that there's actually quite
> a lot you can do with 8 MB ...

Do ya know? How can't ya know? Yes, you must know you're torturing me.
If you have a 4MB initrd, and you try to copy it into ramfs, you're eating 8MB.
 
> Maybe you're concerned that you won't have space for initrd+initrd.gz+
> ramfs+ramfs.tar.gz. Fortunately, you can free things quite
> aggressively, if you wish. E.g. you could free pages from /dev/initrd
> as soon as they're read. (*)

Get my gun... I lived with this SHIT for a year before writing my
initrd_archive kernel feature to replace it.
        
******************* Bootstrap images...are....EVIL! *******************
 
> And the initrd that populates ramfs doesn't need to contain a regular
> execution environment with libc and such. The only significant

You ever see the size of something compiled -static? Forget it.

> redundancy/overhead here is the empty FS structure plus the gunzip
> code.

> Assuming you've added that free-after-reading extension, let's have a
> quick look at the memory usage:
>
> before boot (on disk/flash) kernel.gz+initrd.gz+ramfs.tar.gz
> kernel uncompresses itself kernel+kernel.gz+initrd.gz+ramfs.tar.gz
> kernel starts kernel+data+initrd.gz+ramfs.tar.gz

And what I want is from here:
kernel mounts ramfs on / kernel+data+initrd.tar.gz+ramfs
kernel gunzips and untars
through 32K buffer -> / kernel+data+initrd.tar.gz+ramfs+buffer
kernel frees initrd kernel+data+ramfs(complete root)

It works just so nice and clean. It's been around for 2 years now, using minix.
I just want to add ramfs to the feature.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:15 EST