New Feature? Configuration for ramdisks/hdd...

Ralph Stickley [email protected]
Fri, 19 Jan 2001 08:29:00 -0800 (PST)


Adi,
We are in the process of switching to the new-improved-latest version
of PeeWee linux.  One problem occured which I may have a solution for
(or you may have a better solution) is trying to build our own unique
filesystem - one that doesn't match the one built by pwl_target*
scripts...

If you recall, our system contains the following partitions:
1. boot/root partition (ro)
2. user partition (rw)
3. Ramdisk for /etc
4. Ramdisk for /dev

So, using the new target hardware we select the "read only root"
with multiple ramdisks..

However, the pwl_target* scripts force us to use the /home directory
as a ramdisk, mirrored from another partition.  While this may be a
good choice, it seems that the configuration tool should not dictate
the file system (since everything else is configurable).

Anyhow, I have have been hacking on pwl_target* scripts (without GUI
support yet) for the following:
...in some init function for now (will be default parameters)...
   hd_mnt_0=/
   hd_mnt_1=
   ...
   hd_mnt_7=
   rd_mnt_0=
   rd_mnt_1=/dev
   rd_mnt_2=/etc
   rd_mnt_3=/tmp
   ...
   rd_mnt_7=

So, with these variables, I can specify which directories are
compressed into ramdisk image files and load them at boot time.
Also, these variables allowed me to remove all of pre-defined
directories (/etc, /dev, ...) from the pwl_target* scripts.  Only the
initrd directories are built as required to make it boot.

Also, by specifying the partitions, we should be able to boot this
from a small partition on the development drive...have to work out
the lilo thing, but this looks like it would work...

Now, using these variables, the scripts build the following:
  ramdisk.1  (compressed image of the $rd_mnt_1 variable)
  ramdisk.2  (  ""                            2  ""     )
  ramdisk.3  (  ""                            3  ""     )
  linuxrc    (loads ramdisks ramdisk.1 ramdisk.2 ramdisk.3)
  initrd     (as configured by linuxrc)
  fstab      (filesystem table matches ramdisks as configured)
  rc.init    (builds mtab to match the configuration)
  lilo.conf (no change)

So far so good. The files seem to look like the previous files but
match the configuration for the ramdisks.  I copied nearly all of
your code or the at least the spirit of your code - of course,
instead of the single 300+ line function, I have lots of little
functions (sorry, old habits die hard :)

Still to do:
1. make this system boot
-- have to build the ld.so.cache thing too
2. verify the size thing
3. add support for configured hard drive partitions
4. add the parameter setups
5. rework the other target devices that require ramdisks

And some questions:
Is there some reason that /var is linked under /dev ?

Does the initrd use the same fstab (why is fstab built twice in the
build_ro_root function ?)

Is the /home directory mirrored from a partition a common/desirable
thing to do ? 
-- I'd need to define someway to specify that ramdisk=/home is not
compressed by pwlconfig but copied at boot time from some other
configured partition

Your thoughts ? Is this interesting or just something we need ?
I'll try to get a system to boot today and send you a copy - or
anyone else who is very brave, let me know...(of course, I'm out to
BIOS world next week, so we can just let the code fester for a while
:)

Later,
Ralph



__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/
---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://peeweelinux.com
---------------------------------------------------