initrd and running in RAMDISK

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
We are presently attempting to set up an embedded system using either
SYSLINUX or LILO. Our intention is to load up from flash and run
entirely on RAMDISK.
      I have read much of the available documentation and the role of
initrd is unclear to us. Per the description in the boot parm docs,
initrd seems to be primarily for use during early bootup, as a means of
providing special /dev's and such. It is later, generally, umounted and
the 'real' root  fs is mounted. I note that the boot disk HOWTO does not
specify the use of initrd.
      However much of the other documentation seems to always use the
initrd boot parm when loading and running in RAMdisk. It appears as
though the final root image is infact mounted via initrd. Is this a
requirement or can I avoid it? I presume there is a 'best' practice here.

Thanks for any help
Fritz
Woods Hole Oceanographic


Re: initrd and running in RAMDISK
Quoted text here. Click to load it

initrd is used when your main root file system is not available at
boot and has to be enabled later. This may be due to hardware that
needs to be configured after boot, or because your file system is
loaded as a module instead of being built in to the kernel.


Re: initrd and running in RAMDISK
So- initrd is no a requirement for running embedded Linux? I am
mounting a flash as hda1 (IDE).  It seems as thought the kernel already
has /dev/hda drivers at startup.

Russell Shaw wrote:
Quoted text here. Click to load it


Re: initrd and running in RAMDISK
Quoted text here. Click to load it

As long as all the modules you need to access the root filesystem are
compiled into the kernel, no you do not need initrd. Initrd is
necessary, for instance, when you have an ext3 filesystem holding the
root

Quoted text here. Click to load it

Very tough question to answer. Flexibility, available RAM, boot speed,
etc are all part of the equation. In an embedded system with fixed
hardware, I would lean towards simply compiling everything into the
kernel. In some cases, there may be things that can't go into the
kernel, that MUST be available before the root filesystem is mounted.
In those specific cases, and those cases alone, I would use an initrd.

Quoted text here. Click to load it

"If it can't go in the kernel, and it must be available before the
root filesystem can be mounted, then it must go in the initrd".

Quoted text here. Click to load it

As part of my current book project, I'm working on a document
describing this (an early release of which escaped)... if you refer to
<http://www.larwe.com/technical/linux_restore_cd.html I should have
the semifinal text up by next weekend.

That's kind of a preview of a section of the new book.

Site Timeline