From: Anthony Liguori <anthony@codemonkey.ws>
To: Christian.Limpach@cl.cam.ac.uk
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
Anthony Liguori <aliguori@us.ibm.com>,
xen-devel@lists.sourceforge.net
Subject: Re: [Fwd: Installing from distribution CDs]
Date: Wed, 02 Feb 2005 22:52:45 -0600 [thread overview]
Message-ID: <4201AE1D.3080108@codemonkey.ws> (raw)
In-Reply-To: <3d8eece2050202200727518be6@mail.gmail.com>
Christian Limpach wrote:
>On Wed, 02 Feb 2005 20:16:36 -0600, Anthony Liguori
><anthony@codemonkey.ws> wrote:
>
>
>> ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
>>/*old_decode_dev(ORIG_ROOT_DEV);*/
>>
>>This defaults the root device to /dev/ram0 instead of trying to get it
>>from the boot loader.
>>
>>
>
>Yes. The problem with getting it from the boot loader is that, as far
>as the domain is concerned, there is no boot loader. ORIG_ROOT_DEV
>points into the boot_params data which is probably initialized to 0 --
>the original code initializes ROOT_DEV to 0.
>
>
According to lanana's device registry, 0 represents the null device.
This seems like a safe value for it to be set to when there is no root
device specified.
I'm not too familiar with the internals of various boot loaders, but I
always thought the root device was passed through the kernel command
line. These seems like legacy boot-loader support code that probably is
more or less meaningless in the context of Xen.
>It's not entirely obvious to me why/how this fails in rd_load_image
>because I don't use initrds and ramdisks much and don't know what the
>expected bahaviour is. Why does it work better with ROOT_DEV == 0? I
>would expect the open(from,...) to fail or does ROOT_DEV get set to
>some other default value in this case?
>
>
Here's how the initrd behaves:
1) If an initrd exists, load it into a ramdisk.
2) If the root device is /dev/ram0, then assume that this is not an
initrd and instead just a ram-based rootfs.
3) Otherwise, execute /linuxrc as a kernel thread, and then pivot the
initrd and remount the real root when /linuxrc exits.
So what's happening is that with no explicit root device set, the kernel
thinks that the initrd is just a ram-based rootfs and does not call the
routines to execute the initrd-specific features (like executing
/linuxrc). This /linuxrc style of booting is widely used in
distribution installers and apparently, linux-based LiveCDs.
I'm not sure what the problem the original patch writer was trying to
solve but I'm not sure that this was the right solution. The patched
behavior is not what Linux normally does. If the author is still
around, I'd be happy to try and find a better way to address their issue
while still preserving the initrd semantics.
Regards,
Anthony Liguori
> christian
>
>
>
--
Anthony Liguori
anthony@codemonkey.ws
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
next prev parent reply other threads:[~2005-02-03 4:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-02 22:26 [Fwd: Installing from distribution CDs] Ian Pratt
2005-02-03 2:16 ` Anthony Liguori
2005-02-03 4:07 ` Christian Limpach
2005-02-03 4:52 ` Anthony Liguori [this message]
2005-02-03 10:54 ` Christian Limpach
-- strict thread matches above, loose matches on Subject: below --
2005-02-09 1:47 Ian Pratt
2005-02-09 2:11 ` Anthony Liguori
2005-02-09 0:11 Ian Pratt
2005-02-09 1:00 ` Anthony Liguori
2005-02-09 22:56 ` Jared Rhine
2005-02-02 8:51 Ian Pratt
2005-02-02 11:31 ` Jared Rhine
2005-02-02 15:03 ` Anthony Liguori
2005-02-02 18:39 ` Jared Rhine
2005-02-02 19:40 ` Anthony Liguori
2005-02-02 20:04 ` Anthony Liguori
2005-02-02 14:57 ` Anthony Liguori
2005-01-11 20:48 Anthony Liguori
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=4201AE1D.3080108@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=Christian.Limpach@cl.cam.ac.uk \
--cc=aliguori@us.ibm.com \
--cc=m+Ian.Pratt@cl.cam.ac.uk \
--cc=xen-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.