unixway > volume management > solaris > disksuite > boot cdrom

Performing maintenance when booted from cdrom

Introduction

If the system has to be booted from a cdrom or from the network ("boot cdrom" or "boot net") in order to perform maintenance, the operator needs to adjust for the existence of a mirrored operating system. Because these alternate boot devices do not include the drivers necessary for disksuite, they cannot be used to operate on state database replicas and Disksuite metadevices. This raises subtle issues addressed below.

Typically, the administrator is often under pressure while performing these types of maintenance. Because simple mistakes at this stage can render the system unusable, it is important that the process be well documented and tested prior to using it in production. Fortunately, this process is simpler than that for Veritas volume manager because there are no "de-encapsulation" issues to address.

Booting from cdrom with DiskSuite mirrored devices

In the example below, the server pegasus has two internal disks (c0t0d0 and c0t1d0) under Disksuite control. The operating system is mirrored between the two devices, with slices five and six on each disk employed for state database replicas. Assume that the administrator has forgotten the root password on this server, and needs to boot from cdrom in order to edit the shadow file.

  1. Insert the Solaris operating system CD into the cdrom drive and boot from it into single-user mode:

    ok boot cdrom -s
    
    Initializing Memory
    Rebooting with command: boot cdrom -s
    Boot device: /pci@1f,4000/scsi@3/disk@6,0:f  File and args: -s
    SunOS Release 5.8 Version Generic_108528-07 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
    
    INIT: SINGLE USER MODE
    #
    
  2. Fsck and mount the root disk's "/" partition in order to edit the /etc/shadow file:

    # fsck -y /dev/rdsk/c0t0d0s0

    # mount /dev/dsk/c0t0d0s0 /a

  3. Remove the encrypted password from the /a/etc/shadow file:

    # TERM=vt100; export TERM

    # vi /a/etc/shadow

    For example, if the entry for the root user looks like the following:

    root:NqfAn3tWOy2Ro:6445::::::

    Change it so that is looks as follows:

    root::6445::::::
  4. Comment out the rootdev entry from the /a/etc/system file:

    # vi /a/etc/system

    For example, change the line:

    rootdev:/pseudo/md@0:0,0,blk

    to

    * rootdev:/pseudo/md@0:0,0,blk

  5. Update the /a/etc/vfstab file so that it references simple disk slices instead of disksuite metadevices. Note that you only have to change those enties that correspond to operating system slices.

    For example, one would change the following /a/etc/vfstab file:

    #device             device             mount   FS      fsck    mount   mount
    #to mount           to fsck            point   type    pass    at boot options
    #
    fd                  -                  /dev/fd fd      -       no      -
    /proc               -                  /proc   proc    -       no      -
    /dev/md/dsk/d1      -                  -       swap    -       no      -
    /dev/md/dsk/d0      /dev/md/rdsk/d0    /       ufs     1       no      logging
    /dev/md/dsk/d4      /dev/md/rdsk/d4    /var    ufs     1       no      logging
    swap                -                  /tmp    tmpfs   -       yes     -
    
    to:
    #device             device             mount   FS      fsck    mount   mount
    #to mount           to fsck            point   type    pass    at boot options
    #
    fd                  -                  /dev/fd fd      -       no      -
    /proc               -                  /proc   proc    -       no      -
    /dev/dsk/c0t0d0s1   -                  -       swap    -       no      -
    /dev/dsk/c0t0d0s0   /dev/rdsk/c0t0d0s0 /       ufs     1       no      logging
    /dev/dsk/c0t0d0s4   /dev/rdsk/c0t0d0s4 /var    ufs     1       no      logging
    swap                -                  /tmp    tmpfs   -       yes     -
    
  6. Unmount the root filesystem, fsck it, and return to the ok prompt:

    # cd /; umount /a; fsck -y /dev/rdsk/c0t0d0s0

    # stop-a
    ok

  7. Boot from c0t0d0 into single user mode. It is important to boot just to single user mode so that DiskSuite does not start automatically:

    ok boot -sw

  8. When prompted for the root password, just press the ENTER key. Once at the shell prompt, clear the metadevices that referenced the filesystems that you updated in the /a/etc/vfstab file above:

    # metaclear -f -r d0 d1 d4

    Now would be an appropriate time to create a new password for the root account, via the passwd root command

  9. Exit from single user mode and continue the boot process.

    # exit

    The system should now boot cleanly, but will now be running on a single disk, and would not survive the failure of that disk. In order to restore operating system redundancy, follow the procedure for mirroring the operating system