initrd and running in RAMDISK

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

Reply to
frederick sonnichsen
Loading thread data ...

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.

Reply to
Russell Shaw

Reply to
frederick sonnichsen

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

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.

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

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 I should have the semifinal text up by next weekend.

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

Reply to
Lewin A.R.W. Edwards

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.