Question on initrd and initramfs

Ezequiel Garcia elezegarcia at gmail.com
Fri Oct 5 15:25:36 EDT 2012


Hello,

On Sun, Sep 30, 2012 at 5:01 AM, Mulyadi Santosa
<mulyadi.santosa at gmail.com> wrote:
> Hi Tobi...
>
> On Sun, Sep 30, 2012 at 1:10 AM, Tobias Boege <tobias at gambas-buch.de> wrote:
>> Have you read Documentation/filesystems/ramfs-rootfs-initramfs.txt? I didn't
>> but there are some eye-catching statements:
>>
>> 1. initramfs becomes a rootfs (l. 86)
>> 2. rootfs is a special instance of ramfs (l. 73)
>> 3. ramfs cannot be turned off (l. 29ff)
>>
>> This means that initramfs cannot be turned off.
>>
>> 4. initramfs is a gzipped cpio archive and contained within the kernel
>>    (l. 85) and so is the cpio extractor code (l. 166f)
>> 5. initramfs is automatically loaded as rootfs (l. 86)
>
> Interesting catch, Tobi..... for sure sometimes I am too lazy to read
> the documentation.
>

Just wanted to add something fresh. I'm reading through ramfs sources:

$ wc -l fs/ramfs/*.c
   55 fs/ramfs/file-mmu.c
  267 fs/ramfs/file-nommu.c
  289 fs/ramfs/inode.c
  611 total

600 lines! This is really readable! There's even a note from Linus
saying it's a nice template
code to read as a fs starting point.

Interesting, uh?

    Ezequiel



More information about the Kernelnewbies mailing list