Project

General

Profile

Solaris Unattended installation » History » Version 24

David M., 01/18/2012 12:19 PM

1 1 Romain Vrignaud
h1. Solaris Unattended installation
2
3 4 Oliver Weinmann
h2. Installation Media
4 1 Romain Vrignaud
5 11 Oliver Weinmann
First you have to identify the release name of you Solaris install media. To do this check the disc label on your Solaris DVD. 
6
7
<pre>
8
SOL_10_811_SPARC = hw0811
9
</pre>
10
11
I recommend to create a structure to hold more than just one Solaris install media like the following:
12
13
<pre>
14
/Solaris
15
/Solaris/install
16
/Solaris/images
17
/Solaris/jumpstart
18
</pre>
19
20 10 Oliver Weinmann
h3. Linux:
21 1 Romain Vrignaud
22 11 Oliver Weinmann
Copy the contents of the Solaris 10 Install DVD to the local install directory.
23 10 Oliver Weinmann
24 17 Oliver Weinmann
h3. Sparc:
25
26 10 Oliver Weinmann
<pre>
27 11 Oliver Weinmann
cp -r /media/dvd /Solaris/install/Solaris_5.10_sparc_hw0811
28 17 Oliver Weinmann
</pre>
29
30
h3. i386:
31
32
<pre>
33
cp -r /media/dvd /Solaris/install/Solaris_5.10_i386_hw0811
34
</pre>
35
36
Create a link of Solaris_5.10_i386_hw0811 to Solaris_5.10_x86_64_hw0811.
37
38
<pre>
39
cd /Solaris/install
40
ln -s Solaris_5.10_i386_hw0811 Solaris_5.10_x86_64_hw0811
41 1 Romain Vrignaud
</pre>
42
43 12 Oliver Weinmann
Note that hw0811 is the release name that has to match your Solaris install media.
44 11 Oliver Weinmann
45 9 Oliver Weinmann
h3. Solaris:
46 4 Oliver Weinmann
47 1 Romain Vrignaud
Create a directory and run the following script from the Solaris 10 Installation DVD on a Solaris 8 / 10 machine:
48
49 4 Oliver Weinmann
<pre>
50 11 Oliver Weinmann
mkdir -p /Solaris/install/Solaris_5.10_sparc_hw0811
51 4 Oliver Weinmann
cd /cdrom/cdrom0/Solaris_10/Tools
52 11 Oliver Weinmann
./setup_install_server /Solaris/install/Solaris_5.10_sparc_hw0811
53 4 Oliver Weinmann
</pre>
54
55 3 Oliver Weinmann
A Solaris distribution should be declared in the same form as a Linux distribution. There should be an http based access URL, (the path variable,) so that the smart-proxy can
56
download the required components for the build. Currently this step has to be done manually. Simply copy the inetboot files to your tftp directory.
57
58 18 Oliver Weinmann
h3. Sparc
59
60 3 Oliver Weinmann
<pre>
61 4 Oliver Weinmann
cp /Solaris/install/Solaris_5.10_sparc_hw0811/Solaris_10/Tools/Boot/platform/sun4u/inetboot /var/lib/tftpboot/Solaris-5.10-hw0811-SUN4U-inetboot
62 3 Oliver Weinmann
</pre>
63 18 Oliver Weinmann
64
h3. i386
65 21 Oliver Weinmann
66 20 Oliver Weinmann
<pre>
67 22 Oliver Weinmann
cp /Solaris/install/Solaris_5.10_i386_hw0811/boot/grub/pxegrub /var/lib/tftpboot/Solaris-5.10-hw0811-pxegrub
68 20 Oliver Weinmann
</pre>
69 18 Oliver Weinmann
70 3 Oliver Weinmann
As the Solaris jumpstart process is performed via NFS rather than TFTP the distribution media must also be made available for
71 15 Oliver Weinmann
ReadOnly mounting on the clients.
72 1 Romain Vrignaud
73 13 Oliver Weinmann
h3. Linux:
74
75 2 Oliver Weinmann
<pre>
76 13 Oliver Weinmann
vi /etc/exports
77
"/Solaris" *(ro,async,no_root_squash,anonuid=0)
78
</pre>
79
80
h3. Solaris:
81
82
<pre>
83 1 Romain Vrignaud
share -F nfs -o ro,anon=0 /Solaris
84
echo "share -F nfs -o ro,anon=0 /Solaris" >> /etc/dfs/dfstab
85
</pre>
86 15 Oliver Weinmann
87
The fields describing this alternative access naming scheme are revealed on the Media page when a Solaris operating system is selected. The
88
Solaris build can proceed via a conventional package build, where the packages selected are the SUWNCreq minimal install, or a flash build. The flash archives are located under 
89
the distribution directory by default but can be located anywhere that can be accessed via NFS.
90 13 Oliver Weinmann
91
<pre>
92 2 Oliver Weinmann
Name: Solaris Install Media
93
94
Path: http://server/Solaris/install/Solaris_$major.$minor_$arch_$release
95
Media Path: server:/Solaris/install/Solaris_$major.$minor_$arch_$release
96 5 Oliver Weinmann
Config Path: server:/jumpstart
97 2 Oliver Weinmann
Image Path: server:/Solaris/images
98
</pre>
99
100 5 Oliver Weinmann
h2. Jumpstart files
101 1 Romain Vrignaud
102 24 David M.
The Solaris jumpstart process occurs in two phases; a diskless client is first booted and then in phase two, the host mounts its build media and configuration files from an NFS location and proceeds with the build. Foreman provides a skeleton configuration directory structure suitable for NFS mounting on the host. In this structure are files that are customised to forward configuration requests to the Foreman instance. This directory tree, located at .../foreman/extras/jumpstart, should be NFS shared to the subnet that contains any potential Solaris clients. Some customization of this directory tree may be required. 
103
104
h3. Customize dynamic_* scripts
105
106
An important step, as mentioned above, is to check if the dynamic_profile and dynamic_finish scripts fits your needs.
107
If your foreman host is not called "foreman" in DNS or is not reachable on port 80, you have to change the value of the "foreman" variable.
108
109
dynamic_profile (line #15):
110
<pre>
111
perl -p -i -e "s/hosts:.*/hosts: files dns/" /tmp/root/etc/nsswitch.conf
112
# and then download our configuration from foreman
113
foreman="foreman"
114
./curl.$arch -s http://$foreman/unattended/provision > ${SI_PROFILE}
115
</pre>
116
117
dynamic_finish (line #4):
118
<pre>
119
arch=`uname -p`
120
foreman=foreman
121
# We load the finish script into the logs directory so as to leave a record
122
./curl.$arch -s http://$foreman/unattended/finish > /a/var/sadm/system/logs/puppet.postinstall
123
</pre>
124
125
126
See [[Solaris_jumpstart_directory]] for more details
127 7 Oliver Weinmann
128 23 Oliver Weinmann
The files are read in the following order:
129
130
1. server:/jumpstart/rules.ok
131
2. server:/jumpstart/dynamic_profile
132
3. Foreman -> Provision template: Jumpstart Default
133
4. server:/jumpstart/dynamic_finish
134
5. Foreman -> Provision template: Jumpstart Default Finish
135
136 7 Oliver Weinmann
h3. Linux:
137
138 1 Romain Vrignaud
<pre>
139 16 Oliver Weinmann
cp -r /usr/share/foreman/extras/jumpstart /Solaris/jumpstart
140 7 Oliver Weinmann
vi /etc/exports
141 12 Oliver Weinmann
"/Solaris/jumpstart" *(ro,async,no_root_squash,anonuid=0)
142 7 Oliver Weinmann
</pre>
143
144 1 Romain Vrignaud
h3. Solaris:
145
<pre>
146 16 Oliver Weinmann
cp -r /usr/share/foreman/extras/jumpstart /Solaris/jumpstart
147 7 Oliver Weinmann
share -F nfs -o ro,anon=0 /jumpstart
148 13 Oliver Weinmann
echo "share -F nfs -o ro,anon=0 /jumpstart" >> /etc/dfs/dfstab
149 7 Oliver Weinmann
</pre>
150 1 Romain Vrignaud
151 5 Oliver Weinmann
h2. Edit Model
152
153
You need to setup a model for each Solaris Sparc host that you want to deploy.
154
155
<pre>
156
Name: Sun Ultra 10
157
Hardware Model: SUN4U
158
Vendor Class: Ultra-5_10
159
</pre>
160
161 1 Romain Vrignaud
h2. Model consolidation
162
163 5 Oliver Weinmann
When Foreman imports a host that has not been configured and built by Foreman it will attempt to determine the model of that machine by analyzing the facts that are associated with the host. This can often result in many badly named models all referring to what should be a single manufacturers model. A rake task has been provided that attempts to consolidate all these duplicate malformed names into a single sensible model together with the appropriate Solaris vendor class and Solaris hardware model. See [[models_consolidate|rake models::consolidate]]