From: Mikael Pettersson <mikpe@csd.uu.se>
To: kai@tp1.ruhr-uni-bochum.de, torvalds@transmeta.com
Cc: ak@suse.de, linux-kernel@vger.kernel.org
Subject: [PATCH][2.5.22] fix x86 initrd breakage
Date: Tue, 18 Jun 2002 02:55:58 +0200 (MET DST) [thread overview]
Message-ID: <200206180055.CAA11524@harpo.it.uu.se> (raw)
Linus & Kai,
Summary: 2.5.17 broke initrd on x86. Fix below.
arch/i386/boot/Makefile sets RAMDISK := -DRAMDISK=512, so
bootsect.S puts 512 in the ram_size word.
At boot, arch/i386/kernel/setup.c reads ram_size (RAMDISK_FLAGS)
and extracts the low 11 bits (== 512) into rd_image_start.
init/do_mounts.c tries to find a gzip or FS image in /dev/ram
starting at block rd_image_start (512). It fails because
the image normally starts at block 0, and prints:
"RAMDISK: Couldn't find valid RAM disk image starting at 512."
Why: Kai's patch in 2.5.17 to move x86-specific options from
Makefile to arch/i386/boot/Makefile unfortunately lost the fact
that the orginal "#export RAMDISK = -DRAMDISK=512" statement
was commented out. (I suspect a typo.) RAMDISK is obsolete since
1.3.something, and uncommenting it has "interesting" effects
since the ram_size field has a very different meaning now.
The patch below reverts the statement to its pre-2.5.17 state.
Perhaps it should be removed altogether?
Cc: to Andi Kleen since it seems x86_64 also is affected by
this bug.
/Mikael
--- linux-2.5.22/arch/i386/boot/Makefile.~1~ Tue Jun 11 14:18:07 2002
+++ linux-2.5.22/arch/i386/boot/Makefile Tue Jun 18 00:43:12 2002
@@ -23,7 +23,7 @@
# If you want the RAM disk device, define this to be the size in blocks.
-RAMDISK := -DRAMDISK=512
+#RAMDISK := -DRAMDISK=512
# ---------------------------------------------------------------------------
next reply other threads:[~2002-06-18 1:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-18 0:55 Mikael Pettersson [this message]
2002-06-18 1:53 ` Andi Kleen
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=200206180055.CAA11524@harpo.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=ak@suse.de \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®