Introduction:
Problem:
Trying to install YDL on a machine with limited memory will result in the install failing during disk partitioning due to memory exhaustion. The symptom is the following messages while formatting the disk:
TerminatedThe memory exhaustion can be verified by accessing virtual terminal 4 (press Option-F4 or Command-Option-F4), where kernel messages are displayed. You should see:
install exited abnormally
sending termination signals...done
sending kill signals...done
you may safely reboot your system
Out of Memory: Killed process 14 (yi).
Scope:
This was tested using YDL 2.2 downloaded from the official ftp site on April 12 2002. However, it appears that all 2.x versions of YDL may require significant amounts of memory during install. The machine was a MAC 7200/120 with 32MB of RAM, and stock Apple hardware (1.2GB hard drive). This should be applicable to any MAC with limited memory (certainly with 32MB, I cannot determine if it is required when 48MB of RAM is installed). The MAC OS used was 7.5.3, though this document makes no mention of problems specific to that os version -- see install_oldmachine.shtml
Details
Cause:
YDL requires a 16MB RAM disk for installation. In a 32MB system, this leaves only 16MB for the kernel and all processes. The YDL installer is written in Python, and consumes the vast majority of the remaining memory. Formatting partitions (particularly large ones) requires more memory than remains available. When memory is exhausted, the kernel kills the install process, resulting in a system halt.
Workaround:
1) Begin by following the "Preparation" instructions in the Install Guide. Be sure to choose ramdisk-text.image.gz as the Linux Ramdisk in BootX.
Those who are very familiar with parted may wish to skip to step 6 and create all Linux partitions manually. However, it is a bit easier to let the installer create the partitions and only requires one extra reboot. Also, if you have less than 32MB the installer probably will not run at all. In this case, you may try skipping to step 6 and partitioning manually. Then create a device node for the swap partition with mknod and activate it with swapon before starting the installer in step 10 (I have not tested this).
2)Continue following the Install Guide. At this point I believe you can use either Default or Custom Install, though I have only tested it with Custom.
3) When creating disk partitions, remember the name of the disk(s) on which you are creating them. This will be the partition name with the last number removed -- something like "sda" for SCSI disks or "hda" for IDE.
4) After creating disk partitions and selecting "Save", you should see the "Formatting" message box and get the following error:
Terminated5) Reboot using the power button.
install exited abnormally
sending termination signals...done
sending kill signals...done
you may safely reboot your system
6) Time to get a really big hammer and beat this thing into submission. [:)] In BootX, in the box labelled "More kernel arguments" enter
init=/bin/shChoose the Ramdisk just like before and boot into Linux again.
7) The installer will not start up. Instead you will get a few messages and a root prompt (# at the beginning of the line). We will now format the partitions manually.
8) First the device nodes for the disks need to be created. For SCSI disks, the following commands will do:
mknod /dev/sda b 8 0Continue in the above pattern (adding 16 to the last number) for each actual physical hard drive you need to format (you only need /dev/sda if you only have one drive, but extras won't hurt). For ide drives use:
mknod /dev/sdb b 8 16
mknod /dev/hda b 3 0 mknod /dev/hdb b 3 64 mknod /dev/hdc b 22 0 mknod /dev/hdd b 22 64as necessary (once again, extras don't hurt).
9) Now, enter the command:
parted /dev/sdaReplace "/dev/sda" with the name of the drive you need to format (from step 3). You will see some messages and a "(parted)" prompt. Inside parted do the following:
9a) enter the command:
9b) Format the swap partition. Enter the command
mkfs (swap-num) linux-swapwhere
9c) Format other Linux partitions. Use the command
mkfs (num) ext2for each
9d) enter the command:
9e) exit parted with the command:
quit10) Continue the normal install by entering:
initat the command prompt (#).
11) Make sure to choose "Custom" install. The install will fail if you use "Default".
12) Follow the normal installation procedure until you get to "Drive Partitioning".
13) Select "Drive Partitioning", then immediately choose the "Done" pushbutton.
14) Continue with normal installation. Once mount points are specified, the installer will activate swap space, creating sufficient memory for the installation to proceed.
Closing
The key to this HOWTO is understanding that the init= kernel parameter specifies the first program that the kernel will run when it is done loading. Using init=/bin/sh drops you into the lowest-level, bare-bones system achievable under Linux.
This technique can be handy when all else fails, but requires a more detailed understanding of the operating system. As the old saying goes "When you want something done right, do it yourself." The machine will perform any number of tasks very well with 32MB of RAM. Examples include program development using emacs and gcc, DNS nameserver, and other low-load servers. It is even possible (and not unbearably slow) to run XWindows 3 with a lightweight window manager.
This HOWTO was written by Rob Dye





