Re: ramdisks and ramfs and initramfs -- what can i avoid?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/08/07, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
>
>   based on a thread or two on some other mailing lists, i'm trying to
> clarify what can be de-selected in terms of ramdisk or ramfs or initrd
> support when building a kernel.
>
>   it all started when someone noticed this in fs/Kconfig:
>
> =====
> config RAMFS
>         bool
>         default y
...
>
>   i'm sure you can appreciate that it's a little odd to have a Kconfig
> option that is hard-selected to yes, while its own help text suggests
> that it can be built as a module, and possibly be de-selected in its
> entirety.  it's also amusing that that same help text claims that
> RAMFS is "more of an programming example than a useable file system",
> and yet i've been assured that it's absolutely essential to build a
> kernel.
>
I would agree that that help text could do with some updating.
Especially since Documentation/filesystems/ramfs-rootfs-initramfs.txt
has this to say about it :

...
The amount of code required to implement ramfs is tiny, because all the
work is done by the existing Linux caching infrastructure.  Basically,
you're mounting the disk cache as a filesystem.  Because of this, ramfs is not
an optional component removable via menuconfig, since there would be negligible
space savings.
...

Which would suggest that we could just nuke it as a config option alltogether...


>   is it?  is there no possible scenario that you might be able to
> build a working kernel without RAMFS support?  what exactly do you
> need it for?
>
>   as i read it, it seems mandatory for initrd support (is that
> correct?).  but init/Kconfig suggests that initrd is de-selectable:
>
Initrd is indeed de-selectable.

> =====
> config BLK_DEV_INITRD
...
>
>   so maybe i choose to leave out initrd support because i'm working
> with an embedded system or something.

Or maybe, like me, you just find initrd's / initramfs's to be a royal
pain and prefer to do without them.

> and on top of all that, RAM
> disk support is also de-selectable (from drivers/block/Kconfig):
>
> =====
> config BLK_DEV_RAM
...
>   so i'm a bit confused.  what's required, and what's not?

As far as I know, You can't get rid of RAMFS, but BLK_DEV_RAM and
BLK_DEV_INITRD you can do without just fine - I for one never have
them enabled for normal use.

> and are
> all the above properly defined in terms of dependencies?  i've just
> started to read the appropriate docs, but if someone can clarify this,
> i'd be ever so appreciative.
>
> rday
>
> p.s.  just to sum up, is it possible to build a working kernel without
> initrd support?

Yes.

> without ramfs support?

Not as far as I know.

> without initramfs support?

Yup.

> with omitting any combination of the above?

You can leave out BLK_DEV_RAM or BLK_DEV_INITRD in any combination you
please at least.

> and do the Kconfig
> entries for those features actually make sense in terms of
> dependencies?
>
As far as I can tell they make resonable sense.


Hope that helped a bit.


-- 
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux