1. Table of Contents
- Table of Contents
- Setup Jumpstart Server
- Configure TFTP
- Configure Name Service
- Setup DHCP server
- Configure GRUB menu
- PXE boot client
- Troubleshooting PXE boot
- A more flexible setup
2. Setup Jumpstart Server
- Create jumpstart server environment
In this document we copy the contents of the Solaris DVD or CDROM's to a hard disk. This requires that you creaete the /jumpstart directory in a slice with enough disk space. On my test system my configuration and images took 3GB.
Instead of creating a directory in an existing partition, you can also create a new slice and use /jumpstart as the mountpoint. It's your pick :-)
server # mkdir -p /jumpstart/config
server # mkdir -p /jumpstart/x86
- Create jumpstart image
Using DVD
server # cd /cdrom/cdrom0/Solaris_10/Tools
server # ./setup_install_server /jumpstart/x86
... output skipped ...
Copy check command to config directory.
server # cd /jumpstart/image/Solaris_10/Misc/jumpstart_sample
server # cp check /jumpstart/config
Using CDROM
Insert CDROM 1
server # cd /cdrom/cdrom0/s0/Solaris_10/Tools
server # ./setup_install_server /jumpstart/x86
... output skipped ...
Insert CDROM 2 to CDROM 5
server # cd /cdrom/cdrom0/Solaris_10/Tools
server # ./add_to_install_server /jumpstart/x86
... output skipped ...
Copy check command to config directory.
server # cd /jumpstart/image/Solaris_10/Misc/jumpstart_sample
server # cp check /jumpstart/config
- Setup NFS server
server # echo "share -F nfs -o ro,anon=0 /jumpstart" >> /etc/dfs/dfstab
server # svcadm enable nfs/server
server # svcs nfs/server
STATE STIME FMRI
online 14:52:25 svc:/network/nfs/server:default
server # share
- /jumpstart ro,anon=0 ""
- Create sysidcfg file
Create the following sysidcfg file with an available editor.
server # cd /jumpstart/config
server # cat sysidcfg
system_locale=en_US
timezone=MET
name_service=NONE
terminal=dtterm
timeserver=localhost
root_password=WybF.D5GwZnz2
network_interface=primary{ protocol_ipv6=no }
security_policy=NONE
nfsv4_domain= dynamic
keyboard= workaround:Unknown
display= workaround:Unknown
pointer= workaround:Unknown
monitor=workaround:Unknown
If you are running Solaris 10u2 you can add nfs4_domain=dynamic to your sysidcfg too. If you do, then you don't have to put the touch /a/etc/.NFS4inst_state.domain line in your after script.
- Create profile aka class file
Create the following profile aka. class file, again with an editor.
server # cat std_profile
install_type initial_install
system_type standalone
partitioning explicit
filesys any 1024 swap
filesys any free /
filesys any 1024 /var
cluster SUNWCreq
- Create pre script file
The profile above will create a new partition table with 3 slices (/, /var & swap). This will only work if the disk to install to already contains a solaris parition. If the system you want to install Solaris on wasn't installed with Solaris before, changes are great that the disk will not contain a Solaris partition.
You can use fdisk -B /dev/rdsk/in a pre script to create the Solaris partition first.
server # cat std_pre
fdisk -B /dev/rdsk
- Create after script file
Create a script that is run on the client after the installation succeeds. Output of this afterscript is automatically saved on the jumpstart client in /var/sadm/sys/logs/finish.log. Your afterscript should match the following output:
server # cat std_after
echo "Begin afterscript"
touch /a/noautoshutdown
# touch /a/etc/.NFS4inst_state.domain
echo "Finish afterscript"
If you are running Solaris 10u2 or later you can skip the touch /a/etc/.NFS4inst_state.domain and place nfs4_domain=dynamic in the sysidcfg file.
- Create rules file
Then we need a rules file with the following contents.
server # cat rules
any - - std_profile std_after
server # ./check
Validating rules...
Validating profile std_profile...
The custom JumpStart configuration is ok.
3. Configure TFTP
Depending on you system, the tftp service is already available or not. When the tftp service is not available, you will have to uncomment the service in the /etc/inetd.conf file and run the inetconv command.
server # svcs tftp/udp6
svcs: Pattern 'tftp/udp6' doesn't match any instances
STATE STIME FMRI
server # grep tftp /etc/inetd.conf
# TFTPD - tftp server (primarily used for booting)
#tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
Uncomment the "#tftp dgram udp6 ..." line in the /etc/inetd.conf file.
server # grep tftp /etc/inetd.conf
# TFTPD - tftp server (primarily used for booting)
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
server # inetconv
inetconv: Notice: Service manifest for 100235/1 already generated as
/var/svc/manifest/network/rpc/100235_1-rpc_ticotsord.xml, skipped
inetconv: Notice: Service manifest for 100083/1 already generated as
/var/svc/manifest/network/rpc/100083_1-rpc_tcp.xml, skipped
inetconv: Notice: Service manifest for 100068/2-5 already generated as
/var/svc/manifest/network/rpc/100068_2-5-rpc_udp.xml, skipped
tftp -> /var/svc/manifest/network/tftp-udp6.xml Importing tftp-udp6.xml ...Done
server # svcs tftp/udp6
STATE STIME FMRI
online 12:56:05 svc:/network/tftp/udp6:default
4. Configure Name Service
In this document the DHCP server will fetch the hostname for clients from a name service (/etc/inet/hosts). We therefore have to add the jumpstart client to the /etc/inet/hosts file.
server # echo "10.0.0.100 client1" >> /etc/inet/hosts
5. Setup DHCP server
- Configure DHCP service
server # dhcpconfig -D -r SUNWfiles -p /var/dhcp
Created DHCP configuration file.
Created dhcptab. Added "Locale" macro to dhcptab.
Added server macro to dhcptab - voyin. DHCP server started.
The -r option defines what file type should be used for storing the dhcp tables (network and tab). SUNWfiles creates ascii files. The advantage of SUNWfiles is that these files are easy to debug. SUNbinfiles creates the dhcp tables as binary files. The advantage of binary files is the increase in perfomance for the DHCP server.
- Check DHCP Service
server# svcs "*dhcp*"
STATE STIME FMRI
online 14:16:10 svc:/network/dhcp-server:default
- Add symbols to DHCP configuration
server # dhtadm -A -s SrootIP4 -d 'Vendor=SUNW.i86pc,2,IP,1,1'
server # dhtadm -A -s SrootNM -d 'Vendor=SUNW.i86pc,3,ASCII,1,0'
server # dhtadm -A -s SrootPTH -d 'Vendor=SUNW.i86pc,4,ASCII,1,0'
server # dhtadm -A -s SinstIP4 -d 'Vendor=SUNW.i86pc,10,IP,1,1'
server # dhtadm -A -s SinstNM -d 'Vendor=SUNW.i86pc,11,ASCII,1,0'
server # dhtadm -A -s SinstPTH -d 'Vendor=SUNW.i86pc,12,ASCII,1,0'
server # dhtadm -A -s SsysidCF -d 'Vendor=SUNW.i86pc,13,ASCII,1,0'
server # dhtadm -A -s SjumpsCF -d 'Vendor=SUNW.i86pc,14,ASCII,1,0'
server # dhtadm -P
Name Type Value
==================================================
server Macro :Include=Locale
:Timeserv=10.0.0.10:LeaseTim=86400:LeaseNeg
:DNSdmain="edu.sun.com":DNSserv=4.2.2.2:
Locale Macro :UTCoffst=3600:
SjumpsCF Symbol Vendor=SUNW.i86pc,14,ASCII,1,0
SsysidCF Symbol Vendor=SUNW.i86pc,13,ASCII,1,0
SinstPTH Symbol Vendor=SUNW.i86pc,12,ASCII,1,0
SinstNM Symbol Vendor=SUNW.i86pc,11,ASCII,1,0
SinstIP4 Symbol Vendor=SUNW.i86pc,10,IP,1,1
SrootPT Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SrootNM Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SrootIP4 Symbol Vendor=SUNW.i86pc,2,IP,1,1
- Configure jumpstart client
server # cd /jumpstart/x86/Solaris_10/Tools/
server # ./add_install_client -d SUNW.i86pc i86pc
copying boot file to /tftpboot/pxegrub.I86PC.Solaris_10-1
If not already configured, enable PXE boot by creating
a macro named PXEClient:Arch:00000:UNDI:002001 with:
Boot server IP (BootSrvA) : 10.0.0.10
Boot file (BootFile) : SUNW.i86pc
server # ls /tftpboot
I86PC.Solaris_10-1
nbp.SUNW.i86pc
SUNW.i86pc
pxegrub.I86PC.Solaris_10-1
boot rm.SUNW.i86pc
server # mount -p grep boot
/jumpstart/x86/boot - /tftpboot/I86PC.Solaris_10-1 lofs - no ro
- Enable PXE boot
server # dhtadm -A \
> -m PXEClient:Arch:00000:UNDI:002001 \
> -d ':BootFile="SUNW.i86pc":BootSrvA=10.0.0.10:'
server # dhtadm -P
Name Type Value
================================================== PXEClient:Arch:00000:UNDI:002001 Macro :BootFile="SUNW.i86pc":BootSrvA=10.0.0.10:
server Macro :Include=Locale: Timeserv=10.0.0.10
:LeaseTim=86400:LeaseNeg
:DNSdmain="edu.sun.com"
:DNSserv=4.2.2.2: Locale Macro
:UTCoffst=3600:
SrootPTH Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SjumpsCF Symbol Vendor=SUNW.i86pc,14,ASCII,1,0
SsysidCF Symbol Vendor=SUNW.i86pc,13,ASCII,1,0
SinstPTH Symbol Vendor=SUNW.i86pc,12,ASCII,1,0
SinstNM Symbol Vendor=SUNW.i86pc,11,ASCII,1,0
SinstIP4 Symbol Vendor=SUNW.i86pc,10,IP,1,1
SrootNM Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SrootIP4 Symbol Vendor=SUNW.i86pc,2,IP,1,1
- Create client in DHCP server
server # dhtadm -A \
> -m 0100E0815F2BB5 \
> -d ':SinstNM="server1"\
> :SinstIP4=10.0.0.10:\
> SinstPTH="/jumpstart/x86":\
> SrootNM="server1":\
> SrootIP4=10.0.0.10:\
> SrootPTH="/jumpstart/x86/Solaris_10/Tools/Boot":\
> SjumpsCF="10.0.0.10:/jumpstart/config":\
> SsysidCF="10.0.0.10:/jumpstart/config":'
server # dhtadm -P
Name Type Value
==================================================
0100E0815F2BB5 Macro :SinstNM="server1"
: SinstIP4=10.0.0.10
: SinstPTH="/jumpstart/x86"
: SrootNM="server1"
: SrootIP4=10.0.0.10
: SrootPTH="/jumpstart/x86/Solaris_10/Tools/Boot"
: SjumpsCF="10.0.0.10:/jumpstart/config"
: SsysidCF="10.0.0.10: /jumpstart/config":
PXEClient:Arch:00000:UNDI:002001 Macro :BootFile="SUNW.i86pc":BootSrvA=10.0.0.10:
server Macro :Include=Locale
: Timeserv=10.0.0.10
: LeaseTim=86400
: LeaseNeg
: DNSdmain="edu.sun.com"
: DNSserv=4.2.2.2
: Locale Macro
: UTCoffst=3600:
SrootPTH Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SjumpsCF Symbol Vendor=SUNW.i86pc,14,ASCII,1,0
SsysidCF Symbol Vendor=SUNW.i86pc,13,ASCII,1,0
SinstPTH Symbol Vendor=SUNW.i86pc,12,ASCII,1,0
SinstNM Symbol Vendor=SUNW.i86pc,11,ASCII,1,0
SinstIP4 Symbol Vendor=SUNW.i86pc,10,IP,1,1
SrootNM Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SrootIP4 Symbol Vendor=SUNW.i86pc,2,IP,1,1
- Assign permanent addresses to clients
server # pntadm -C 10.0.0.0
server # pntadm -A client1 \
> -f PERMANENT \
> -i 0100E0815F2BB5 \
> -m 0100E0815F2BB5 \
> -s server1 \
> 10.0.0.0
server # pntadm -L
10.0.0.0
server # pntadm -P 10.0.0.0
Client ID Flags Client IP Server IP Lease Expiration Macro Comment
0100E0815F2BB5 01 10.0.0.100 10.0.0.10 Forever 0100E0815F2BB5
6. Configure GRUB menu
In this step we have to edit the grub menu used by the install clients. In this grub menu we have to make the system is boot with the install keyword.
!!!! Watch Out !!!!
The output shown below only contains 5 lines. Make sure that the lines starting with kernel and - install are actually one line.
server # cat /tftpboot/boot/grub/menu.lst
default=0
timeout=10
title Install Solaris10 6/06 X86/X64
kernel /I86PC.Solaris_10-1/multiboot kernel/unix -
install - B install_media=10.0.0.10:/jumpstart/solaris10
module /I86PC.Solaris_10-1/x86.miniroot
7. PXE boot client
Now you can (re)boot your client. On the Ultra 20 workstations you can press F12 during boot (Sun logo) to force the client into a PXE boot (DHCP). When you have other clients you need to check the manual which keys to use on your hardware.
8. Troubleshooting PXE boot
A typo is made within a blink of an eye and then your client is not booting from the network. Here are some pointers how to debug your environment.
- DHCP server in debug mode
It can be very handy to have the DHCP server running in debig mode. This enables you to see requests are maed by clients, what the server sends back to the client, etc.
server # svcadm disable dhcp-server
server # /usr/lib/inet/in.dhcpd -dv
... output skipped ...
- Capture network traffic
With snoop you can look into network packets and see what data is them.
server # snoop -v grep -i dhcp
... output skipped ...
- DHCP configuration files / directories
/etc/dhcp/inittab DHCP symbol list
/etc/init/dhcpsvc.conf DHCP server parameters.
/var/dhcp/SUNWfiles1_10_0_0_0 Network table containing ip addresses for lease.
/var/dhcp/SUNWfiles1_dhcptab DHCP environment configuration.
/usr/lib/inet/in.dhcpd The actual DHCP daemon.
- Jumpstart log files
During installation on client
/tmp/begin.log
/tmp/finish.log
/tmp/install_log
/var/sadm/system/logs/sysidtool.log
After installation (after reboot) on client
/var/sadm/system/logs/begin.log
/var/sadm/system/logs/finish.log
/var/sadm/system/logs/install_log
/var/sadm/system/logs/sysidtool.log
9. A more flexible setup
The configuration outlined above can be made more flexible by adding specific macro's. What we basically did is create a macro for a client (Identifier is 0100E0815F2BB5) and define all settings with this client. Now imagine have 1,000 systems that you need to setup with the same settings: a lot of work. Or having setup 1,000 systems and one of your settings changes: even more work.
By placing all the settings in one macro and then link clients to this macro it means less work and changing settings is easier as well.
- Extra exercise
If you feel lucky, try to get the following setup and try to install your client again.
server # dhtadm -P
Name Type Value
==================================================
0100E0815F2BB5 Macro :Include=std_config:
std_config Macro :SinstNM="server1"
: SinstIP4=10.0.0.10
: SinstPTH="/jumpstart/x86"
: SrootNM="server1"
: SrootIP4=10.0.0.10
: SrootPTH="/jumpstart/x86/Solaris_10/Tools/Boot"
: SjumpsCF="10.0.0.10
: /jumpstart/config"
: SsysidCF="10.0.0.10
: /jumpstart/config":
PXEClient:Arch:00000:UNDI:002001 Macro :BootFile="SUNW.i86pc":BootSrvA=10.0.0.10:
server Macro :Include=Locale
: Timeserv=10.0.0.10
: LeaseTim=86400
: LeaseNeg
: DNSdmain="edu.sun.com"
: DNSserv=4.2.2.2
: Locale Macro
: UTCoffst=3600:
SrootPTH Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SjumpsCF Symbol Vendor=SUNW.i86pc,14,ASCII,1,0
SsysidCF Symbol Vendor=SUNW.i86pc,13,ASCII,1,0
SinstPTH Symbol Vendor=SUNW.i86pc,12,ASCII,1,0
SinstNM Symbol Vendor=SUNW.i86pc,11,ASCII,1,0
SinstIP4 Symbol Vendor=SUNW.i86pc,10,IP,1,1
SrootNM Symbol Vendor=SUNW.i86pc,3,ASCII,1,0
SrootIP4 Symbol Vendor=SUNW.i86pc,2,IP,1,1
This Post Credit by http://www2.petervg.nl
0 comments:
Post a Comment