init ramdisk vs. root ramdisk

init ramdisk vs. root ramdisk

Post by phil-news-nos.. » Mon, 16 Oct 2000 04:00:00



To run a system from CDROM w/o using any HD, ramdisk is essential.
A limitation that exists in loading the initial ramdisk is how
much data can be comrpessed into the boot image, which on Intel
PC devices with El Torito is limited to a 2.88 MB floppy image.
To get past this limitation, my first thought is to have the
initial ramdisk bring in a program run as /linuxrc which then
reads a larger image from a file on the CDROM into yet another
ramdisk which will then be remounted as root by the kernel.

An issue I am running into is which ramdisk to use.  I cannot
use /dev/ram0 (1,0) because initrd uses that one, and it is
already mounted.  Overwriting it would have * consequences.

So I will use a 2nd ramdisk.  Now the issue is which one.  Should
I use /dev/ram1?  Maybe programs on a running system expect to
take the next ramdisk past one that might be used by initrd.  Or
should I use /dev/ram15?  Similarly, programs might grab ramdisks
from the top down.  I'd really prefer to let whoever uses this
make that decision.  But the obvious place, where one puts a
root=/dev/ram1 on the kernel argument string won't work because
the hard coded device names in init/main.c don't have any more
ramdisks besides just /dev/ram (I notice a similar limitation in
choice of SCSI CDROM devices).

The only thing I can see is to require users to rebuild the initrd
image that all this starts from and include a special file pointing
specifically to the same device that the kernel will mount (which
would have to know it strictly by major,minor to get to a ramdisk
other than the first one).

Any comments on making it easier for users?  I don't want to require
them to recompile everything to change something like which ramdisk.

Another thought.

Is it possible for /linuxrc to unmount / (after 2 ramdisks are open)
and mount / again as the 2nd ramdisk?  If that is possible, then I
could copy the initrd to the 2nd ramdisk and rebuild the 1st one to
be what will become the real device to mount root.  But alas, the
mapping of /linuxrc for the running process would block unmounting
the / filesystem.  OK, maybe switching executeables.  But even then
something is mapped from a filesystem mounted over / anyway.  How to
have no filesystems mounted and have a process running ... doubtful.

--
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil  (at)  ipal.net +----------------------------------------------------

 
 
 

init ramdisk vs. root ramdisk

Post by Kasper Dupon » Thu, 26 Oct 2000 04:00:00


[...]
Quote:> An issue I am running into is which ramdisk to use.  I cannot
> use /dev/ram0 (1,0) because initrd uses that one, and it is
> already mounted.  Overwriting it would have * consequences.

> So I will use a 2nd ramdisk.  Now the issue is which one.  Should
> I use /dev/ram1?  Maybe programs on a running system expect to
> take the next ramdisk past one that might be used by initrd.  Or
> should I use /dev/ram15?  Similarly, programs might grab ramdisks
> from the top down.  I'd really prefer to let whoever uses this

[...]

Just use the ramdisks you prefer.
Programs does not grab ramdisks
like you suggest, they store data
in files.

/KD

 
 
 

1. problem with creating ramdisk: kernel loads, but hangs when it tries to mount ramdisk

Hi,

I built a ramdisk root partition for redhat 5.2, but it seems to crash as
soon as the kernel jumps to the ramdisk.
The last message I see is:
    VFS: Mounted root (ext2 fileseystem).

I built the ramdisk according to the instructions in docs/bootdisks
(followed it precisely)

Basically, I zeroed /dev/ram, made it an ext2 file system, and then mounted
it on /mnt.
I then created /mnt/dev, /mnt/etc, /mnt/bin, /mnt/sbin, /mnt/lib, /mnt/usr,
and /mnt/var
I populated dev with cp -dpR /dev /mnt
I then copied most of the /bin and /sbin binaries into their respective
locations.  I issued an ldd /mnt/bin/init and copied all of the libraries
required by init.  I stripped out the debug information with objmove from
the libraries and maintained symbolic links.

I then unmounted /mnt and copied the contents of /dev/ram to a file with a
dd if=/dev/ram of=rootfs bs=1k
It said there was a read/write error at this step.  Not sure what caused the
error.

Could someone post a generic redhat 5.2 (intel) ramdisk root partition (one
that can be mounted by the kernel and contains basic binaries)?  I would
really like to try a ramdisk that I know is working.

Thanks,

Oscar Stiffelman

2. DIP or SLIP

3. - ramdisk.image.gz (0/78) Re: potato on beige G3: where is ramdisk?

4. newbie: Lilo questions

5. ramdisk for linux: mount /ramdisk

6. Networking Stops and Restarts

7. ramdisk driver initialized: 16 ramdisks of 4096K size

8. Konqueror + CSS??

9. Q: RAMDISK, how to make use of a ramdisk specified in kernel Makefile

10. init [1] unrecognized option "ramdisk"

11. pre-DR3+G3 hangs after ramdisk init

12. Init ramdisk w/o LILO

13. Root/Ramdisk under Kernel 1.3.58?