x86/x64 プラットフォーム用 Solaris 10 OS での Solaris JumpStart の使用法Craig Winter、Dale Layfield 共著、2007 年 3 月 要約Sun Microsystems の Solaris JumpStart 技術は、ネットワーク上の複数のノードで Solaris Operating System のインストールやその他の関連ソフトウェアのインストールを自動化するために使用されます。 x86/x64 プラットフォーム用 Solaris 10 OS での Solaris JumpStart ソフトウェアの使用は、SPARC プラットフォーム用 Solaris 10 OS の場合と基本的に同じです。ただし、正しく動作させるための処理がいくらか必要となります。 このドキュメントでは、Sun x86/x64 マシンで Solaris 10 OS の JumpStart サーバーを設定するために必要な手順と、2 台以上のクライアントに対する JumpStart の構成について説明します。 全般的な参考として、Sun オンラインドキュメントの「カスタム JumpStart の使用」を参照してください。 はじめにこの記事では、x86/x64 プラットフォーム用の Solaris 10 OS を使用して JumpStart サーバーを作成する方法を、手順を追って説明します。このバージョンの Solaris 10 OS は、サーバーで実行される OS としても、JumpStart インストールサーバー上の OS としても使用されます。AMD Opteron ベースおよび Intel プロセッサベースのどちらのマシンも、サーバーおよびクライアントとして使用され、それぞれに使用するプロセッサタイプについてもどちらが優先ということはありません。 手順では次の内容を説明します。
クライアントをネットワークからブートできるようにするには、Preboot Execution Environment (PXE) を有効にする必要があります。一部のクライアントでは、PXE を BIOS で有効にする必要があります。 クライアントのブートファイルの作成におけるバグは、「最終的なクリーンアップ」で説明しています。 Solaris JumpStart の手順これから説明する手順では、x86/x64 プラットフォーム用 Solaris 10 OS を 2 つのクライアントにインストールする JumpStart インストールサーバーを設定します。 この演習では、JumpStart サーバーのノード名を 必要な場合は、Solaris 10 OS をダウンロードしてください。 a. サーバーにインストールディレクトリを作成します。 # mkdir -p /export/install b. サーバーの DVD プレイヤーに、x86/x64 プラットフォーム用 Solaris 10 OS の DVD を挿入します。DVD の # cd /cdrom/cdrom0/Solaris_10/Tools # ./setup_install_server /export/install Verifying target directory... Calculating the required disk space for the Solaris_10 product \|/-\|/- Calculating space required for the installation boot image \|/-\|/- Copying the CD image to disk... \|/-\|/- Copying Install Boot Image hierarchy... \|/-\|/- Copying /boot x86 netboot hierarchy... \|/-\|/- Install Server setup complete # c. # du -sk /export/install 3083278 /export/install d. DVD を DVD プレイヤーから取り出します。 # cd /;eject クライアントの構成ファイルは、カスタム JumpStart インストールを制御するために使用します。 a. ファイルを格納する構成ディレクトリを作成します。 # mkdir /export/config b. 最初に作成するファイルは JumpStart クライアントは、OS のインストールが開始される前に
# cd /export/config
# mkdir sysidcfg1
# cd sysidcfg1
# vi sysidcfg
system_locale=en_US.ISO8859-1
timezone=US/Pacific
timeserver=localhost
terminal=vt100
name_service=NONE
security_policy=NONE
root_password=<encrypted from /etc/shadow>
network_interface=bge0 {hostname=client1
netmask=255.255.255.0
protocol_ipv6=no
default_route=172.16.64.1}
:wq
# cd ../
# mkdir sysidcfg2
# cd sysidcfg2
# vi sysidcfg
system_locale=en_US.ISO8859-1
timezone=US/Pacific
timeserver=localhost
terminal=vt100
name_service=NONE
security_policy=NONE
root_password=<encrypted from /etc/shadow>
network_interface=bge0 {hostname=client2
netmask=255.255.255.0
protocol_ipv6=no
default_route=172.16.64.1}
:wq
c. 次に作成するファイルは
# cd /export/config # vi rules hostname client1 begin1 profile1 finish1 hostname client2 begin2 profile2 finish2 :wq
d.
必要に応じて、複数の # cd /export/config # vi begin1 #!/bin/sh echo "Begin Script for JumpStart client1..." :wq # vi begin2 #!/bin/sh echo "Begin Script for JumpStart client2..." :wq # chmod 755 begin* クライアントでのインストール中、 『Solaris 10 インストールガイド』の「カスタム JumpStart の環境変数」では、 e.
必要に応じて、複数の # cd /export/config # vi finish1 #!/bin/sh echo "Finish Script for JumpStart client1..." echo "Get rid of the nfs prompt during the initial boot" touch /a/etc/.NFS4inst_state.domain :wq # vi finish2 #!/bin/sh echo "Finish Script for JumpStart client2..." echo "Get rid of the nfs prompt during the initial boot" touch /a/etc/.NFS4inst_state.domain :wq # chmod 755 finish* Solaris インストールプログラムは、クライアントシステムのファイルシステムを JumpStart ディレクトリ (
cp /tmp/install_config/<file_name> /a/<path_name>/ f.
複数の # cd /export/config # vi profile1 # install_type MUST be first install_type initial_install # start with the minimal required number of packages cluster SUNWCXall cluster SUNWCapache delete cluster SUNWCpcmc delete cluster SUNWCpcmcx delete cluster SUNWCthai delete cluster SUNWClp delete cluster SUNWCnis delete cluster SUNWCppp delete # format the entire disk for Solaris fdisk all solaris all # define how the disk is partitioned partitioning explicit filesys rootdisk.s0 6144 / filesys rootdisk.s1 1024 swap filesys rootdisk.s7 free /state/partition1 # install systems as standalone system_type standalone # specify patches to install patch 119281-06 nfs 172.16.64.194:/export/patches # specify packages to install package SPROcc add nfs 172.16.64.194:/export/packages :wq # vi profile2 # install_type MUST be first install_type initial_install # start with the minimal required number of packages cluster SUNWCXall cluster SUNWCapache delete cluster SUNWCpcmc delete cluster SUNWCpcmcx delete cluster SUNWCthai delete cluster SUNWClp delete cluster SUNWCnis delete cluster SUNWCppp delete # format the entire disk for Solaris fdisk all solaris all # define how the disk is partitioned partitioning explicit filesys rootdisk.s0 6144 / filesys rootdisk.s1 4096 swap filesys rootdisk.s7 free /state/partition1 # install systems as standalone system_type standalone # specify patches to install patch 119281-06 nfs 172.16.64.194:/export/patches # specify packages to install package SPROcc add nfs 172.16.64.194:/export/packages :wq g.
# cd /export/config # cp /export/install/Solaris_10/Misc/jumpstart_sample/check . h. check スクリプトを実行します。 # ./check Validating rules... Validating profile profile1... Validating profile profile2... The custom JumpStart configuration is ok. エラーがなければ、 # version=2 checksum=<num>
a. # vi /etc/dfs/dfstab # Place share(1M) commands here for automatic execution # on entering init state 3. # # Issue the command 'svcadm enable network/nfs/server' to # run the NFS daemon processes and the share commands, after # adding the very first entry to this file. # # share [-F fstype] [ -o options] [-d "<text>"] <pathname> # [resource] # for example, # share -F nfs -o rw=engineering -d "home dirs" /export/home2 share -F nfs -o ro,anon=0 /export/install share -F nfs -o ro,anon=0 /export/config share -F nfs -o ro,anon=0 /export/patches share -F nfs -o ro,anon=0 /export/packages :wq b. NFS サーバーを起動します。 # /etc/init.d/nfs.server start c. ディレクトリを共有します。 # shareall # share - /export/install ro,anon=0 "" - /export/config ro,anon=0 "" - /export/patches ro,anon=0 "" - /export/packages ro,anon=0 "" d. ファイルの共有を確認します。 # showmount -e localhost export list for localhost: /export/install (everyone) /export/config (everyone) /export/patches (everyone) /export/packages (everyone) 各クライアントに対して a. # cd /export/install/Solaris_10/Tools b. JumpStart インストールを実行するネットワークで、クライアントごとに
# ./add_install_client \
-d \
-e 00:0a:e4:37:16:4d \
-s 172.16.64.194:/export/install \
-c 172.16.64.194:/export/config \
-p 172.16.64.194:/export/config/sysidcfg1 i86pc
enabling tftp in /etc/inetd.conf
Converting /etc/inetd.conf
enabling network/tftp/udp6 service
copying boot file to /tftpboot/pxegrub.I86PC.Solaris_10-1
If not already configured, enable PXE boot by creating
a macro named 01000AE429C1FD with:
Boot server IP (BootSrvA) : 172.16.64.194
Boot file (BootFile) : 01000AE429C1FD
# ./add_install_client \
-d \
-e 00:0a:e4:2a:33:f8 \
-s 172.16.64.194:/export/install \
-c 172.16.64.194:/export/config \
-p 172.16.64.194:/export/config/sysidcfg2 i86pc
enabling tftp in /etc/inetd.conf
Converting /etc/inetd.conf
enabling network/tftp/udp6 service
copying boot file to /tftpboot/pxegrub.I86PC.Solaris_10-1
If not already configured, enable PXE boot by creating
a macro named 01000AE42A33F8 with:
Boot server IP (BootSrvA) : 172.16.64.194
Boot file (BootFile) : 01000AE42A33F8
a. # /usr/sadm/admin/bin/dhcpmgr Java Accessibility Bridge for GNOME loaded. 初期画面が表示されます。 b. 「Configure as a DHCP Server」を選択し、「OK」をクリックします。 DHCP Configuration Wizard が表示されます。 c. 「Text Files」を選択し、「Next」をクリックします。 d. ストレージのパスを確認し、「Next」をクリックします。 e. ネームサービスを選択し、「Next」をクリックします。 f. リース情報を確認し、「Next」をクリックします。 g. DNS ドメイン情報を確認し、「Next」をクリックします。 h. ネットワーク情報を確認し、「Next」をクリックします。 i. ネットワークの種類とルーティングオプションを選択し、「Next」をクリックします。 j. NIS ドメイン情報を確認し、「Next」をクリックします。 k. NIS+ ドメイン情報を確認し、「Next」をクリックします。 l. 各設定を確認し、「Finish」をクリックします。 DHCP マネージャーが表示され、Address Wizard の起動を確認するメッセージが表示されます。 m. 「Yes」をクリックします。 Address Wizard が表示されます。 n. IP アドレスの数を入力し、「Next」をクリックします。 o. サーバー情報を確認し、「Next」をクリックします。 p. IP アドレスを確認し、「Next」をクリックします。 q. クライアントの構成情報を確認し、「Next」をクリックします。 r. リースの種類を選択し、「Next」をクリックします。 s. 各設定を確認し、「Finish」をクリックします。
「Create Macros」フォームが表示されます。 t. マクロの u. マクロの v. 同じ手順を繰り返して、2 つ目のマクロを作成します。 w. 「Add」をクリックします。 x. 「Add」をクリックし、次に「OK」をクリックします。 y. 2 つ目のマクロを作成したあと、DHCP マネージャーウィンドウで「File」、「Exit」の順に選択し、
- install dhcp 変更前のファイルは次のようになっています。
default=0
timeout=30
title Solaris_10 Jumpstart
kernel /I86PC.Solaris_10-1/multiboot kernel/unix -B \
install_config=172.16.64.194:/export/config, \
sysid_config=172.16.64.194:/export/config/sysidcfg1, \
install_media=172.16.64.194:/export/install, \
install_boot=172.16.64.194:/export/install/boot
module /I86PC.Solaris_10-1/x86.miniroot
これを、次のように変更します。
default=0
timeout=4
title Solaris_10 Jumpstart
kernel /I86PC.Solaris_10-1/multiboot kernel/unix - install dhcp -B \
install_config=172.16.64.194:/export/config, \
sysid_config=172.16.64.194:/export/config/sysidcfg1, \
install_media=172.16.64.194:/export/install, \
install_boot=172.16.64.194:/export/install/boot
module /I86PC.Solaris_10-1/x86.miniroot
クライアントをブートします。 プロンプトが表示されたら、クライアントのキーボードで F12 キーを押します。
Network Boot Request....
CLIENT MAC ADDR: 00 0A E4 2A 33 F8 GUID: 11223344 556 7788 99AA \
BBCCDDEEFF00
DHCP....\|/-\|/-
正しく設定されていれば、インストールが実行され完了します。問題がある場合は、インストーラが終了し、シェルに戻ります。エラーの原因は インストール後JumpStart インストールのログファイルを次に示します。
/var/sadm/system/logs/install_log
begin_log
finish_log
sysidtool.log
執筆者紹介Craig Winter 氏および Dale Layfield 氏は、米国 Sun Microsystems, Inc. の Market Development Engineering 部門の MDE Verticals Group に所属するスタッフエンジニアです。 Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics |