BigAdmin System Administration Portal
x86/x64 플랫폼용 Solaris 10 OS에서 Solaris JumpStart 사용
Print-friendly VersionPrint-friendly Version

x86/x64 플랫폼용 Solaris 10 OS에서 Solaris JumpStart 사용

Craig Winter와 Dale Layfield, 2007년 3월


요약

Sun Microsystems의 Solaris JumpStart 기술은 Solaris 운영 체제 및 네트워크의 여러 노드에 있는 기타 관련 소프트웨어의 설치를 자동화하는 데 사용됩니다.

x86/x64 플랫폼용 Solaris 10 OS에서 Solaris JumpStart 소프트웨어 사용은 SPARC 플랫폼용 Solaris 10 OS의 경우와 본질적으로 같습니다. 하지만 일부 미묘한 차이점이 있으며, 이 차이점은 올바른 작업을 위해 해결해야 합니다.

이 문서에서는 Sun x86/x64 시스템에 Solaris 10 OS에서 JumpStart 서버 설치 및 2개 이상의 클라이언트에서 JumpStart 구성에 필요한 단계와 설명을 제공합니다.

일반적인 참조로 Sun의 온라인 문서 Using Custom JumpStart를 참조하십시오.


소개

이 기사에서는 x86/x64 플랫폼에서 Solaris 10 OS를 사용하는 Solaris JumpStart 서버를 만드는 단계별 절차에 대해 나타냅니다. 이 Solaris 10 OS 버전은 서버에서 실행 중인 OS와 JumpStart 설치 서버의 OS 모두의 경우에 사용됩니다. AMD Opteron과 Intel 프로세서 기반 시스템 모두 각각의 경우 사용된 프로세서 유형에 대해 지정된 기본 설정 없이 서버와 클라이언트로 사용할 수 있습니다.

지침은 다음을 위해 제공됩니다.

클라이언트가 네트워크에서 부트할 수 있으려면 클라이언트에서 PXE(Pre-boot Execution Environment)를 활성화해야 합니다. 일부 클라이언트의 경우 PXE는 BIOS에서 활성화되어야 합니다.

클라이언트 부트 파일을 만들 때 발생하는 버그는 최종 마무리 섹션에서 해결합니다.


Solaris JumpStart 절차

다음 지침은 2개의 클라이언트에서 x86/x64 플랫폼용 Solaris 10 OS를 설치하는 JumpStart 설치 서버를 설정하는 데 필요합니다.

이 연습에서 JumpStart 서버의 노드 이름은 stinger2이며, 서버의 IP 주소는 172.16.64.194입니다. 기본 라우터 IP 주소는 172.16.64.1입니다. JumpStart 서버가 있는 네트워크 주소는 172.16.64.0입니다.

필요한 경우 Solaris 10 OS 다운로드를 수행할 수 있습니다.

1. JumpStart 설치 서버를 만듭니다.

a. 서버에 설치 디렉토리를 만듭니다.

# mkdir -p /export/install

b. 서버의 DVD 플레이어에 x86/x64 플랫폼용 Solaris 10 OS DVD를 넣습니다. DVD의 Solaris_10/Tools 디렉토리로 이동하고 setup_install_server 명령을 실행하여 설치 서버를 만듭니다. Solaris 소프트웨어가 새로 만든 디렉토리에 복사됩니다. 인수로 절대 경로 이름을 지정하십시오.

# 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. install 디렉토리가 채워졌는지 확인합니다.

  # du -sk /export/install

  3083278 /export/install

d. DVD 플레이어에서 DVD를 꺼냅니다.

  # cd /;eject

클라이언트 구성 파일을 만듭니다.

클라이언트 구성 파일은 사용자 정의 JumpStart 설치를 제어하는 데 사용됩니다.

a. 파일이 상주할 구성 파일을 만듭니다.

  # mkdir /export/config

b. sysidcfg 파일을 만듭니다.

처음으로 만들 파일은 sysidcfg 파일입니다. 이 파일은 올바른 정보를 사용하여 제대로 형식이 지정되어야 합니다. 그렇지 않으면 파일이 무시되며 자동 JumpStart 설치가 중단됩니다. 설치 기본값은 표준 Solaris 대화식 설치가 됩니다.

OS 설치가 시작되기 전에 JumpStart 클라이언트에서는 이름이 sysidcfg인 파일을 찾습니다. 이 파일 이름은 "sysidcfg"로 지정해야 합니다. 따라서 파일의 여러 버전을 보유할 수 있도록 각 sysidcfg 파일은 개별 디렉토리에 있어야 합니다. 각 클라이언트는 고유 sysidcfg 파일을 보유할 수 있습니다. 또는 여러 클라이언트에서 동일한 sysidcfg 파일을 사용할 수도 있습니다. sysidcfg 파일은 add_install_client 명령에 의해 클라이언트에 할당됩니다. 다음은 sysidcfg 파일을 2개 만드는 과정을 보여 줍니다.

  # 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. rules 파일을 만듭니다.

다음으로 만들 파일은 rules 파일입니다. 이 파일은 텍스트 파일로, Solaris OS에서 설치할 각 클라이언트 또는 클라이언트 그룹의 규칙이 포함되어 있습니다. rules 파일의 각 행에서는 각 클라이언트 또는 클라이언트 그룹용으로 사용할 begin, profilefinish 파일을 JumpStart에 알려줍니다.

rules 파일은 한 개뿐입니다. 필요한 고유 구성 수에 따라 한 파일에 행이 여러 개 포함될 수 있습니다. 다음은 2개의 개별 클라이언트 정보가 들어 있는 rules 파일의 내용에 대해 보여 줍니다.

  # cd /export/config
  # vi rules

  hostname client1 begin1 profile1 finish1
  hostname client2 begin2 profile2 finish2

  :wq

rules 파일은 check 스크립트에서 rules.ok 파일을 만들 때 해당 스크립트에서 사용됩니다. 사용자 정의 JumpStart 설치를 위해서는 rules.ok 파일을 성공적으로 만들어야 합니다.

d. begin 파일을 만듭니다.

begin 파일은 사용자 정의 Bourne 셸 스크립트로, Solaris OS를 설치하기 전에 클라이언트에서 작업을 수행하기 위해 사용됩니다. 일반적으로 수행하는 작업으로는 파생된 프로필 작성과, 업그레이드 전 파일 백업 등이 있습니다.

원하는 경우 begin 파일을 여러 개 사용할 수 있습니다. 다음은 begin 파일을 2개 만드는 과정을 보여 줍니다.

  # 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*

클라이언트에서 설치 중에는 begin 파일에서의 출력이 /tmp/begin.log에 기록됩니다. 설치가 수행되고 나면 /var/sadm/system/logs/begin.log에서 로그 파일을 찾을 수 있습니다.

Solaris 10 설치 설명서에는 begin 스크립트에서 사용할 수 있는 변수에 대해 설명하는 사용자 정의 JumpStart 환경 변수 섹션이 있습니다.

e. finish 파일을 만듭니다.

finish 파일은 사용자 정의 Bourne 셸 스크립트로, Solaris OS 설치를 완료한 후에 클라이언트에서 작업을 수행하기 위해 사용됩니다. 이 스크립트는 일반적으로 추가 파일, 패키지 및 패치를 추가하고, 루트 환경을 사용자 정의하고, 추가 소프트웨어를 설치하기 위해 사용됩니다.

원하는 경우 finish 파일을 여러 개 사용할 수 있습니다. 다음은 finish 파일을 2개 만드는 과정을 보여 줍니다.

  # 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 설치 프로그램은 /a에 클라이언트 시스템의 파일 시스템을 마운트합니다. finish 스크립트를 사용하여 /a에 대한 파일을 추가, 변경 또는 제거할 수 있습니다. 이러한 파일 시스템은 초기 시스템을 재부트할 때까지 /a에서 마운트된 상태로 유지됩니다.

JumpStart 디렉토리, 즉 /export/installSI_CONFIG_DIR 변수에 의해 지정된 디렉토리에 마운트됩니다. 이 디렉토리는 기본적으로 /tmp/install_config로 설정되어 있습니다. finish 스크립트에서 실행되는 명령으로 파일을 JumpStart 디렉토리에서 클라이언트로 복사할 수 있습니다. 설치된 시스템에 추가할 파일은 JumpStart 디렉토리에 배치되며, 클라이언트에서 액세스할 수 있습니다.

finish 스크립트에서 다음 행은 클라이언트의 새로 설치된 파일 시스템 계층에 파일을 복사합니다.

  cp /tmp/install_config/<file_name> /a/<path_name>/

f. profile 파일을 만듭니다.

profile 파일은 텍스트 파일로, 클라이언트에 Solaris OS를 설치하는 방법을 정의합니다.

profile 파일은 여러 개 만들 수 있습니다. 여러 클라이언트에서 동일한 profile 파일을 사용할 수 있거나, 각 클라이언트에서 클라이언트 고유의 profile 파일을 보유할 수 있습니다. 다음은 profile 파일을 2개 만드는 과정을 보여 줍니다.

  # 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. check 스크립트를 만듭니다.

check 스크립트는 rulesprofile 파일이 제대로 설정되어 있는지 확인하기 위해 사용됩니다. 먼저 다음과 같이 로컬 디렉토리, 즉 /export/configcheck 스크립트를 복사합니다.

  # 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.

오류가 발견되지 않으면 rules.ok 파일이 만들어집니다. 이 파일은 rules 파일과 동일하지만 주석과 빈 행이 제거된 상태입니다. check 스크립트는 다음 주석을 rules.ok 파일의 끝에 추가합니다.

  # version=2 checksum=<num>

3. 설치 및 구성 디렉토리를 공유합니다.

a. dfstab을 수정하여 JumpStart 디렉토리를 공유합니다.

b. /etc/dfs/dfstab 파일을 편집합니다.

  # 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

c. NFS 서버를 시작합니다.

  # /etc/init.d/nfs.server start

d. 디렉토리를 공유합니다.

  # shareall
  # share
  -               /export/install   ro,anon=0   ""
  -               /export/config   ro,anon=0   ""
  -               /export/patches   ro,anon=0   ""
  -               /export/packages   ro,anon=0   ""

e. 파일 공유를 확인합니다.

  # showmount -e localhost
  export list for localhost:
  /export/install  (everyone)
  /export/config   (everyone)
  /export/patches  (everyone)
  /export/packages (everyone)

4. 클라이언트의 tftpboot 파일을 만듭니다.

a. 각 클라이언트에 대해 add_install_client 스크립트를 실행합니다.

b. add_install_client 스크립트 위치로 이동합니다.

  # cd /export/install/Solaris_10/Tools

c. JumpStart 설치를 수행하는 네트워크에서 각 클라이언트에 대해 add_install_client 스크립트를 실행합니다. 각 클라이언트에 대해 올바른 인수를 사용하는지 확인합니다. -e 인수는 클라이언트의 MAC 주소이고, -p 인수는 클라이언트에서 사용되는 sysidcfg 파일의 디렉토리 이름을 보여 줍니다. 다음은 2개의 개별 클라이언트에 대해 add_install_client를 실행하는 과정을 보여 줍니다.

  # ./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

Boot server IPBoot file 값은 나중에 dhcpmgr이 실행 중인 동안 매크로를 만들 때 사용됩니다.

5. DHCP 서버를 구성하고 실행합니다.

a. dhcpmgr을 실행합니다.

  # /usr/sadm/admin/bin/dhcpmgr
  Java Accessibility Bridge for GNOME loaded.

첫 번째 화면이 표시됩니다.
(확대하려면 이미지 클릭)

b. DHCP 서버로 구성을 선택한 다음 확인을 클릭합니다.

DHCP 구성 마법사가 표시됩니다.

c. 텍스트 파일을 선택하고 다음을 클릭합니다.

