OpenSolaris is distributed on LIVE-CD (not very useful in DataCenter) or as an Automated Installer image but Sun requires to run installation server on at least OpenSolaris 2009.06 (no support for regular Solaris). I decided to split configuration into two parts:
Step 1 - Boot Server (DHCP + PXE)
It is very straightforward - there are many docs about DHCP server with PXE on Solaris. In this step let's leave /tftpboot files. All boot images and configuration will be copied from installation server.
Step 2 - Automated Installer service
SUN decided to replace commonly known Jumpstart with new technology that offers:
1). Integration with DHCP - to hand out an address and the PXE boot parameters to a client
2). PXE and TFTP - to serve the PXE boot image
3). Install server - an Apache instance that serves XML configuration and mini root, by default running on port 5555
4). Package repository - by default the internet connection is required during installation but it is also possible to manage local mirror or use a http proxy server.
Note that NFS server is no longer required which simplifies network configuration and can avoid firewall problems. It is worth to read Automated Installer docs and project caiman forum.
Here is a step by step procedure to create an installation service for SUN V40Z.
1). Let's install the correct utility:
tsucharz@katmandu:~$ pfexec pkg install SUNWinstalladm-tools
2). Some space for AI service is necessary
tsucharz@katmandu:~$ pfexec zfs create rpool/jumpstart
tsucharz@katmandu:~$ pfexec zfs set mountpoint=/jumpstart rpool/jumpstart
tsucharz@katmandu:~$ df -kh /jumpstart
Filesystem Size Used Avail Use% Mounted on
rpool/jumpstart 57G 163M 57G 1% /jumpstart
3). We need Automated Installer image, let's download it from http://dlc-cdn.sun.com/osol/opensolaris/2009/06/osol-0906-ai-x86.iso and store to /mnt/install/OpenSolaris.
4. Create an install environment under /jumpstart with the name osol2009. As it also configures DHCP server we need to provide the network, starting at certain ip address $NET_IP and using 1 address in this case.
tsucharz@katmandu:~$ pfexec installadm create-service -n osol2009 -i $NET_IP -c 1 -s /mnt/install/OpenSolaris/osol-0906-ai-x86.iso /jumpstart
Setting up the target image at /jumpstart ...
Registering the service osol2009._OSInstall._tcp.local
Creating DHCP Server
Created DHCP configuration file.
Created dhcptab.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - katmandu.
DHCP server started.
Added network macro to dhcptab - $NETP_IP.
Created network table.
adding tftp to /etc/inetd.conf
Converting /etc/inetd.conf
copying boot file to /tftpboot/pxegrub.I86PC.OpenSolaris-1
Service discovery fallback mechanism set up
5). Register a client with MAC address (-e option) and console parameters (!!!) for SUN V40Z (-b option)
tsucharz@katmandu:~$ pfexec installadm create-client -b "input-device=ttya" -b "output-device=ttya" -e 00:09:3D:11:2D:2A -t /jumpstart -n osol2009
Setting up X86 client...
Service discovery fallback mechanism set up
Enabled network boot by adding a macro named 0100093D112D2A
to DHCP server with:
Boot server IP (BootSrvA) : 172.30.72.230
Boot file (BootFile) : 0100093D112D2A
6). Customize installation
AI sevice uses manifest XML files for defining an install job. It is located in auto_install subdirectory of image_path property:
tsucharz@katmandu:~$ pfexec svccfg -s svc:/system/install/server:default listprop AIosol2009/image_path
AIosol2009/image_path astring /jumpstart
tsucharz@katmandu:~$ ls -l /jumpstart/auto_install/
total 24
-r--r--r-- 1 root sys 3082 May 17 22:39 ai_manifest.defval.xml
-r--r--r-- 1 root sys 11126 May 17 22:39 ai_manifest.rng
-r--r--r-- 1 root sys 3469 May 17 22:39 ai_manifest.xml
-r--r--r-- 1 root sys 3201 May 17 22:39 default.xml
Let's copy default.xml to custom script:
tsucharz@katmandu:~$ cd /jumpstart/auto_install/
tsucharz@katmandu:/jumpstart/auto_install$ pfexec cp default.xml ai_custom.xml
tsucharz@katmandu:/jumpstart/auto_install$ pfexec vi ai_custom.xml
and customize (marked in red):
- create Solaris partition
- add 1 slice
- setup proxy
tsucharz@katmandu:/jumpstart/auto_install$ cat ai_custom.xml
and customize (marked in red):
- create Solaris partition
- add 1 slice
- setup proxy
tsucharz@katmandu:/jumpstart/auto_install$ cat ai_custom.xml
<ai_criteria_manifest>
<ai_embedded_manifest>
<ai_manifest name="default">
<ai_target_device>
<target_device_name>c8t0d0</target_device_name>
</ai_target_device>
<ai_device_partitioning> <!-- Create solaris partition -->
<partition_action>create</partition_action>
<partition_size>max_size</partition_size>
<partition_size_units>GB</partition_size_units>
<partition_type>SOLARIS</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices> <!-- Create VTOC slice 4 -->
<slice_action>create</slice_action>
<slice_number>0</slice_number>
<slice_size>max_size</slice_size>
<slice_size_units>GB</slice_size_units>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="http://pkg.opensolaris.org/release" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
<ai_http_proxy url="http://proxy_ip:3128"/>
<ai_install_packages>
<pkg name="entire"/>
<pkg name="SUNWcsd"/>
<pkg name="SUNWcs"/>
<pkg name="babel_install"/>
</ai_install_packages>
<ai_uninstall_packages>
<pkg name="babel_install"/>
<pkg name="slim_install"/>
</ai_uninstall_packages>
<ai_auto_reboot>
false
</ai_auto_reboot>
</ai_manifest>
</ai_embedded_manifest>
<sc_embedded_manifest name = "AI">
<!-- <?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="profile" name="name">
<service name="ai_properties" version="1" type="service">
<instance name="default" enabled="true">
<property_group name="ai" type="application">
<propval name="username" type="astring" value="jack"/>
<propval name="userpass" type="astring" value="9Nd/cwBcNWFZg"/>
<propval name="description" type="astring" value="default_user"/>
<propval name="rootpass" type="astring" value="$5$VgppCOxA$ycFmYW4ObRRHhtsGEygDdexk5bugqgSiaSR9niNCouC"/>
<propval name="timezone" type="astring" value="US/Pacific"/>
</property_group>
</instance>
</service>
</service_bundle>
-->
</sc_embedded_manifest>
</ai_criteria_manifest>
In default manifest there are two users available (jack/jack, root/opensolaris). During an installation it is possible to login with both users and check progress in /tmp/install_log file.
Finally the new manifest should be installed:
tsucharz@katmandu:/jumpstart/auto_install$ pfexec installadm add -m ai_custom.xml -n osol2009
Well done, installation server is ready. Because I used another boot server it is necessary to copy content of /tftpboot directory:
tsucharz@katmandu:/jumpstart/auto_install$ pfexec scp /tftpboot/* root@yoda:/tftpboot/
A boot loader (grub) configuration for my SUN V40Z should look like this:
[root@yoda /tftpboot]# cat menu.lst.0100093D14BA8D
default=0
timeout=30
min_mem64=1536
title OpenSolaris 2009.06
kernel$ /I86PC.OpenSolaris-1/platform/i86pc/kernel/$ISADIR/unix -B output-device=ttya,input-device=ttya,install_media=http://10.12.35.173:5555/jumpstart,install_service=osol2009,install_svc_address=10.12.35.173:46501,livemode=text
module /I86PC.OpenSolaris-1/x86.microroot
During an installation process an internet connection (direct or via proxy) is required, but it is also possible to create a local mirror see docs.
In the next few days I would like to test iSCSI/FC target that is available thanks to COMSTAR project.
<ai_embedded_manifest>
<ai_manifest name="default">
<ai_target_device>
<target_device_name>c8t0d0</target_device_name>
</ai_target_device>
<ai_device_partitioning> <!-- Create solaris partition -->
<partition_action>create</partition_action>
<partition_size>max_size</partition_size>
<partition_size_units>GB</partition_size_units>
<partition_type>SOLARIS</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices> <!-- Create VTOC slice 4 -->
<slice_action>create</slice_action>
<slice_number>0</slice_number>
<slice_size>max_size</slice_size>
<slice_size_units>GB</slice_size_units>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="http://pkg.opensolaris.org/release" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
<ai_http_proxy url="http://proxy_ip:3128"/>
<ai_install_packages>
<pkg name="entire"/>
<pkg name="SUNWcsd"/>
<pkg name="SUNWcs"/>
<pkg name="babel_install"/>
</ai_install_packages>
<ai_uninstall_packages>
<pkg name="babel_install"/>
<pkg name="slim_install"/>
</ai_uninstall_packages>
<ai_auto_reboot>
false
</ai_auto_reboot>
</ai_manifest>
</ai_embedded_manifest>
<sc_embedded_manifest name = "AI">
<!-- <?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="profile" name="name">
<service name="ai_properties" version="1" type="service">
<instance name="default" enabled="true">
<property_group name="ai" type="application">
<propval name="username" type="astring" value="jack"/>
<propval name="userpass" type="astring" value="9Nd/cwBcNWFZg"/>
<propval name="description" type="astring" value="default_user"/>
<propval name="rootpass" type="astring" value="$5$VgppCOxA$ycFmYW4ObRRHhtsGEygDdexk5bugqgSiaSR9niNCouC"/>
<propval name="timezone" type="astring" value="US/Pacific"/>
</property_group>
</instance>
</service>
</service_bundle>
-->
</sc_embedded_manifest>
</ai_criteria_manifest>
In default manifest there are two users available (jack/jack, root/opensolaris). During an installation it is possible to login with both users and check progress in /tmp/install_log file.
Finally the new manifest should be installed:
tsucharz@katmandu:/jumpstart/auto_install$ pfexec installadm add -m ai_custom.xml -n osol2009
Well done, installation server is ready. Because I used another boot server it is necessary to copy content of /tftpboot directory:
tsucharz@katmandu:/jumpstart/auto_install$ pfexec scp /tftpboot/* root@yoda:/tftpboot/
A boot loader (grub) configuration for my SUN V40Z should look like this:
[root@yoda /tftpboot]# cat menu.lst.0100093D14BA8D
default=0
timeout=30
min_mem64=1536
title OpenSolaris 2009.06
kernel$ /I86PC.OpenSolaris-1/platform/i86pc/kernel/$ISADIR/unix -B output-device=ttya,input-device=ttya,install_media=http://10.12.35.173:5555/jumpstart,install_service=osol2009,install_svc_address=10.12.35.173:46501,livemode=text
module /I86PC.OpenSolaris-1/x86.microroot
During an installation process an internet connection (direct or via proxy) is required, but it is also possible to create a local mirror see docs.
In the next few days I would like to test iSCSI/FC target that is available thanks to COMSTAR project.