* [PATCH][2.5.22] fix x86 initrd breakage
@ 2002-06-18 0:55 Mikael Pettersson
2002-06-18 1:53 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2002-06-18 0:55 UTC (permalink / raw)
To: kai, torvalds; +Cc: ak, linux-kernel
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
# ---------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][2.5.22] fix x86 initrd breakage
2002-06-18 0:55 [PATCH][2.5.22] fix x86 initrd breakage Mikael Pettersson
@ 2002-06-18 1:53 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2002-06-18 1:53 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: kai, torvalds, ak, linux-kernel
> 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.
Thanks. I removed that statement for x86-64 from my tree.
-Andi
>
> --- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-06-18 1:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-18 0:55 [PATCH][2.5.22] fix x86 initrd breakage Mikael Pettersson
2002-06-18 1:53 ` Andi Kleen
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®