So here we go… :
Server IP : 192.168.209.9
Client :
MAC address :
00:0C:29:F0:59:63
desired IP :
192.168.209.31
desired hostname :
node3
0.Modify /etc/hosts
#
# Internet host
table
#
::1 localhost
127.0.0.1 localhost loghost
10.22.22.22 jumpstart.svtech.com jumpstart
192.168.209.9 x86-jumpstart
#10.10.10.126 jumpstart-clone.svtech.com jumpstart-clone
#10.10.10.101 master1.svtech.com master1
10.10.10.102 client1
10.10.10.104 client2
10.10.10.106 client3
10.10.10.108 client4
192.168.209.31 node3
192.168.209.51 node5
1. Spool the
Operating System Image
To do that there is
the setup_install_server script on the Solaris 10 DVD :
# mount -F hsfs -o
ro /dev/dsk/c0t0d0s2 /mnt
# ls /mnt/
Copyright License
boot
JDS-THIRDPARTYLICENSEREADME
Solaris_10 installer
#
# mkdir
/export/install
# cd
/mnt/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
netboot hierarchy…
Install Server setup
complete
#
You can take a
coffee during this operation because it can take more than 30 minutes….
Or you can continue
with the next step…
2. Create the
sysidcfg file
This file will
contains the answers for some installation questions, which are necessary to
make an unattended installation
Here there is an
example :
# mkdir
/export/config
# vi /export/config/sysidcfg
keyboard=US-English
system_locale=C
auto_reg=anon
nfs4_domain=dynamic
root_password=DByhkRj6hV6E6
timezone=Asia/Saigon
terminal=vt100
security_policy=none
timeserver=localhost
name_service=none
network_interface=primary
{
primary
hostname=node3
default_route=192.168.209.1
protocol_ipv6=no
netmask=255.255.255.0
}
#
After creating the
file (or before, it doesn’t matter in fact…), we have to export with NFS the
directory which contains the file :
# more /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]
# .e.g,
# share -F nfs -o
rw=engineering -d “home dirs” /export/home2
share -F nfs -o ro
/export/config
# shareall
# share
- /export/config ro
“”
The NFS sharing is
necessary for the client to accessing this file, and so to “know” the answers
of the installation questions.
3. Create the
profile and rules.ok files
The profile file
also contains answers for the installation questions :
# vi /export/config/x86-profile1
install_type
initial_install
system_type
standalone
cluster
SUNWCXall
# 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 /partition7
#
The rules file
function is to specify which profile file is going to use which client :
# vi /export/config/rules
#
# hostname client1 –
x86-profile1 -
#
But in fact
JumpStart is not going to directly read the rules file but the rules.ok file,
which we can generate with the check script :
# cd /export/config/
# cp
/export/install/Solaris_10/Misc/jumpstart_sample/check /export/config/
# ls -l
total 130
-r-xr-xr-x 1 root
root 63082 Sep 14 17:19 check
-rw-r–r– 1 root root
364 Sep 14 17:12 profile1
-rw-r–r– 1 root root
30 Sep 14 17:08 rules
-rw-r–r– 1 root root
289 Sep 14 17:05 sysidcfg
# ./check
Validating rules…
Validating profile
profile1…
The custom JumpStart
configuration is ok.
# ls -l
total 132
-r-xr-xr-x 1 root
root 63082 Sep 14 17:19 check
-rw-r–r– 1 root root
364 Sep 14 17:12 profile1
-rw-r–r– 1 root root
30 Sep 14 17:08 rules
-rw-r–r– 1 root root
56 Sep 14 17:19 rules.ok
-rw-r–r– 1 root root
289 Sep 14 17:05 sysidcfg
# more rules.ok
hostname client1 –
profile1 -
# version=2
checksum=2581
#
4. Configure the
DHCP Server with PXE support
Unfortunately the
last step is the bigger one….
So first we are
going to configure the DHCP server, we can do it with the dhcpmgr GUI, or by
hands like this… :
# dhcpconfig -D -r SUNWfiles -p
/var/dhcp
Created DHCP
configuration file.
Created dhcptab.
Added “Locale” macro
to dhcptab.
Added server macro
to dhcptab – galdospr.
DHCP server started.
# svcs -p
dhcp-server
STATE STIME FMRI
online 18:30:39
svc:/network/dhcp-server:default
18:30:39 7687
in.dhcpd
# dhcpconfig -N 192.168.209.0 -t
192.168.209.254
Added network macro
to dhcptab – 10.164.5.0.
Created network
table.
#
Now let’s add and IP
for our client :
# pntadm -A 192.168.209.31 -c node3 -f DYNAMIC -m 192.168.209.0 -y -s
192.168.209.9 192.168.209.0
#
After that, the last
step is to add the client to the JumpStart configuration with the
add_install_client script with the apropriate options :
-d : specify as a
DHCP client
-c : directory where
the rules.ok file resides
-p : directory where
the sysidcfg file resides
-e : ethernet/MAC
address
cd
/export/install/Solaris_10/Tools/
./add_install_client -d -c
192.168.209.9:/export/config -p 192.168.209.9:/export/config -e
00:0C:29:F0:59:63 i86pc
Adding “share -F nfs
-o ro,anon=0 /export/install” to /etc/dfs/dfstab
copying boot file to
/tftpboot/pxegrub.I86PC.Solaris_10-1
If not already
configured, enable PXE boot by creating
a macro named
0100E0815F2C07 with:
Boot server IP
(BootSrvA) : 10.164.5.100
Boot file (BootFile)
: 0100E0815F2C07
#
We must create the
following macro (the name contains the MAC address of the client) to enable the
PXE boot, as the previous script said :
# dhtadm -A -m 01000C29F05963 -d
':BootFile=01000C29F05963:BootSrvA=192.168.209.9:'
#
The
add_install_client script has done the following modifications to the system :
export with NFS the
/export/install directory
# more
/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]
# .e.g,
# share -F nfs -o
rw=engineering -d “home dirs” /export/home2
share -F nfs -o ro
/export/config
share -F nfs -o
ro,anon=0 /export/install
# share
- /export/config ro
“”
- /export/install
ro,anon=0 “”
#
activate the tftp
boot service
# svcs ‘*tftp*’
STATE STIME FMRI
online 18:16:15
svc:/network/tftp/udp6:default
#
populate the
tftpboot directory
# ls -l /tftpboot/
total 298
lrwxrwxrwx 1 root
root 26 Sep 16 18:16 01080027701392 -> pxegrub.I86PC.Solaris_10-1
dr-xr-xr-x 3 root
root 512 Sep 16 17:26 I86PC.Solaris_10-1
-rw-r–r– 1 root root
266 Sep 16 18:16 menu.lst.01080027701392
lrwxrwxrwx 1 root
root 26 Sep 16 18:16 nbp.01080027701392 -> pxegrub.I86PC.Solaris_10-1
-rwxr-xr-x 1 root
root 135600 Sep 16 18:16 pxegrub.I86PC.Solaris_10-1
-rw-r–r– 1 root root
179 Sep 16 18:16 rm.01080027701392
#
modify the vfstab
# grep tftp
/etc/vfstab
/export/install/boot
– /tftpboot/I86PC.Solaris_10-1 lofs – yes ro
#
WARNING :
For each client the
add_install_client scrip will generate a menu.lst for the GRUB configuration of
the client.
It looks like this :
# more
/tftpboot/menu.lst.01080027701392
default=0
timeout=30
title Solaris_10
Jumpstart
kernel
/I86PC.Solaris_10-1/multiboot kernel/unix -B
install_config=10.164.5.13:/export/config,sy
sid_config=10.164.5.13:/export/config,install_media=10.164.5.13:/export/install
module
/I86PC.Solaris_10-1/x86.miniroot
#
There is a bug with
the script because it doesn’t add the - install dhcp option, and without this
option the client does not start an unattended installation and we got the
installation menu… So we must manually add it :
# vi
/tftpboot/menu.lst.01080027701392
default=0
timeout=2
title Solaris_10
Jumpstart
kernel
/I86PC.Solaris_10-1/multiboot kernel/unix – install dhcp -B
install_config=10.164.5.13:/e
xport/config,sysid_config=10.164.5.13:/export/config,install_media=10.164.5.13:/export/install
module
/I86PC.Solaris_10-1/x86.miniroot
#
=================================================================================================
cd
/export/install/Solaris_10/Tools/
./add_install_client -d -c
192.168.209.9:/export/config -p 192.168.209.9:/export/config -e
00:0C:29:F0:59:63 i86pc
dhtadm -A -m 01000C29F05963 -d
':BootFile=01000C29F05963:BootSrvA=192.168.209.9:'
grep tftp
/etc/vfstab
ls -l /tftpboot/I86PC.Solaris_10-1
vi /tftpboot/menu.lst.01000C29F05963
No comments:
Post a Comment