Creating a Linux Jumpstart
From Docupedia
Contents |
Before you begin
This document was written using a SuSE Linux 10.0 server as the install platform. The instructions for the most part should apply to any Linux distribution with minor modifications. To attempt this process, the reader should have an understanding of NFS and be comfortable working on the command line. Finally, all commands are expected to be run as a non-privileged user. For the commands which require privilege, "sudo" is prefixed. If you have a working sudo install, no modifictions should be necessary. If you do NOT have a working sudo install, simply "su" to root before executing each command.
Install the required software
Install the daemons
- bootparamd: A reference implementation can be found in the Linux Netkit. This package is apparently no longer maintained. Find the packages at [1]. Alkaloid Networks also has an RPM available (FIXME: Add RPM link)
- rarpd: SuSE provides this as a package, however it lacks an init script. An updated RPM is available from Alkaloid Networks at (FIXME: Add RPM link).
- tftp: Install the tftp RPM. Note that in at least some testing the atftp package did not work well with the Sparc servers. tftp has worked flawlessly so far.
- NFS server: Install the nfs-utils RPM.
Load Operating System Media
You will need to acquire copies of the Solaris media you wish to jumpstart. Solaris 9 and 10 are freely downloadable from Sun.com. Solaris 8 media can be found easily. All releases since Solaris 8 allow unlimited licensing. The author of this document has no use for Solaris 7 or earlier so it is untested, but should work (at least in theory).
When creating a Jumpstart server, Sun instructs the use of a script called "install_jumpstart_server" in the Tools directory of the Solaris media. Due to some minor differences between Solaris and Linux, a few tweaks need to be made on the Linux server to allow these scripts to run.
- Symlink utilities into locations where the Solaris script expects to find them:
sudo ln -s /bin/sed /usr/bin/sed sudo ln -s /usr/bin/gdb /usr/bin/adb sudo ln -s /bin/tar /bin/bar
- You'll also need to create a "mach" replacement:
echo "#!/bin/bash" > /tmp/mach echo "uname -p" >> /tmp/mach chmod 755 /tmp/mach sudo chown root:root /tmp/mach sudo mv /tmp/mach /bin
- Sun got creative and decided to put the root filesystem for the installer in a separate slice on the CD media. Because of this, you'll have to actually mount both slices on the Linux server so the script can access everything it needs.
Mount the first slice:
sudo mkdir /s0 # Using .iso CDROM images: sudo mount -o loop /path/to/solaris-disc-1.iso /s0 # # Using an actual CD: sudo mount /dev/cdrom /s0
Next, determine the offset of the second slice:
# Using .iso CDROM images: shell$ fdisk -l /path/to/solaris-disc1.iso Disk /path/to/solaris-disc1.iso (Sun disk label): 1 heads, 640 sectors, 2048 cylinders Units = cylinders of 640 * 512 bytes Device Flag Start End Blocks Id System /path/to/solaris-disc1.iso1 r 0 788 252160 4 SunOS usr /path/to/solaris-disc1.iso2 r 788 2107 422080 2 SunOS root /path/to/solaris-disc1.iso3 2107 2111 1280 0 Empty /path/to/solaris-disc1.iso4 2111 2115 1280 0 Empty /path/to/solaris-disc1.iso5 2115 2119 1280 0 Empty /path/to/solaris-disc1.iso6 2119 2123 1280 0 Empty /path/to/solaris-disc1.iso7 2123 2127 1280 0 Empty # If using an actual CD, replace /path/to/solaris-disc1.iso with the # device for the CDROM drive.
Two important things to note:
- "Units = cylinders of 640 * 512 bytes": This defines the size of each cylinder which is required to calculate the offset
- "788": The number in the "Start" column of the second slice is the starting cylinder of that slice.
To calculate the offset of the second slice, multiply those numbers together:
788 * 640 * 512 = 258211840
258211840 is the offset of the second slice.
- Create a second loopback device and mount the second slice:
# Using a .iso CDROM image shell$ sudo losetup -o 258211840 /dev/loop1 /path/to/solaris-disc1.iso # Using an actual CD shell$ sudo losetup -o 258211840 /dev/loop1 /dev/cdrom
# Mount the slice shell$ sudo mkdir /s1 shell$ sudo mount -t ufs -o ro,ufstype=sun /dev/loop1 /s1
- Next create the area which will hold the Solaris media. While this layout is not strictly required, it has been our experience that this layout provides the flexibility needed to be able to use one Jumpstart server to install difference releases of Solaris (including two releases of the same version).
- Create the top-level "install" and "config" directories:
sudo mkdir -p /export/jumpstart/{install,config}
Note: The "config" directory is only used for unattended installs.
- Underneath the "install" directory, one directory per Solaris version should be created:
sudo mkdir -p /export/jumpstart/install/Solaris10 sudo mkdir -p /export/jumpstart/install/Solaris9 sudo mkdir -p /export/jumpstart/install/Solaris8
