Notice
Recent Posts
관리 메뉴

Hacking Arts

[Solaris] jumpstart 본문

Computer & ETC/Solaris

[Solaris] jumpstart

Rakehell 2014. 8. 23. 02:36

<jumpstart>

※solaris에 있는 매우 편리한 기술로 한servr에서 다른 여러대의 server에 solaris 설치가 가능하다.

1.hostname과 ip,mac주소를 각각 /etc/hosts , /etc/ethers에 mapping해준다.

->여기서 mac주소를 쓰는 이유는 OK mode에있는 solaris가 설치되어있지 않는 server들은 ip주소가 없으므로 mac주소로 통신해야 된다

->즉 여기서 잘 만 생각해보면 랜에서만 설치가 가능하다는 것을 알수 있다. MAC주소의 경우 스위치를 넘으면 ip주소를 넘기지 않으면 통신 할수 없다.

 

-----------이 과정은 nfs해줄 Tool과 config file을 지정 해준다고 생각하면 된다----

# mkdir –m 755 /export/install   ;boot image를 담을 directory
cdrom에 1번 CD를 넣고 아래 명령어를 친다.
# cd /cdrom/cdrom0/Solaris_10/Tools
# ./setup_install_server /export/install
cdrom에 2번,3번,4번,5번을 교체하면서 아래 명령어를 친다.
# cd /cdrom/cdrom0/Solaris_10/Tools
# ./add_to_install_server /export/install

 

# mkdir -m 755 /export/config  ;client의 구성정보를 담을 directory
# cd /cdrom/cdrom0/Solaris_10/Misc/jumpstart_sample ;구성에 필요한 sample 위치 
# cp -r * /export/config  ;sample file들을 copy
# vi /export/config/sysidcfg  ;시스템 식별에 관련된 내용이 있다.
network_interface=eri0 {default_route=121.160.70.254  ; gateway 지정
                                        netmask=255.255.255.0    ; netmask 지정
                                        protocol_ ipv6=no}           ; ipv6 사용선택
security_policy=none    ;kerberos 보안 사용선택
name_service=none      ;name service 사용선택
system_locale=ko         ;언어 korean 선택
terminal=sun-cmd      ;terminal 종류를 sun-cmd로 지정
timezone=ROK             ;지역위치 대한민국
nfs4_domain=dynamic  ;nfs4 domain 동적 구성
timeserver=localhost     ;시간동기 서버 지정
root_password=uHehEFNGOiW9g  ; root passwd 지정(암호화된 내용 복사하여 넣음)

--------------rulse file편집-----------------

cd /export/config

vi rules

#hostname sample_host - host_class set_root_pw

hostname [hostname] - host_class -

이런식으로 적어주고 나머지는 주석처리

 

아래 #network 는 network 주소 내역에 들어가 있는 server들은 설치를 해줌 ->가끔은 이것을 이용하면 더 편리 해진다!

 

---------host_class file 편집---------------

# cd /export/config
# vi host_class
install_type  initial_install                   ;초기 설치
system_type standalone                    ;standalone 설치
partitioning explicit                          ;아래 정의된 내용으로 partition 분할 
cluster  SUNWCXall                    ;배포전체 및 OEM지원
filesys  c0t0d0s0 free /                   ;/에 남은용량 전체 할당
filesys  c0t0d0s1 3000 swap             ;swap에 3g 할당
filesys  c0t0d0s7 3000 /export/home ;/export/home에 3g 할당

 

----------rules file check---------------

cd /export/config

./check

문법 검사를 하는 script로

   validating rules...
   Validating profile host_class...
   The custom JumpStart configuration is ok   
   ;문법이 이상이 없으면 rules.ok file이 생성된다.
# ls rules.ok
# cat rules.ok
   hostname  solaris123     -     host_class      -
# version=2 checksum=57334
이런식으로 나옴

 

---------add_install_client script 실행---------

# cd /export/install/Solaris_10/Tools
# ./add_install_client -c solaris122:/export/config -p solaris122:/export/config
   solaris123 sun4u
saving original /etc/dfs/dfstab in /etc/dfs/dfstab.orig
adding “share -F nfs -o ro,anon=0 /export/install” to /etc/dfs/dfstab
making /tftpboot
enabling tftp in /etc/inetd.conf
converting /etc/inetd.conf  ;tftp service open
enabling network/tftp/udp6 service    ; tftp는 udpd 방식의 ftp로 login이 필요치 않다.
enabling network/rarp service ;rarp를 이용하여 client는 서버로부터 IP를 얻을 수 있다.
enabling network/rpc/bootparams service
updating /etc/bootparams ;client가 booting시 필요한 parameter 값을 제공
copying boot file to /tftpboot/inetboot.SUN4U.Solaris_10-1
;/tftpboot는 client가 network으로 boot-program을 받기위한 용도로 사용된다.

 

-------부가적으로 확인 해봐야할 설정들---------

# vi /etc/dfs/dfstab             ;client가 가져올 구성정보와 boot-image를 공유
share -F nfs -o ro,anon=0 /export/install
share -F nfs -o ro /export/config
# svcadm restart nfs/server  ;nfs 재구동(/etc/dfs/dfstab을 참조하여 공유함)
# ps -ef | grep nfs              ;nfs 관련 daemon이 올라와 있는것을 확인해야 한다.

# cat /etc/inetd.conf            ;tftp service가 open되도록 설정되었는지 확인한다.
tftp    dgram   udp6   wait   root   /usr/sbin/in.tftpd    in.tftpd -s /tftpboot
# cat /etc/nsswitch.conf       
bootparams: files
# ls -l /tftpboot
# ps -ef | grep rarpd           ;rarpd가 올라와 있어야만 client가 IP를 받아갈 수 있다.
root   5692    1    0 00:54:22 ?             0:00 /usr/sbin/in.rarpd -a
# ps -ef | grep bootparamd  ;bootparamd가 올라와 있어야 parameter 를 제공한다.
root   5704    1    0 00:54:23 ?             0:00 /usr/sbin/rpc.bootparamd

----------client server에서 해야할 일-------------

ok> boot net – install              ;client에서 network을 통해 OS를 install

 

이렇게 되면 성공적으로 설치가 된다. 글을 잘읽고 응용을 하자!

'Computer & ETC > Solaris' 카테고리의 다른 글

[Solaris] prtdiag and SMF  (0) 2014.08.23
[Solaris] ndd and log  (0) 2014.08.23
[Solaris] Package and Patch  (0) 2014.08.23
[Solaris] Performance  (0) 2014.08.23
[Solaris] Remote service and backup schedule  (0) 2014.08.23