Installation Ramdisk Guide
The purpose of the installation ramdisk is to create a small root file
system that contains all of the necessary scripts and binaries to automatically
install Linux over a network connection. Theoretically, the process should be
hands-free after the 'n' key is pressed to start the net-boot procedure. The
cluster HOWTO has a nice overview of the process in
To begin with, create a directory named
unpack the compressed tar of our own ramdisk.
Any necessary libraries, binaries, and device files can be place in this
Notice first that all of the necessary files have been placed in
dev, lib, etc, and sbin. All other directories are either links to these
directories or mount points for file systems. This makes the task of
managing the files much easier.
Notice also that sbin/init is now a link to sbin/setup.py, which is a
python script. Understanding this script is the key to understanding the
installation process. This process will be run instead of init, making
setup.py the controlling process. All disk formatting and file copying
occurs through this script.
Some of the files on our ramdisk are no longer being used, but are still
included for reference. Among these is rsync, which is demonstrated in
commented code in setup.py.
A walkthrough of setup.py
The script begins by initializing some constants, mounting /proc, and
starting the network and portmap. Most of this is accomplished through
calls to other programs and scripts in sbin. Note that if you are having
problems, you can add a debug shell to the script, remake the romfs
image, and poke around a bit. When you are done using the shell, type
'exit' and the script will continue.
At this point, the script zeroes the partition map and opens pdisk in
interactive mode. The partition table for /dev/hda is chosen for editing,
an hfs boot partition is created, and the linux swap and root partitions
are created. Output from pdisk is written to the screen, and the
partitions are formatted.
After the root file system is mounted, installation can begin. Note the
commented code containing an installation method that uses rsync to copy
files from the node image on the server to /real-root. For various
reasons including an apparently faulty processor on one of our nodes that
only choked on rsync (straight out of the "Huh?" files), we have been
experimenting with the second form of installation found here which
consists of mounting the node image via NFS and using a piped tar command
to copy files with permissions intact. The -p option preserves file
properties, and the -v option on the second tar prints every copied file
to stdout, where it is routed to /real-root/tar-log.
After moving the log files and setting up environment variables, the hfs
utilities are used to format the hfs partition for booting. The
bootloader (yaboot) is copied into /boot on the hfs partition along with
yaboot.conf and a backup kernel. Yaboot's type is set to 'tbxi' and the
/boot is "blessed," making it the boot directory. The Macintosh boot
process will now boot from yaboot.
Once everything is done, the system unmounts file systems and reboots.
Once you are done, use genromfs to create the ramdisk image and place it
in /tftpboot along with yaboot and your netboot kernel. We use a
script for convenience. Notice the
image can be compressed.
Some tips about yaboot
Back to the G4 Cluster Howto
Once the system has rebooted and is running, you can mount the boot
directory as an hfs file system and change yaboot.conf
or update the backup kernel. Yaboot.conf takes the same options as lilo
and other bootloaders.
Back to the G4 Cluster homepage
Back to the SCL homepage