WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

Re: [Xen-devel] What is the implication to use 'module'directive instead

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] What is the implication to use 'module'directive instead of 'initrd' to load ramdis
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: 2007年1月11日 09:28:59 +0000
Cc: Liang Yang <multisyncfe991@xxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2007年1月11日 01:28:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45A6081A.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C1C43CE1.72DC%keir@xxxxxxxxxxxxx> <BAY125-DAV2B03BABB3A1F06475A97493BF0@xxxxxxx> <1168083889.4942.6.camel@xxxxxxxxxxxxxxxxxxxxx> <BAY125-DAV87729DA9D208116E74A3793BC0@xxxxxxx> <BAY125-DAV47B3768DED73E5B02408893B30@xxxxxxx> <45A4C95A.76E4.0078.0@xxxxxxxxxx> <BAY125-DAV60959393664C831D598ED93B20@xxxxxxx> <45A6081A.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2007年01月11日 at 08:49 +0000, Jan Beulich wrote:
> >I used SINGLE module to load kernel and SINGLE intird to load ramdisk in 
> >grub.conf file.
> >
> >title Xen Unstable /Red Hat Enterprise Linux 2.6.16.33
> > kernel /xen.gz console=vga
> > module /vmlinuz-2.6-xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet 
> >console=tty0
> > initrd /initrd-2.6.16.33-xen.img
> >
> >Based on what you explained, this should be fine. However, Xen Linux still 
> >got a panic message: Linux kernel must be loaded before ramdisk.
>
> No, it's not. I said that initrd and module are equivalents, except that 
> initrd
> can be specified just once. Hence, if there already was a module
> statement (being equivalent to initrd), there can't be a second initrd.
If your kernel uses the multiboot protocol (which Xen does) then initrd
is invalid, at least by my reading of the grub code, so you must use
module. From stage2/builtins.c:
 static int
 initrd_func (char *arg, int flags)
 {
 switch (kernel_type)
 {
 case KERNEL_TYPE_LINUX:
 case KERNEL_TYPE_BIG_LINUX:
 if (! load_initrd (arg))
 return 1;
 break;
 
 default:
 errnum = ERR_NEED_LX_KERNEL;
 return 1;
 }
 
 return 0;
 }
 
compared with module_func:
 static int
 module_func (char *arg, int flags)
 {
 int len = grub_strlen (arg);
 
 switch (kernel_type)
 {
 case KERNEL_TYPE_MULTIBOOT:
 if (mb_cmdline + len + 1 > (char *) MB_CMDLINE_BUF + 
MB_CMDLINE_BUFLEN)
 {
 errnum = ERR_WONT_FIT;
 return 1;
 }
 grub_memmove (mb_cmdline, arg, len + 1);
 if (! load_module (arg, mb_cmdline))
 return 1;
 mb_cmdline += len + 1;
 break;
 
 case KERNEL_TYPE_LINUX:
 case KERNEL_TYPE_BIG_LINUX:
 if (! load_initrd (arg))
 return 1;
 break;
 
 default:
 errnum = ERR_NEED_MB_KERNEL;
 return 1;
 }
 
 return 0;
 }
If your kernel is using the Linux kernel boot protocol then Jan is
correct that module and initrd are interchangeable and only one may be
used (in fact it looks to me as if simply the last one takes
precedence).
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] [RFC] keymap support for PVFB , Gerd Hoffmann
Next by Date: Re: [Xen-devel] [PATCH] trivial fix for vcpu_set_affinity , Keir Fraser
Previous by Thread: Re: [Xen-devel] What is the implication to use 'module'directive instead of 'initrd' to load ramdis , Jan Beulich
Next by Thread: Re: Xen Still hangs up when insmod xenbus.ko. Re: [Xen-devel] Unmodified_drivers modules broke again for 3.0.4? , Kurt Hackel
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /