Tuesday, July 17, 2012

Hướng dẫn cài đặt JUMPSTATR sử dụng JumpStart Enterprise Toolkit

OS Required : Solaris 10 
            Notes:  Nếu cài trên Vmware phải tắt Firewall trên máy thật
Download JumpStart Enterprise Toolkit :
1.             File download về có tên : bunzip2 jet.pkg.bz2
 
2.             Copy vào Jumpstart Server ( USB,Ftp…)
 
3.             Giải nén và cài tool
                   

                    # bunzip2 jet.pkg.bz2
        # pkgadd -d jet.pkg
                        The following packages are available:
                 1  JetEXPLO       jet explo product
                    (sparc) 3.1.21
                  2  JetFLASH       JET flash product
                    (sparc) 3.1.10
                 3  JetISO         JET ISO product
                    (sparc) 1.0.0
                 4  JetJASS        JASS product
                    (sparc) 3.0.16
                 5  JetLDOM        JET LDOM product
                    (sparc) 2.0.1
                  6  JetRBAC        JET RBAC product
                    (sparc) 1.1.5
                  7  JetSAN         JET san product
                    (sparc) 3.1.12
                 8  JetSBD         Secure By Default product
                    (sparc) 1.0.3
                 9  JetSDS         JET sds product
                    (sparc,i386) 3.4.6
                  JET VTS product
                    (sparc) 3.0.13

                 ... 5 more menu choices to follow;
                 for more choices, to stop display:
                
                 11  JetWanBoot     JET WanBoot support
                    (sparc) 1.2
                 12  JetZFS         JET zfs product
                    (sparc) 1.0.7
                 13  JetZONES       JET Zones module
                    (sparc) 1.3.8
                  14  SUNWjet        Sun JumpStart Enterprise Toolkit
                    (sparc,i386) 4.7
                 15  SUNWjetd       JET Documentation
                    (sparc) 4.5
 
4.             Cài gói 14,15
         Select package(s) you wish to process (or 'all' to process
           all packages). (default: all) [?,??,q]: 14,15
  
           Processing package instance  from 
  
           Sun JumpStart Enterprise Toolkit(sparc,i386) 4.7
           Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
           Use is subject to license terms.
 
           The selected base directory  must exist bef

           ……………………

           
           Adding product configuration information for 
           + base_config
           + custom
           Client template created in /opt/SUNWjet/Templates
 
I          nstallation of  was successful.
 
 
5.             Export Path cho Command JET
               
         #PATH=$PATH:/opt/SUNWjet/bin
           #export PATH
 
6.             Tạo thư mục chứa Image,Pakages,Patches



         #mkdir /export/install
                 #mkdir -p /export/install/pkgs
                 #mkdir -p /export/install/patches
 
Notes:  Thư mục /export/install phải có dung lượng đủ lớn(>4 Gb)
 
7.             Copy DVD-Rom Solaris vào Jumpstart Server
        
#copy_solaris_media /cdrom/cdrom0           
 
Copying Solaris image....
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 netboot hierarchy...
Install Server setup complete
 
Added Solaris image 10 at the following location:
        Media:          /export/install/media/Solaris_10
 
removing directory /export/install/media/1988
 
 
         Notes: Solaris 8 phải bỏ Cdrom 2 vào khi Cdrom 1 copy hoàn tất
 
               #copy_solaris_media /cdrom/cdrom0
 
copying Solaris image....
Verifying target directory...
Calculating the required disk space for the Solaris_8 product
Copying the CD image to disk...
Install Server setup complete
 
This version of the OS uses multiple CDs for the image. 
Please insert the next CD and press return to continue
 
 
 
The following Products will be copied to /export/install/media/Solaris_8/Solaris_8/Product:
 
Solaris_2_of_2
 
If only a subset of products is needed enter Control-C
and invoke /cdrom/cdrom0/Solaris_8/Tools/add_to_install_server with the -s option.
 
Checking required disk space...
 
/ 
Copying the Early Access products...
215712 blocks
 
Copying Top Level installer...
1888 blocks
 
Copying Installers Directory...
3648 blocks
 
 
Processing completed successfully.
 
Added Solaris image 8 at the following location:
        Media:          /export/install/media/Solaris_8
 
removing directory /export/install/media/6291
 
 
 
8.             Share NFS với Thư mục /export/install
               
               Thêm entry sau vào file /etc/dfs/dfstab:
               share -F nfs -o ro,anon=0 -d "JumpStart Media" /export/install
               
               bash-3.00# vi /etc/dfs/dfstab 
                 "/etc/dfs/dfstab" 13 lines, 455 characters 
 
#       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 ""]  [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
 
share -F nfs -o ro,anon=0 -d "JumpStart Media" /export/install
         
         
 
 
 
9.             #shareall
 
10.          Kiểm tra xem thư mục /export/install đã được share chưa ?
 
 
# share
-        /opt/SUNWjet   ro,anon=0   "JET Framework" 
-        /export/install   ro,anon=0   "JumpStart Media"
 
 
 
11.          Tạo Client Template
 
 
 
#make_template  base_config
 
Ex:
bash-3.00# make_template sol10 base_config 
         
Adding product configuration information for 
    + base_config
Updating base_config template specifics
Client template created in /opt/SUNWjet/Templates
 
 
12.          Edit Templates
Check mac-address client 
{2} ok banner
 
