From: Anthony Liguori <aliguori@us.ibm.com>
To: xen-devel@lists.sourceforge.net
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Subject: [PATCH] Fix initrd support for Linux 2.4/2.6
Date: Fri, 04 Feb 2005 15:32:38 -0600 [thread overview]
Message-ID: <1107552758.19644.30.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]
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
[-- Attachment #2: initrd.diff --]
[-- Type: text/x-patch, Size: 1274 bytes --]
--- xen-unstable-orig/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c 2005-01-25 22:29:18.000000000 -0600
+++ xen-unstable/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c 2005-02-04 13:44:49.000000000 -0600
@@ -1360,7 +1360,10 @@
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;
--- xen-unstable-orig/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c 2005-01-25 22:29:10.000000000 -0600
+++ xen-unstable/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c 2005-02-04 13:44:58.000000000 -0600
@@ -240,7 +240,9 @@
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));
reply other threads:[~2005-02-04 21:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1107552758.19644.30.camel@localhost \
--to=aliguori@us.ibm.com \
--cc=Christian.Limpach@cl.cam.ac.uk \
--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.