Build a custom OSRCD
- This assumes you have access to a Linux workstation with a CD burner.
- This assumes /home/osrcd is the "working directory." You can change this to suit your system, but remember to make the changes in all the commands listed here
- Do you have the hardware necessary to create the CD?
- A Linux system with a CD-R drive (running a "recent" distro)
- 128 MB RAM is minimum (more is always better)
- Approx 1-1.5 GB free hard disk space (enough to hold twice the contents of the original OSRCD plus all PKGs you're adding)
- Does your system have the necessary software (tar, mkisofs, and cdrecord)?
- Do the PKG file(s) you're adding to the CD operate as intended when installed through the UI?
- Do you have a correct version of the official Sun Cobalt OS Restore CD for your product? (For instance, if your PKG file modifies a Sun Cobalt RaQ 4r, you must have a copy of the RaQ 4r CD.)
- If you are using an ISO from Sun Cobalt (ftp://ftp.cobalt.sun.com/pub/iso/)
- Complete steps 1, 4 and 5 below
- cd to the directory that contains the downloaded ISO image
- gunzip isoname.iso.gz
- mount -o loop isoname.iso /mnt/cdrom
- continue with step 6 below
Rip the Sun Cobalt OSRCD to your hard drive
1. Log in as root on your GNU/Linux system
2. Insert the original Sun Cobalt OSRCD into your CD-ROM device
3. Mount the CD-ROM (assuming /dev/hdc)
- mount /dev/hdc /mnt/cdrom
4. Check for free disk space:
- df -h
5. Create a directory to hold the OSRCD contents (on a partition with 1-1.5GB of free space):
- mkdir -p /home/osrcd
6. Copy the CD-ROM contents to the new directory:
- cd /mnt/cdrom
- tar -c * | tar -C /home/osrcd -xf -
Change the partition sizes
Check the Change Partition Size On OSRCD partition change HOWTO for steps on changing the default partition sizes to give more room in / and/or /var.
Add your PKG file(s) to the new OSRCD filesystem (Linux)
PKG files should be named so that they appear alphabetically in the order you wish them to be installed when doing an ls -l command. The easiest way to do this is to prepend "00" "01" 02" etc in front of each filename.
Example: You want "my-daemon" to be installed first, then "my-config", then "my-archiver". Do the following (in whatever directory the PKG files are stored):
- cd /my/pkgfile/directory
- cp my-daemon.pkg 00my-daemon.pkg
- cp my-config.pkg 01my-config.pkg
- cp my-archiver.pkg 02my-archiver.pkg
Switch to the bundles directory in the directory you've already made
- cd /home/osrcd/nfsroot-x86/bto-sync/bundles
Copy your PKG files (individually)
- cp /my/pkgfile/directory/00my-daemon.pkg .
- cp /my/pkgfile/directory/01my-config.pkg .
- cp /my/pkgfile/directory/02my-archiver.pkg .
or via wildcard (if you know you want to copy all the PKG files in the current directory)
- cp /my/pkgfile/directory/*.pkg .
Double-check the order in which they will be installed
- ls -l
Add your new PKG file(s) to the new OSRCD filesystem (Windows)
- Open the OS Restore CD .ISO with WinISO or other similar program
- Rename your updates as mentioned above
- Drag all updates to /nfsroot-x86/bto-sync/bundles/
- Save the updated ISO image
- Burn the new OSRCD
(Not work for me. The ISO image saved by WinISO, is not possible to bootup. It will hang before the agreement. [MacBoy, 12May2005])
Create a new ISO-9660 image of the modified CD contents
- cd /home/osrcd
- mkisofs -P YourName -b boot/eltorito.img -c boot/boot.catalog \
- -R -l -L -J -o /tmp/filename.iso .
Note: the trailing period (preceded with a space) is part of the mkisofs command!
Note: the second switch on the second line above is a small "L" -- not the number one!
Note: if YourName has whitespace in it, then put quotes around it ("Your Name")
This step creates an ISO image of your new OSRCD, named filename.iso, in the /tmp directory. We provide directions here how to burn the ISO to a CD under Linux using cdrecord. You can also transfer this ISO image (via FTP, etc) to another computer if that one has your CD burning software/hardware already installed.
Burn the new ISO image to a CD
1. Insert a blank CD-R or CD-RW disk into your CD-R/CD-RW drive
2. Continuing from the above example, type this command
- cdrecord -v /tmp/filename.iso
The cdrecord command shown assumes your CD-R drive is properly installed and configured. You may need to specify the driver, driver options, device, or other such options. Use man cdrecord for more info on switches, etc., you can add to the cdrecord command.
3. Wait while the CD is burned. The time to wait is dependent on the size of the ISO image you are burning, and the write speed of your CD-R/CD-RW drive. Total time could be anywhere from 5 minutes to almost an hour. By using the -v switch, you will be kept informed by cdrecord of it's progress, etc.
4. Test the OSRCD by rebuilding a server with it.