[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] How to make a custom OSRCD



Using this "how to" you can build your own OSRCD images, and add PKG
files (updates from Sun Cobalt, your own stuff, etc) to the CD and 
have them automatically installed whenever you rebuild an appliance.


** THIS PROCEDURE IS UNOFFICIAL/UNSUPPORTED -- USE AT YOUR OWN RISK **



BUILDING A "CUSTOM" OS RESTORE CD

- Some/all of these steps might be possible on a Windows box or Mac, 
  but have not been tested
- 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



QUALIFICATIONS
  
1. Do you have the hardware necessary to create the CD?

   a. A GNU/Linux system with a CD-R drive (running a "recent" distro)
   b. 128 MB RAM is minimum (more is always better)
   c. 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)

2. Does your system have the necessary software (tar, mkisofs, and
   cdrecord)?

3. Do the PKG file(s) you're adding to the CD operate as intended 
   when installed through the UI?

4. 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 official RaQ 4r CD that shipped with your
   server.



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 /home/osrcd
   
6. Copy the CD-ROM contents to the new directory:

   # cd /mnt/cdrom
   # tar -c * | tar -C /home/osrcd -xf -
   

   
ADD YOUR PKG FILE(S)
   
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: I want "my-daemon" to be installed first, then "my-config", 
then "my-archiver".  I would do the following (in whatever directory
my 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

If you are only adding a single PKG file, then you don't need to
worry about this step.
   

1. Switch to the "bundles" directory:
   
   # cd /home/osrcd/nfsroot-x86/bto-sync/bundles
   
2. 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 _all_ PKG files in the
   directory):
   
   # cp /my/pkgfile/directory/*.pkg .
   
3. Double-check the order in which they will be installed:

   # ls -l



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 -o /tmp/filename.iso .
     
Note: the trailing period (preceded with a space) is part of the
      mkisofs command!
      
Note: the third 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")

Note: use "man mkisofs" to see what the various switches are for

This makes 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 YOUR 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

Note: the cdrecord command listed above 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.

      For example, on my system I use:

      # cdrecord -v dev=0,0,0 speed=32 filename.iso

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. Rebuild a Cobalt system to test your new OSRCD



RAQ4-SPECIFIC FILE LIST SUGGESTION

As of 29 May 2002, here is the list of PKGs (with modified names to
set proper installation order) that I add to a standard RaQ4/i/r 
OSRCD:

01RaQ4-All-System-0.0.1-7657.pkg
02RaQ4-All-Security-0.0.1-8061.pkg
03RaQ4-en-OSUpdate-1.0.pkg
04RaQ4-All-Security-1.0.3-8762.pkg
05RaQ4-All-System-1.0.1-9882.pkg
06RaQ4-All-Security-1.0.1-10602.pkg
07RaQ4-All-Kernel-1.0.1.216C28III.pkg
08RaQ4-en-OSUpdate-2.0.pkg
09RaQ4-All-System-2.0.1-12854.pkg
10RaQ4-All-Kernel-2.0.1-2.2.16C32III.pkg
11RaQ4-All-Security-2.0.1-13453.pkg
12RaQ4-All-Security-2.0.1-14039.pkg
13RaQ4-All-System-2.0.1-13993.pkg
98RaQ3-RaQ4-OpenSSH-3.1p1-1.pkg   (from http://www.pkgmaster.com)
99RaQ4.PKG-chiliasp-3.6.0C-7.P2.pkg  (from ftp://ftp.chilisoft.com)


Generally, you would want to list all PKGs from the download page 
(http://www.cobalt.com/support/download/), in reverse order, to
ensure your CD image is "up to date"

TIP: If you can spare the disk space, leave the /home/osrcd tree
     intact. Then when new PKGs are available, simply copy them
     into the bundles directory (with proper number "nn" prepended)
     and rerun the mkisofs and cdrecord commands to make a new CD.


NOTES:

The SSH package is UNOFFICIAL and UNSUPPORTED. I include it for
the extra security it adds to the server.

The Chili!Soft PKG must be added AFTER all other PKGs (especially
the ones containing Apache upgrades). Play it safe, and put it at
the end of your PKG list.


** THIS PROCEDURE IS UNOFFICIAL/UNSUPPORTED -- USE AT YOUR OWN RISK **

--
Bruce Timberlake
Sun Cobalt Technology Engineer
Sun Microsystems, Inc.