Home > Articles > Operating Systems, Server > Solaris

  • Print
  • + Share This
Like this article? We recommend

Building a Customized, Bootable Installation

Now we are ready to create the image of the customized Solaris OE. Two packages, SUNWcdrw and SUNWmkcd, are required to assist in this process.

To Build a Customized, Bootable Installation

  1. Use the pkginfo command to check your system for the required packages, as shown in the following example:

  2. # pkginfo SUNWcdrw SUNWmkcd
    system   SUNWcdrw    utility for writing to CD-R/RW disks
    system   SUNWmkcd    CD creation utilities
  3. Use the mkisofs command to create the image by combining the VTOC and slices, as shown in CODE EXAMPLE-8.

  4. By using the mkisofs command, which is part of the SUNWcdrw package, you can create your CD image.

    CODE EXAMPLE-8 Creating the CD Image

    # mkisofs –R –d –L –l –o ${BASEDIR}/sol8.s0 ${BASEDIR/s0
              .
              .
              .
    Total extents actually written = 233153
    Total translation table size: 0
    Total rockridge attributes bytes: 3987542
    Total directory bytes: 22243328
    Path table size(bytes): 158286
    Max brk space used 159a000
    233153 extents written (455 Mb)
    
    # dd if=sol8.s0 of=/export/core/new.sol8.s0 bs=512 skip=1
    
    1065599+0 records in
    1065599+0 records out
  5. Add 1 to the sectors for slice 0 to pad the VTOC, so that it functions correctly with the CD.

  6. The VTOC needs to be padded correctly to function with the CD. Therefore, the pad is created by adding 1 to the sectors for slice 0 (s0) and having the sum subtracted by the number of sectors in the original (unmodified) slice 0 of the CD, as shown with the prtvtoc command in CODE EXAMPLE 9.

    CODE EXAMPLE 9 Padding the VTOC

    # bc
     1070720 - (1065599+1))
    5120
    # dd if=/dev/zero of=pad.s0 bs=512 count=3840
     5120+0 records in
     5120+0 records out
    # cd /export/core
    # cat sol8.cdrom.vtoc new.sol8.s0 pad.s0 sol8.s1 sol8.s2 sol8.s3 sol8.s4 sol8.s5 >
      /export/core/cd.image
    # cdrw –d cdrom0 –I cd.image
     Initializing the device___done.
     Done.
     Finalizing (can take up to 4 minutes)..done.

    We created a script to help automate the creation of the bootable CD image. The script in CODE EXAMPLE-10 includes the commands that were listed in the previous code examples in this section. The script provides error messages based upon incorrect sizing of the slices for the CD.

    CODE EXAMPLE-10 Script Sample for Building a Bootable Installation CD

    # 
    #>.. !/bin/ksh -x
    BASEDIR=´pwd´
    SLICE_0_SIZE=1070720
    IMAGENAME=sol8cd.image
    
    
    
    if [ ! -d s0 ]; then
        echo "Cannot continue: s0 directory does not exist."
        exit 1
    fi
    
    rm ${BASEDIR}/${IMAGENAME} ${BASEDIR}/pad.s0 ${BASEDIR}/new.sol8.s0 ${BASEDIR}/sol8.s0
    
    mkisofs -R -d -L -l -o ${BASEDIR}/sol8.s0 ${BASEDIR}/s0
    
    FSSIZE=$(dd if=${BASEDIR}/sol8.s0 of=${BASEDIR}/new.sol8.s0 bs=512 skip=1 2>&1 |     head -1 | cut -d+ -f1 )
    
    echo $FSSIZE
    
    PADBLOCKS=$(( $SLICE_0_SIZE - ($FSSIZE + 1) ))
    
    if [ $PADBLOCKS -lt 1 ]; then
        echo "Cannot continue: Slice 0 is too large."
        echo "Need to remove an estimated $(( $PADBLOCKS / 2 ))k of files"
        exit 1
    fi
    dd if=/dev/zero of=${BASEDIR}/pad.s0 bs=512 count=$PADBLOCKS
    
    cd ${BASEDIR}
    cat sol8.cdrom.vtoc new.sol8.s0 pad.s0 sol8.s1 sol8.s2 sol8.s3 sol8.s4 sol8.s5 > ${IMAGENAME}

    If you run this script, it creates a cd.image file. This file contains all the necessary information needed to build a core Solaris OE. Therefore, if no errors are reported during the creation of the CD, your image is ready for installation. Typically, errors that occur during the creation of an image are caused by an incorrect pad size and/or a slice being too large.

  7. Write the CD image onto disk using the following command:

  8. # cdrw -d cdrom0 -i /export/core/cd.image
  9. After the image is written to CD, test the CD image by using the following command to boot the CD from the OK prompt on your test client Solaris OE system:

  10. CODE EXAMPLE-11 Testing the CD

    ok boot cdrom - install
    Resetting ... 
    
    Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard
    OpenBoot 3.31, 128 MB (50 ns) memory installed, Serial #11024924.
    Ethernet address 8:0:20:a8:3a:1c, Host ID: 80a83a1c.
    
    Rebooting with command: boot cdrom - install             
    Boot device: /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f File and args: - install
    SunOS Release 5.8 Version Generic_108528-11 64-bit
    Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
    Configuring /dev and /devices
    Type 'go' to resume
    ok boot cdrom - install
    Resetting ... 
    
    Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard
    OpenBoot 3.31, 128 MB (50 ns) memory installed, Serial #11024924.
    Ethernet address 8:0:20:a8:3a:1c, Host ID: 80a83a1c.
    
    Rebooting with command: boot cdrom - install             
    Boot device: /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f File and args: - install
    SunOS Release 5.8 Version Generic_108528-11 64-bit
    Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
    Configuring /dev and /devices
    Using RPC Bootparams for network configuration information.
    Skipping interface hme0
    Searching for configuration file(s)...
    The system is coming up. Please wait.
    in.rdisc: No interfaces up
    
    The Solaris Installation Program
               .
               .
               .
    
    Starting Solaris installation program...
    Searching for JumpStart directory...
     <<< Using CD Default >>>
    Checking rules.ok file...
    Using profile: Profiles/toolkit.profile
    Using finish script: Drivers/secure.driver
    Executing JumpStart preinstall phase...
    Searching for SolStart directory...
    Checking rules.ok file...
    Using begin script: install_begin
    Using finish script: patch_finish
    Executing SolStart preinstall phase...
    Executing begin script "install_begin"...
    Begin script install_begin execution completed.
    
    Processing default locales
    - Specifying default locale (en_US)
    
    Processing profile
    - Selecting cluster (SUNWCreq)
    
    Installing 64 bit Solaris packages
    - Selecting cluster (SUNWClux)
                .
                .
                .
    Verifying disk configuration
    - WARNING: Changing the system's default boot device in the EEPROM
    
    Verifying space allocation
    - Total software size: 198.24 Mbytes
    
    Preparing system for Solaris install
    Configuring disk (c0t0d0)
    - Creating Solaris disk label (VTOC)
    
    Creating and checking UFS file systems
        - Creating / (c0t0d0s0)
        - Creating /var (c0t0d0s3)
        - Creating /opt (c0t0d0s6)
    
    Beginning Solaris software installation
    
    Starting software installation
        SUNWkvmx.u..done. 197.91 Mbytes remaining.
                .
                .
                .
    
    Completed software installation
    
    Solaris 8 software installation succeeded
    
    Customizing system files
        - Mount points table (/etc/vfstab)
        - Network host addresses (/etc/hosts)
    
    Cleaning devices
    
    Customizing system devices
        - Physical devices (/devices)
        - Logical devices (/dev)
    
    Installing boot information
        - Installing boot blocks (c0t0d0s0)
        - Updating system firmware for automatic rebooting
    
    Installation log location
        - /a/var/sadm/system/logs/install_log (before reboot)
        - /var/sadm/system/logs/install_log (after reboot)
    
    Installation complete
    Executing SolStart postinstall phase...
    Executing finish script "patch_finish"...
    
    Finish script patch_finish execution completed.
    Executing JumpStart postinstall phase...
    Executing finish script "Drivers/secure.driver"...
    
    ================================================================
    secure.driver: Driver started.
    ================================================================
               .
               .
               .
    ================================================================
    secure.driver: Starting finish script: install-recommended-patches.fin
    ================================================================
    
    Checking installed patches...
    Verifying sufficient filesystem capacity (dry run method)...
    Installing patch packages...
    
              .
              .
              .
    Resetting ... 
    
    Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard
    OpenBoot 3.31, 128 MB (50 ns) memory installed, Serial #11024924.
    Ethernet address 8:0:20:a8:3a:1c, Host ID: 80a83a1c.
    
    Re-enter your root password.
    
    Press Return to continue. 
    
    System identification is completed.
    syslog service starting.
    The system is ready.
    
    |-----------------------------------------------------------------|
    | This system is for the use of authorized users only.            |
    | Individuals using this computer system without authority, or in |
    | excess of their authority, are subject to having all of their   |
    | activities on this system monitored and recorded by system      |
    | personnel.                                                      |
    |                                                                 |
    | In the course of monitoring individuals improperly using this   |
    | system, or in the course of system maintenance, the activities  |
    | of authorized users may also be monitored.                      |
    |                                                                 |
    | Anyone using this system expressly consents to such monitoring  |
    | and is advised that if such monitoring reveals possible         |
    | evidence of criminal activity, system personnel may provide the |
    | evidence of such monitoring to law enforcement officials.       |
    |-----------------------------------------------------------------|
    
    unknown console login:
  • + Share This
  • 🔖 Save To Your Account