システムの復元を目的としたブート例として、無効な /etc/passwd ファイルを復元する方法について説明します。
以下の手順では、認識された devicename 変数を修復するためにファイルシステムのデバイス名に置き換えます。システムのデバイス名については、第 20 章「デバイスへのアクセス」を参照してください。
Solaris インストール CD またはネットワークのどちらからブートしているかによって、対応する手順に従ってください。
Solaris インストール CD (またはネットワーク) から、手順 a から f に従ってシングルユーザーモードでブートします。
ネットワークからブートしている場合は、手順 a と b を省略します。
Solaris インストール CD を CD キャディに挿入します。
CD キャディを CD-ROM ドライブに挿入します。
(省略可能) ブート元のディスクに Intel 版 Solaris 2.6 またはその互換バージョンが含まれていない場合、フロッピーディスクドライブ (DOS ドライブ A) に Configuration Assistant/Boot (構成用補助) フロッピーディスクを挿入します。
Type any key to continue プロンプトが表示されている場合は、どれかキーを押してシステムをリブートします。このプロンプトが表示されているときは、リセットボタンを押すこともできます。システムがシャットダウンしている場合は、電源スイッチを使用してシステムの電源を入れます。
「Solaris Device Configuration Assistant」画面で、F2 キー (F2_Continue) を押します。
デバイスが識別され、識別されたデバイスを示す画面が表示されます。
「Identified Devices」画面で、F2 キー (F2_Continue) を押します。
ブート可能なドライバが読み込まれます。
「Boot Solaris」画面から CD または NET をブートデバイスとして選択します。次に F2 キー (F2_Continue) を押します。
「Current Boot Parameters」メニューが表示されます。
Select type of installation: プロンプトで b -s と入力します。
数分後に、シングルユーザーモードの # プロンプトが表示されます。
無効な passwd ファイルがあるルート (/) ファイルシステムをマウントします。
# mount /dev/dsk/devicename /a |
新しくマウントした etc ディレクトリに移動します。
# cd /a/etc |
端末タイプを設定します。
# TERM=AT386 # export TERM |
必要に応じて、エディタを使って passwd ファイルに必要な変更を加えます。
# vi passwd |
ルート (/) ディレクトリに移動します。
# cd / |
/a ディレクトリのマウントを解除します。
# umount /a |
システムをリブートします。
# init 6 |
システムが実行レベル 3 でブートしたことを確認します。
ブートプロセスが正常に終了すると、ログイン画面かログインプロンプトが表示されます。
hostname console login: |
Type any key to continue
SunOS Secondary Boot version 3.00
Solaris Intel Platform Edition Booting System
Running Configuration Assistant...
Autobooting from bootpath: /eisa/eha@1,4000/sd@0,0:a
If the system hardware has changed, or to boot from a different
device, interrupt the autoboot process by pressing ESC.
Press ESCape to interrupt autoboot in 5 seconds.
.
.
.
Boot Solaris
Select one of the identified devices to boot the Solaris kernel and
choose Continue.
To perform optional features, such as modifying the autoboot and property
settings, choose Boot Tasks.
An asterisk (*) indicates the current default boot device.
> To make a selection use the arrow keys, and press Enter to mark it [X].
[ ] DISK: Target 0, IMPRIMIS 94241-7 0888
on Adaptec 1740/1742 SCSI controller in EISA Slot 4
[ ] CD : Target 2, TOSHIBA CD-ROM XM-3501TA 3054
on Adaptec 1740/1742 SCSI controller in EISA Slot 4
[ ] NET : SMC EtherCard Elite32C Ethernet adapter
in EISA Slot 6
F2_Continue F3_Back F4_Boot Tasks F6_Help
.
.
.
<<< Current Boot Parameters >>>
Boot path: /eisa/smceu@0,0
Boot args: kernel/unix -r
Select the type of installation you want to perform:
1 Solaris Interactive
2 Custom JumpStart
3 Solaris Web Start
Enter the number of your choice followed by <ENTER> the key.
If you enter anything else, or if you wait for 30 seconds,
an interactive installation will be started.
Select type of installation: b -s
# mount /dev/dsk/c0t3d0s0 /a
# cd /a/etc
# TERM=AT386
# export TERM
# vi passwd
(無効なエントリの削除)
# cd /
# umount /a
# init 6
|