Sun Fire 480R, No Keyboard
Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.22.34, 8192 MB memory installed, Serial #60510173.
Ethernet address 0:3:ba:9b:4f:dd, Host ID: 839b4fdd.
 
 
 
{2} ok .enet-addr   
0:3:ba:9b:4f:dd
 
# vi /opt/SUNWjet/Templates/
 
Ex:
# vi /opt/SUNWjet/Templates/sol10
bash-3.00# vi /opt/SUNWjet/Templates/sol10 
"/opt/SUNWjet/Templates/sol10" 815 lines, 26802 characters 
###############################################################################
#
# Client template file
#
# Client:       sol10
# Created:      Thu Aug 20 10:42:32 ICT 2009
#
# This file was automatically generated using 'make_template'
##############################################################################........................
 
 
Cần Edit ít nhất những entry sau : 
base_config_ClientArch=
base_config_ClientEther=
base_config_ClientOS=
 
base_config_sysidcfg_ip_address=
base_config_sysidcfg_netmask=
 
base_config_profile_cluster=SUNWCall
 
Ex:
base_config_ClientArch=sun4u
base_config_ClientEther= 8:0:20:c6:b0:1f
base_config_ClientOS=10
         #base_config_Client0S  =10  //solaris10
                              =9   //Solaris9
                              =8   //Solaris8                
 
base_config_sysidcfg_ip_address=10.0.0.1000
base_config_sysidcfg_netmask=255.0.0.0
 
base_config_profile_cluster=SUNWCall
 
 
The ClientArch is probably sun4u; examples of possible options are listed just above the setting in the template 
ClientEther is the MAC address of the client, format is aa:bb:cc:dd:ee:ff in HEX 
ClientOS is the tag given to the Solaris image you installed; list_solaris_locations will tell you all possible tags 
sysidcfg_ip_address is the IP address for the target system; auto-populated if the system is in /etc/hosts 
sysidcfg_netmask is the netmask for the target system; auto-populated if the system is in /etc/hosts and the netmask in /etc/netmasks 
profile_cluster is set to SUNWCreq to make this build really quick. Almost unuseable, but quick 
Once this is configured, save the file and then run the command 
 
 
 
13.          # make_client 
        Ex:
bash-3.00# ./make_client -f sol10
Gathering network information..
        Client: 10.0.0.181 (10.0.0.0/255.0.0.0)
        Server: 10.0.0.179 (10.0.0.0/255.0.0.0, SunOS)
Adding sol10 to local /etc/hosts
Adding sol10 to local /etc/hosts
Merge hosts file /tmp/addhost.14240 with /etc/inet/hosts
Merge hosts file /tmp/addhost.14240 with /etc/inet/hosts
Solaris: client_prevalidate
Solaris: client_prevalidate
         Clean up /etc/ethers
         Clean up /etc/ethers
Solaris: client_build
Solaris: client_build
Creating sysidcfg
WARNING: no base_config_sysidcfg_timeserver specified using JumpStart server
Creating profile
Adding base_config specifics to client configuration
Solaris: Configuring JumpStart boot for sol10
Solaris: Configuring JumpStart boot for sol10
Solaris: Configure bootparams build
Solaris: Configure bootparams build
         Starting SMF services for JumpStart
         Starting SMF services for JumpStart
cleaning up preexisting install client "sol10"
removing sol10 from bootparams
removing /etc/bootparams, since it is empty
removing /tftpboot/inetboot.SUN4U.Solaris_8-1
updating /etc/bootparams
copying boot file to /tftpboot/inetboot.SUN4U.Solaris_10-1
Force bootparams terminal type
Force bootparams terminal type
-Restart bootparamd
-Restart bootparamd
Running '/opt/SUNWjet/bin/check_client  sol10'
Running '/opt/SUNWjet/bin/check_client  sol10'
        Client: 10.0.0.181 (10.0.0.0/255.0.0.0)
        Server: 10.0.0.179 (10.0.0.0/255.0.0.0, SunOS)
Checking product base_config/solaris
Checking product base_config/solaris
--------------------------------------------------------------
--------------------------------------------------------------
Check of client sol10 
Check of client sol10 
-> Passed....
-> Passed....
 
 
14.          Boot net từ máy client để cài đặt
        
               ok boot net - install
 
 
Boot device: /pci@1f,4000/network@1,1  File and args: - install
Using Onboard Transceiver - Link Up. 
3a000 
Server IP address: 10.0.0.179 
Client IP address: 10.0.0.180 
Using Onboard Transceiver - Link Up. 
ramdisk-root ufs-file-system 
Loading: /platform/SUNW,Ultra-4/kernel/sparcv9/unix
Loading: /platform/sun4u/kernel/sparcv9/unix
SunOS Release 5.10 Version Generic_139555-08 64-bit
Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
os-io Configuring devices.
Using RPC Bootparams for network configuration
 
 
 
Notes:  Password root sau khi cài đặt : newroot         

- Link tham khảo : http://jet.maui.co.uk/wiki/index.php/JETPrimer

Chú ý: Sau khi cài xong cần setup các thông số

Check ssh

vi /etc/ssh/sshd_config
PermitRootLogin yes
svcadm restart ssh

Cho phép console desktop
Edit /etc/default/login and comment out the following line.
CONSOLE=/dev/console

No comments: