How to boot from Solaris OS CD/DVD when system fails to boot and the boot disk is encapsulated.
There are times when a system with an encapsulated boot disk may fail to boot. There may be many reasons for boot failure. The purpose of this technote is limited in scope to providing a procedure that will allow the system to boot to multi-user mode using the system cdrom. This technote is not intended to provide detailed troubleshooting techniques when the system fails to boot.
First and foremost, boot from the mirrored boot disk if one is available. Check Technote 185800 for procedures to locate the mirror boot disk in eeprom, and to boot from the mirror boot disk. Ignore this technote if a mirror boot disk is indeed available.
In case the mirrored boot disk is not available, then boot from Solaris OS CD/DVD and unencapsulate the boot disk, before booting the system to multi-user mode.
The purpose of this technote is to provide a procedure that allows the systems administrator to get to the root volume via a system cdrom, unencapsulate the boot disk, restore the /etc/vfstab file to pre-Volume_Manager status, shut off VERITAS Volume Manager from the system boot cycle, and reboot the system.
If the system still fails to reboot, then the boot disk needs to be checked for hardware failure.
The recommended procedure has 6 key steps:
1. Boot the system up using a Solaris Operating System CD/DVD
2. Mount the root partition on mount-point /a
3. Unencapsulate the boot disk
4. Shut the VERITAS Volume Manager off in the boot cycle
5. Reboot the system to multi-user mode.
6. Restart VERITAS Volume Manager once the system is up
Step # 1: Boot the system up in the single user mode by using a Solaris Operating System CD/DVD.
This procedure will bring the system to the ok prompt level and issue a command to boot from Solaris system CD/DVD in a single-user mode.
a) Insert the current Solaris software CD/DVD (the Solaris version currently used by the system) in the CD/DVD drive.
b) Bring the system to OK prompt if the system is currently running on Solaris Operating System and screen prompt is either # or $.
# init 0
ok <---------- system response
In case the system is hung, the "stop-A" key sequence (or L1-a on older keyboards) must be used to interrupt the system.
c) Boot the system in single user mode:
ok boot cdrom -s
Step # 2: Mount the root partition on mount-point /a:
The purpose of this process is to mount the root partition of system boot disk in order to access files needed for boot disk unencapsulation.
a) When prompted to log-in, do so as root. This will result in a Solaris screen.
b) Open a new window and create a directory /a
# mkdir /a
c) Mount the root directory on the boot disk on mount-point /a
Assuming that the system boot-disk is c0t0d0, the path for the root partition on the system boot disk may be /dev/dsk/c0t0d0s0. This can be verified from the partition map in prtvtoc output for the boot disk if available.
# mount -F ufs /dev/dsk/c0t0d0s0 /a
In some cases, system may prompt to run fsck and then to try the mount again. In such a case, run a fsck on the root partition of the boot disk:
# fsck -F ufs /dev/rdsk/c0t0d0s0
After a successful fsck, try to mount the root partition again:
# mount -F ufs /dev/dsk/c0t0d0s0 /a
Step # 3: Unencapsulate the boot disk.
This process will involve editing of the /etc/system file, and replacing the current /etc/vfstab file with the saved /etc/vfstab.prevm file.
a) Edit the /etc/system file in /a directory:
# vi /a/etc/system
b) Scroll down in this file till the section beginning with '* vxvm_start ....' shows up. Remove to comment out using "* " two lines as shown:
Remove or change to:
NOTE: Commenting out lines in /etc/system file requires use of * instead of #.
c) Save and close the /a/etc/system file.
d) Replace the /a/etc/vfstab file with /a/etc/vfstab.prevm file.
e) Archive this vfstab file for future reference using today's date (optional):
# cp /a/etc/vfstab /a/etc/vfstab.date
f) Copy the pre-Volume-Manager vfstab file to the current vfstab:
# cp /a/etc/vfstab.prevm /a/etc/vfstab
This will return the vfstab to the original pre-Volume-Manager version where raw partitions are mounted instead of root volumes, as shown in this sample:
#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 -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /usr ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /var ufs 1 no -
swap - /tmp tmpfs - yes -
Step # 4: Reboot the system without VERITAS Volume Manager:
This process will shut off VERITAS Volume Manager such that vxvm daemons will not start. VERITAS Volume Manager will not start until it is manually started.
a) Touch install-db file to turn Volume Manager off in the boot cycle.
# touch /a/etc/vx/reconfig.d/state.d/install-db
Please note that this is a crucial step. A failure to touch the install-db file may result in an inability to boot. This may result in a need to boot again from CDDVD in installation mode and touch the install-db file.
b) Unmount /a
# cd /
# umount /a
Step # 5: Reboot the system
If the system comes back in multi-user mode, it will do so without VERITAS Volume Manager. Command "ps -ef | grep vx" will show that VxVM daemons (vxconfigd, vxnotify & vxrelocd) are not running.
If the system does not come back to multi-user mode, then there may be non-VERITAS problems in the boot disk. Diagnostics on the boot disk must be performed and the boot disk must be replaced or recovered from back-up.
Step # 6: Restart VERITAS Volume Manager once the system is up:
Once the system is up, VERITAS Volume Manager may be restarted by removing the install-db file and by running a given set of commands to restart the volume manager.
a) Remove the install-db file.
# rm /etc/vx/reconfigd.d/state.d/install-db
b) Restart VERITAS Volume Manager:
# vxiod set 10
# vxconfigd -m disable
# vxdctl init
# vxdctl enable
CAUTION: The process to start VERITAS Volume Manager must be modified if EMC arrays are in use with the system. Please consult EMC manuals for the required modifications.
Restart all volumes:
This process will restart all volumes.
Start all volumes in all diskgroups.
# vxvol startall
Or, start all volumes in a given diskgroup.
# vxvol -g <diskgroup_name> startall
Or, start one volume at a time.
# vxvol -g <diskgroup_name> start <volume_name>
Please note that at this point the boot disk is NOT encapsulated. The rootdg will not have root volumes including rootvol, usr, var and swapvol.