Recovering from a invalid /etc/passwd file is used as an example of how to boot a system for recovery purposes.
Substitute the device name of the file system to be repaired for the devicename variable identified in the procedures below. 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 2.x installation CD or the network.
Boot from the Solaris 2.x installation CD (or the network) to single-user mode using steps a-f.
If you are booting from the network, skip steps a and b.
Insert the Solaris 2.x installation CD into the CD caddy.
Insert the CD caddy into the CD-ROM drive.
Insert the Configuration Assistant/Boot Diskette into the primary diskette drive (DOS drive A).
Press any key to reboot the system if the system displays the type any key to reboot prompt. Or, use the reset button to restart the system if the system is shutdown.
The Boot Solaris screen is displayed after a few minutes.
Press the F2 key (F2_Continue) at the Solaris Device Configuration Assistant screen.
The identified devices are displayed in the next screen.
Press the F2 key (F2_Continue) at the Identified Devices screen.
Select the CD-ROM drive or net(work) as the boot device from the Boot Solaris screen. Then press the F2 key (F2_Boot Solaris).
The Solaris boot option screen is displayed.
Type b -s at the Select the type of installation: prompt.
After a few minutes, the single-user mode # prompt is displayed.
Mount the root (/) file system that has the invalid passwd file.
# mount /dev/dsk/devicename /a |
Change to the newly mounted etc directory.
# cd /a/etc |
Set the terminal type.
# TERM=AT386 # export TERM |
Make the necessary change to the passwd file using an editor.
# vi passwd |
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: |
type any key to reboot Running Configuration Assistant... Solaris Device Configuration Assistant . . . Boot Solaris Select one of the identified devices to boot Solaris. > To make a selection, use the arrow keys, then press Enter to mark it [X]. Boot Solaris -------------------------------------------------------------------- [ ] DISK: IDE(ATA) QUANTUM FIREBALL1080A target: 0; port: 1F0-1F7, 3F6-3F7; irq: 14 [ ] NET : Intel EtherExpress network card port: 300-30F; irq: 5 FF2_Boot Solaris F3_Back F4_Boot Tasks F6_Help <<< Current Boot Parameters >>> Boot path: /isa/ata@1f0,0/cmdk@0,0:a Boot args: Type b [file-name] [boot-flags] to boot with options or i to enter boot interpreter or to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s # mount /dev/dsk/c0t3d0s0 /a # cd /a/etc # TERM=AT386 # export TERM # vi passwd (Remove invalid entry) # cd / # umount /a # init 6 |