This procedure is needed when an important file, such as /etc/passwd, has an invalid entry and is causing the boot process to fail.
If you need help identifying a system's device names, refer to Chapter 20, Accessing Devices (Overview).
Follow the instructions below depending on whether you are booting from the Solaris installation CD or the network.
|
If You Are Booting From ... |
Then ... |
|---|---|
|
Solaris installation CD |
1. Insert the Solaris installation CD into the CD caddy. 2. Insert the CD caddy into the CD-ROM drive. 3. Boot from the installation CD in single-user mode: ok boot cdrom -s |
|
The network and an installation server or remote CD drive are available |
Use the following command: ok boot net -s |
Mount the file system that has the file with an invalid entry.
# mount /dev/dsk/device-name /a |
Change to the newly mounted directory.
# cd /a/directory |
Set the terminal type.
# TERM=sun # export TERM |
Remove the invalid entry from the file using an editor.
# vi filename |
Change to the root (/) directory.
# cd / |
Unmount the /a directory.
# umount /a |
Reboot the system.
# init 6 |
Verify the system boots to run level 3.
The login prompt is displayed when the boot process has finished successfully.
hostname console login: |
The following example shows how to repair an important system file (in this case, /etc/passwd) after booting from a local CD-ROM.
ok boot cdrom -s # mount /dev/dsk/c0t3d0s0 /a # cd /a/etc # TERM=sun # export TERM # vi passwd (Remove invalid entry) # cd / # umount /a # init 6 |