public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ed Martini <martini@c2micro.com>
To: linux-kernel@vger.kernel.org
Subject: initrd/initramfs problem
Date: Wed, 16 Mar 2005 16:37:11 -0800	[thread overview]
Message-ID: <4238D137.1030907@c2micro.com> (raw)
In-Reply-To: <20050316120647.GB8563@linux-mips.org>

What fails is when CONFIG_BLK_DEV_INITRD and CONFIG_INITRAMFS_SOURCE are 
both set.  I realize (now) that I don't need initrd at all, and 
initramfs works fine by itself, as you have tested.  It seems that the 
kernel may need some exclusion between these two mechanisms while the 
difference is sorted out.

I'm not totally up on Kconfig files, but maybe something like this in 
drivers/block/Kconfig:

config INITRAMFS_SOURCE
      string "Initramfs source file(s)"
      default ""
      depends on BLK_DEV_INITRD=n

Regarding the documenation it would have been helpful to me if 
Documentation/initrd.txt had a reference to 
Documentation/early-userspace/README.  I'm not sure who maintains that 
directory, or I'd send a suggestion.  tldp.org?

THX
Ed Martini

Original context: 
http://www.linux-mips.org/archives/linux-mips/2005-03/index.html

Ralf Baechle wrote:

>On Tue, Mar 15, 2005 at 02:37:45PM -0800, Ed Martini wrote:
>  
>
>>Also, unless you move the location of .init.ramfs, it gets freed twice, 
>>leading to a panic.
>>    
>>
>
>Interesting one.  When I tested the code recently it did work for me and
>it shouldn't have changed since.  The way this is supposed to work is
>by setting the page_count to 1 by using set_page_count and unmarking the
>page as reserved, so after that point a free_page should actually succeed -
>even if done twice as you've observed, first in populate_rootfs then
>once more in free_initmem.
>
>It seems a frighteningly bad idea though since it relies on no memory
>from the initrd range being allocated between the two calls - or it would
>end being freed by force, in use or not.  On startup Linux tends to
>allocate memory starting from high address towards low addresses which
>must be why we usually get away with this one.
>
>  
>
>>From the documentation alone it's impossible to figure out how to build 
>>your initramfs.  In various places the docs refer to the initial 
>>executable as /linuxrc, /kinit, /init, and possibly others.  If you read 
>>init/main.c you see that for an initramfs, your initial process will be 
>>started from /init.
>>    
>>
>
>I guess I read the code so I didn't notice the lacking qualities of the
>documentation ...
>
>  Ralf
>  
>


           reply	other threads:[~2005-03-17  0:50 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20050316120647.GB8563@linux-mips.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4238D137.1030907@c2micro.com \
    --to=martini@c2micro.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox