All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Jared Rhine <jared@wordzoo.com>,
	xen-devel@lists.sourceforge.net
Subject: Re: [Fwd: Installing from distribution CDs]
Date: Wed, 02 Feb 2005 20:16:36 -0600	[thread overview]
Message-ID: <42018984.8020309@codemonkey.ws> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1236AB@liverpoolst.ad.cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

Ian Pratt wrote:

>Thanks for looking into this. I wander if it's something to do with the
>way xen packages up the module as an initrd for dom0? Maybe there's some
>difference between an initrd and a ramdisk?
>  
>
Didn't have time this afternoon but I was able to look into it more this 
evening and I found the culprit.  In arch/i386/kernel/setup.c there was 
the following line around L1363:

        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.  I'm not sure why this there (perhaps a part of 
early development?).  I've attached a patch that puts back the 
old_decode_dev call and the behavior becomes exactly what you'd expect: 
if no root= is specified, initrd still works but if /linuxrc exits you 
get a VFS error because no root= is specified.

This is what Linux would normally do.

It's very important to note though that applying this patch means that 
if people had ramdisk=... lines in their configs and didn't have 
root=/dev/ram0, their machines won't boot anymore.

A solution would be to add an initrd option to the configuration file 
and have the ramdisk= option default the root device to /dev/ram0.

I've tested this patch on a couple day old copy of xen-unstable.  I'm 
curious to know what the source of this was though because I don't feel 
very comfortable with just restoring something that was obviously taken 
out for a reason..

Regards,
Anthony Liguori

Signed-off-by: Anthony Liguori

[-- Attachment #2: initrd.diff --]
[-- Type: text/x-patch, Size: 429 bytes --]

--- linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c~	2005-01-25 22:29:18.000000000 -0600
+++ linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c	2005-02-02 18:54:52.722236000 -0600
@@ -1360,7 +1360,7 @@
 		efi_enabled = 1;
 #endif
 
- 	ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); /*old_decode_dev(ORIG_ROOT_DEV);*/
+ 	old_decode_dev(ORIG_ROOT_DEV);
  	drive_info = DRIVE_INFO;
  	screen_info = SCREEN_INFO;
 	edid_info = EDID_INFO;

  reply	other threads:[~2005-02-03  2:16 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 [this message]
2005-02-03  4:07   ` Christian Limpach
2005-02-03  4:52     ` Anthony Liguori
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=42018984.8020309@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=aliguori@us.ibm.com \
    --cc=jared@wordzoo.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.