From: David Becker Subject: v2.6.x root dev patch Date: Tue, 14 Sep 2004 13:13:58 -0400 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: <20040914171358.GJ921@cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org For xen0, I do ip config on the kernel command line (eg ip=172.16.5.107:::255.255.252.0:dragonfly-xen:eth0:off ) and that works fine with v2.4 but not with v2.6 xen0 kernels. Turns out that in 2.6 xen0, MAJOR(ROOT_DEV) == UNNAMED_MAJOR during the time the ipconfig stuff runs. In that case, ipconfig decides to do dhcp even though the ip= command line param is present. The 2.4 xen0 initializes ROOT_DEV to MKDEV(RAMDISK_MAJOR,0) and avoids this problem. The 2.6 xen0 initializes ROOT_DEV to the value stashed in bzImage .. except 2.6 xen0 kernels don't have any of that bzImage header stuff. Here is a patch to make 2.6 initialize ROOT_DEV as is done in 2.4: ===== linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c 1.18 vs edited ===== --- 1.18/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c Tue Sep 7 05:59:38 2004 +++ edited/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c Tue Sep 14 12:53:12 2004 @@ -1313,7 +1313,7 @@ efi_enabled = 1; #endif - ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); + ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); drive_info = DRIVE_INFO; screen_info = SCREEN_INFO; edid_info = EDID_INFO; ------------------------------------------------------- This SF.Net email is sponsored by: thawte's Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m