LFS 6.4 Portability - *** correction *** (ramdisk)

Randy McMurchy lfs.user at mcmurchy.com
Fri Feb 6 09:20:10 PST 2009

Ryan Isaacs wrote:
> I thought modules were just some
> compiled code, which likely sits as a binary file on the disk
> somewhere. They are loaded into RAM when needed (user using insmod, or
> system doing it automatically). So, how does the ramdisk fit in?

This ought to turn the light bulb on for you.

You're correct about modules just being compiled binary code
on disk. But the OS can't access the disk
*until the disk drivers are loaded into the kernel*.

And if the disk drivers are modules, the OS can't get to them
because they are on disk and the disk drivers aren't loaded
into the kernel yet. Chicken and egg. So, the disk drivers are
loaded into a ramdisk using a special init feature so they can
be accessed by the kernrel.

That's why most folks simply compile the disk driver code
straight into the kernel so it is available right off the bat.

Hope this makes sense.


More information about the lfs-support mailing list