Re: initrd/ramdisk problems, differences 2.2.1 vs. 2.2.5

Riley Williams (rhw@BigFoot.Com)
Sun, 25 Apr 1999 00:31:52 +0100 (GMT)


Hi Frank.

> I'm heavily using initrd and ramdisk for running and installing
> software from cdrom.

> The boot sequence runs as foolows from a bootable cdrom :

> * syslinux loads linux and initrd.gz, unpacks linux and initrd
> and run the application linuxrc. linuxrc does nothing else than
> installing either on harddisk or completely in RAM.

> - If I'm installing the software on harddisk, all installation
> is ok and I can use the software directly after setting
> real-root-dev (e.g. 769 for /dev/hda1 [b 3 1]) unmounting all
> fs and exiting linuxrc

> - If I'm installing the software in ramdisks (several, because of
> size), the messages are as follows with 2.2.1 :

> "VFS: Mounted root (ext2 filesystem)"
> "change_root: old root has d_count=1"
> "Trying to unmount old root ... okay"
> "Freeing unused kernel memory: 40k freed"
> "Kernel panic: Noinit found. Try passing init= option to kernel."

> And all is over.

===8<=== CUT ===>8===

> I'm using ramdisk_size=8192 in the append-line, but don't ask me
> to use normal ramdisk size 4096 without a fair chance that this
> will be the error.

If I've wanted a ramdisk larger than 4096k, I've always had to apply
the following patch:

===8<=== CUT ===>8===
--- drivers/block/rd.c~ Mon Jul 13 21:47:28 1998
+++ drivers/block/rd.c Sun Apr 11 00:18:19 1999
@@ -91,7 +91,7 @@
* architecture-specific setup routine (from the stored bootsector
* information).
*/
-int rd_size = 4096; /* Size of the ramdisks */
+int rd_size = 8192; /* Size of the ramdisks */

#ifndef MODULE
int rd_doload = 0; /* 1 = load ramdisk, 0 = don't load */
===8<=== CUT ===>8===

Also, I note the following in Documentation/ramdisk.txt which you may
wish to refer to:

Q> The old "ramdisk=<ram_size>" has changed to "ramdisk_size=<ram_size>"
Q> to make it clearer. The original "ramdisk=<ram_size>" has been kept
Q> around for compatibility reasons, but it will probably be removed in
Q> 2.1.x.

Q> The new RAM disk also has the ability to load compressed RAM disk
Q> images, allowing one to squeeze more programs onto an average
Q> installation or rescue floppy disk.

Q> Notes: You may have "/dev/ram" or "/dev/ramdisk" or both. They are
Q> equivalent from the standpoint of this document. Also, the new RAM
Q> disk is a config option. When running "make config", make sure you
Q> enable RAM disk support for the kernel with which you intend to
Q> use the RAM disk.

Based on that, you would wish to apply the above patch first, then
check that you have enabled ramdisks in the kernel before rebuilding
it. You would probably also wish to take advantage of the fact that
the ramdisk driver can load compressed ramdisk images.

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/