aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriap10@tetris.cl.cam.ac.uk <iap10@tetris.cl.cam.ac.uk>2005-02-09 02:58:09 +0000
committeriap10@tetris.cl.cam.ac.uk <iap10@tetris.cl.cam.ac.uk>2005-02-09 02:58:09 +0000
commit0eef50acd62083f9e80d45ae844940c9b2c5a4a0 (patch)
treef08d183617b9105ddf19e4ea3112aa6b486882c5
parent09d5eb57206854f55438aff3442135e3664972c0 (diff)
downloadxen-0eef50acd62083f9e80d45ae844940c9b2c5a4a0.tar.gz
xen-0eef50acd62083f9e80d45ae844940c9b2c5a4a0.tar.bz2
xen-0eef50acd62083f9e80d45ae844940c9b2c5a4a0.zip
bitkeeper revision 1.1159.223.83 (42097c41y12EFATQuIKPTDS1smnkWQ)
Subject: [Xen-devel] [PATCH] Fix initrd support for Linux 2.4/2.6 The following patch sets the default root device to be the null device. This is the behavior Linux is launched with no root device specified in the command line and without a device provided by the boot loader. Previously, the default root device was set to be /dev/ram0. This broke initrd support. This change was made in 2.6 to because of a bug reported on September 14th with dynamic ipconfig. I've recreated his problem and looked through the code and the source of the problem was that his kernel command line was incorrect. He was missing the BOOTP field in the config line requiring that there be an actual root device. This worked with 2.4 but only because 2.4 was also broken. His patch just introduced that bug into 2.6. I've tested this against the 2.6 and 2.4 trees in a recent copy of xen-unstable. I've tested initrd support and ipconfig support (including dynamic ip support). They both now work as expected. If anyone needs an initrd for testing let me know. Regards, -- Anthony Liguori Linux Technology Center (LTC) - IBM Austin E-mail: aliguori@us.ibm.com Phone: (512) 838-1208 Signed-off-by: Anthony Liguori Signed-off-by: ian@xensource.com
-rw-r--r--linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c4
-rw-r--r--linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c b/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c
index 3b27174ba6..46507fbd93 100644
--- a/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c
+++ b/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c
@@ -240,7 +240,9 @@ void __init setup_arch(char **cmdline_p)
boot_cpu_data.pgd_quick = cpu0_pgd_quicklist;
boot_cpu_data.pte_quick = cpu0_pte_quicklist;
- ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
+ /* This must be initialized to UNNAMED_MAJOR for ipconfig to work
+ properly. Setting ROOT_DEV to default to /dev/ram0 breaks initrd. */
+ ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
memset(&drive_info, 0, sizeof(drive_info));
memset(&screen_info, 0, sizeof(screen_info));
diff --git a/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c
index 852c556778..ab77b119b1 100644
--- a/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c
+++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c
@@ -1359,7 +1359,10 @@ void __init setup_arch(char **cmdline_p)
efi_enabled = 1;
#endif
- ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); /*old_decode_dev(ORIG_ROOT_DEV);*/
+ /* This must be initialized to UNNAMED_MAJOR for ipconfig to work
+ properly. Setting ROOT_DEV to default to /dev/ram0 breaks initrd.
+ */
+ ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
drive_info = DRIVE_INFO;
screen_info = SCREEN_INFO;
edid_info = EDID_INFO;