d. 저장소 경로를 확인하고 다음을 클릭합니다.

e. 이름 서비스를 선택하고 다음을 클릭합니다.

f. 리스 정보를 확인하고 다음을 클릭합니다.

g. DNS 도메인 정보를 확인하고 다음을 클릭합니다.

h. 네트워크 정보를 확인하고 다음을 클릭합니다.

i. 네트워크 유형과 라우팅 옵션을 선택하고 다음을 클릭합니다.

j. NIS 도메인 정보를 확인하고 다음을 클릭합니다.

k. NIS+ 도메인 정보를 확인하고 다음을 클릭합니다.

l. 설정을 검토하고 마침을 클릭합니다.

DHCP Manager가 표시되고, 주소 마법사를 시작할지 묻는 메시지가 표시됩니다.

m. 예를 클릭합니다.

주소 마법사가 표시됩니다.

n. IP 주소 수를 입력하고 다음을 클릭합니다.

o. 서버 정보를 확인하고 다음을 클릭합니다.

p. IP 주소를 확인하고 다음을 클릭합니다.

q. 클라이언트 구성 정보를 확인하고 다음을 클릭합니다.

r. 리스 유형을 선택하고 다음을 클릭합니다.

s. 설정을 검토하고 마침을 클릭합니다.

dhcpmgr이 실행 중인 상태에서 BootFileBootSrvA 매크로를 작성합니다. 매크로 작성 양식에 액세스하려면 먼저 DHCP Manager 양식에서 매크로 탭을 선택합니다. 맨 위의 메뉴에서 편집-> 작성을 선택합니다.

매크로 작성 양식이 표시됩니다.

t. 이름 필드에 첫 번째 클라이언트의 add_install_client스크립트에서 생성한 이름을 입력하여 매크로의 BootFile 부분을 작성합니다. 이 이름은 옵션 값 필드에서도 사용됩니다. 정보를 입력한 후 추가를 클릭합니다.

u. 옵션 값 필드에 JumpStart 서버의 네트워크 IP 주소를 입력하여 매크로의 BootSrvA 부분을 작성합니다. 정보를 입력한 후 추가를 클릭합니다. 그런 다음 확인을 클릭하여 첫 번째 매크로 작성을 마칩니다.

v. 동일한 프로세스를 반복하여 두 번째 매크로를 작성합니다.

x. 추가를 클릭합니다.

y. 추가를 클릭하고 확인을 클릭합니다.

z. 두 번째 매크로를 생성하고 나서 DHCP Manager에서 파일->종료를 선택하여 dhcpmgr 유틸리티를 끝냅니다.

최종 마무리

add_install_client 스크립트를 실행한 경우 이 스크립트로 각 클라이언트에 대해 menu.lst<파일 이름> 파일이 만들어졌습니다.

/tftpboot/menu.lst<BootFile: 이름> 파일을 만들 때 발생한 버그로 인해 4행의 kernel/unix 뒤에 다음 텍스트를 추가해야 합니다.

- 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

자동 JumpStart 설치를 수행합니다.

    클라이언트를 부트합니다.

    프롬프트가 표시되면 클라이언트의 키보드에서 F12 키를 누릅니다.

    Network Boot Request....
    
    CLIENT MAC ADDR: 00 0A E4 2A 33 F8  GUID: 11223344 556 7788 99AA \
                                              BBCCDDEEFF00
    
    DHCP....\|/-\|/-
    

    모든 사항이 제대로 설정되었으면 설치가 완료됩니다. 문제가 발생한 경우에는 설치 프로그램이 종료되고 셸로 드롭됩니다. 오류의 원인은 install_log 파일에 기록됩니다.


사후 설치

다음은 JumpStart 설치에 대한 로그 파일입니다.

  /var/sadm/system/logs/install_log
                        begin_log
                        finish_log
                        sysidtool.log

저자 정보

Craig Winter와 Dale Layfield는 Sun Microsystems, Inc의 시장 개발 엔지니어링의 MDE 버티컬 그룹에서 주임 연구원입니다.


Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin