Solaris 10 JumpStart Profiles: filesys, partitioning, cluster, package and ZFS Root Pool Examples

Solaris Admin Series, part 19. Previous: part 18, Solaris 10 JumpStart Server Setup. Related: part 17, Solaris 10 sysidcfg, part 16, Solaris 10 Software Groups (the cluster values used below), part 15, Installing Solaris 10 on x86 and part 14, Installing Solaris 10 on SPARC.

In part 18 we built a JumpStart server and used two small profiles to prove that a client could install itself. The profile is where the real decisions live: which disk is the root disk, how it is carved into slices or a ZFS pool, which software group goes on it, and which packages are added or removed. A profile is a plain text file with one keyword per line, read top to bottom by the JumpStart installer on the client. This post is the working reference: every keyword you will use in practice, UFS and ZFS root examples for SPARC and x86, how the root disk is chosen, how to dry run a profile with pfinstall before it can touch a disk, and what changes in Solaris 11.4. The syntax comes from the Oracle Solaris 10 1/13 Installation Guide: JumpStart Installations.

Prerequisites

  • A working JumpStart server as in part 18, with the JumpStart directory (/export/jumpstart in the examples) and the check script copied from Solaris_10/Misc/jumpstart_sample.
  • A decision on the software group (see part 16) and the disk layout of the target model. SPARC servers use slices of a disk named like c0t0d0s0; x86 servers add an fdisk partition layer, c0d0 or c0t0d0, as covered in part 15.
  • A Solaris 10 system (or a client booted from the Solaris 10 DVD with the install program exited) to run pfinstall. The profile must be tested on the same platform type, SPARC or x86, that it is written for.

Anatomy of a profile

A profile is one keyword and its values per line. Blank lines and anything after # are ignored. The rules for ordering matter, and several errors come from breaking them:

  • install_type must be the first keyword in every profile.
  • Only one software group (cluster SUNWCxxx) is allowed, and it must come before any other cluster or package lines. If you omit it, the End User group SUNWCuser is installed.
  • A filesys line with size free must be the last filesys entry, because it takes whatever is left of the disk.
  • Keywords that create UFS mount points (filesys for local file systems, partitioning) are not allowed in a ZFS root profile. ZFS profiles use pool and bootenv installbe instead.

Profile keyword quick reference

KeywordWhat it doesUFS rootZFS root
install_typeinitial_install, upgrade, flash_install or flash_update. Always first.All fourinitial_install only
system_typestandalone (default) or serverYesYes
partitioningdefault, existing or explicitYesNo
filesysCreate local file systems, mirrors (mirror) or mount remote onesYesOnly remote mounts (server:path)
poolCreate the ZFS root pool: name, size, swap, dump, devicesNoYes (required)
bootenvUFS: reserve an empty boot environment for a Flash archive. ZFS: name the boot environment, optionally split /varYes (createbe)Yes (installbe)
clusterPick a software group, or add or delete a clusterYesYes
packageAdd or delete a package, optionally from NFS or HTTPYesYes
root_device / boot_deviceChoose the root slice and whether to update the EEPROMYesYes (root_device is limited to a single device, not for mirrors)
usedisk / dontuseAllow or forbid disks. Cannot be used together in one profileYesYes
fdiskx86 only: create or delete fdisk partitionsYesYes
metadbCreate Solaris Volume Manager state database replicasYesNo
locale / geoInstall extra locale packagesYesYes

Example 1: a UFS profile with explicit slices (SPARC)

This is the classic layout: a root slice, swap, a separate /var, and the rest of the disk for /export/home. Sizes are in MB.

# /export/jumpstart/web_ufs
install_type    initial_install
system_type     standalone
partitioning    explicit
filesys         rootdisk.s0     8192    /
filesys         rootdisk.s1     2048    swap
filesys         rootdisk.s3     4096    /var
filesys         rootdisk.s7     free    /export/home
cluster         SUNWCuser
cluster         SUNWCacc
package         SUNWbcp delete
  • partitioning explicit means “use exactly the filesys lines”. If you only list /, the whole OS goes into the root file system.
  • rootdisk.s0 is a variable for slice 0 of the root disk. Using it keeps the profile portable between a c0t0d0 machine and a c1t1d0 machine.
  • free on the last filesys line takes the remaining space. Slice 2 stays the whole-disk overlap slice, you do not list it.
  • cluster SUNWCuser picks the End User software group, cluster SUNWCacc adds the system accounting utilities, and package SUNWbcp delete removes the binary compatibility package. Check names on an installed system with pkginfo -l.

The values that filesys accepts

FieldValues
sliceany (installer picks), c0t0d0s0 or c0d0s0, or rootdisk.sN
sizea number in MB, auto (sized from the selected software), existing (keep the current size), all (whole disk, nothing else on it), free (the rest; must be last), or start:size in cylinders
file-systema mount point, swap, overlap (a representation of a disk region, slice 2 by default), unnamed (raw slice) or ignore (only with partitioning existing)
optionalpreserve (keep the data; only with size existing and a real slice) or mount options such as ro,quota, separated by commas without spaces, that land in /etc/vfstab

any cannot be combined with sizes existing, all, free, start:size or ignore. And filesys can also mount a remote file system into the installed system: filesys js01:/export/packages 192.168.10.5 /mnt/packages ro (the syntax is server:path server-address mount-point mount-options), which is how install media or a software depot can be made available after the install.

Example 2: ZFS root pool, single disk and mirrored

Solaris 10 10/08 (update 6) and later can install straight into a ZFS root pool. The ZFS keywords are pool and bootenv installbe. The pool line has five required parts: pool poolname poolsize swapsize dumpsize vdevlist.

# /export/jumpstart/web_zfs  : single-disk root pool
install_type    initial_install
cluster         SUNWCall
pool            rpool auto auto auto rootdisk.s0
bootenv         installbe bename s10u11 dataset /var
# /export/jumpstart/web_zfs_mirror : mirrored root pool on slice 0 of two disks
install_type    initial_install
cluster         SUNWCall
pool            rpool auto auto auto mirror c0t0d0s0 c0t1d0s0
bootenv         installbe bename s10u11
# fixed sizes: 80 GB pool, 2 GB swap volume, 2 GB dump volume, any two suitable disks
install_type    initial_install
cluster         SUNWCall
pool            newpool 80g 2g 2g mirror any any
bootenv         installbe bename solaris10_6
  • poolsize auto uses the largest pool the disks allow (different from auto in UFS filesys, which means “sized by the software”). Plain numbers are MB; add g for GB.
  • swapsize is the swap zvol. auto gives half of physical memory, no less than 512 MB and no more than 2 GB. dumpsize is the dump zvol and auto picks the default.
  • vdevlist is one slice (c0t0d0s0), mirror followed by slices, or any. Only mirrors are supported when you list more than one device, and the pool is as large as the smallest member. any lets the installer choose, and the install fails if it cannot find devices big enough.
  • bootenv installbe bename NAME names the boot environment (30 characters at most, alphanumeric). The optional dataset /var puts /var in its own dataset inside the boot environment.
  • Slices, not whole disks: if you write c0t0d0 instead of c0t0d0s0 the install stops with Invalid disk name (c0t0d0). Slices keep the pool bootable and upgradeable with Live Upgrade.

ZFS root limitations in JumpStart

  • JumpStart cannot reuse an existing ZFS pool; the pool line always creates a new one.
  • Only install_type initial_install works. You cannot upgrade a ZFS root with JumpStart (use Live Upgrade), and Flash archives (flash_install, flash_update) are not available for ZFS root pools.
  • UFS-only keywords such as partitioning, local filesys and metadb are rejected in a ZFS profile. These keywords do carry over: boot_device, cluster, dontuse, fdisk, remote filesys, geo, locale, package and usedisk.
  • The boot environment you name with bootenv installbe is the one Live Upgrade clones when you patch or upgrade later.

Example 3: mirroring with Solaris Volume Manager (UFS)

With UFS root, filesys mirror builds the RAID-1 volumes for you, and metadb creates the state database replicas the volumes need:

install_type    initial_install
cluster         SUNWCuser
partitioning    explicit
filesys         mirror:d10 c0t0d0s0 c0t1d0s0 4096 /
filesys         mirror     c0t0d0s1 2048 swap
filesys         mirror:d30 c0t0d0s3 c0t1d0s3 4096 /usr
filesys         mirror:d50 c0t0d0s5 c0t1d0s5 free /export/home
metadb          c0t0d0s7 size 8192 count 3
metadb          c0t1d0s7 size 8192 count 3
  • Mirror names must be d followed by a number from 0 to 127. Leave off the name and JumpStart assigns one.
  • You may give up to two slices per mirror, each becoming a RAID-0 submirror, and filesys mirror only works for initial installs.
  • metadb defaults to three replicas of 8192 blocks each. Keep replicas on slices of both disks so that losing one disk does not lose the state database majority.

Choosing the root disk

Profiles refer to rootdisk all the time, so it is worth knowing how the installer decides what that is. In an initial install it works down this list and stops at the first answer:

StepRule
1root_device is in the profile: that is the root disk
2boot_device is in the profile: that device
3a filesys c0t0d0s0 size / line names a disk: that disk
4a rootdisk.sN entry: the first disk, in kernel probe order, with an existing root file system on that slice
5partitioning existing: the disk holding the existing root; zero or several matches is an error
6otherwise the disk where the root file system gets installed

The rootdisk probe keyword in the rules file is a different thing. It only reports which disk to boot from for matching; it does not decide where the OS is installed. To steer the install, use root_device, boot_device or explicit device names in the profile.

  • boot_device c0t0d0s0 update: sets the root slice (SPARC) and updates the EEPROM so the machine boots from it. The default is boot_device any update. On x86 you must use preserve for the EEPROM value, and the device is a disk (c0d0) rather than a slice.
  • usedisk c0t0d0 and usedisk c0t1d0 (one disk per line) restrict the installer to those disks. dontuse c0t2d0 excludes disks. You cannot use both keywords in the same profile. Use dontuse to protect SAN LUNs or data disks that a default partitioning would otherwise swallow.
  • partitioning default (the default) lets JumpStart pick disks and sizes, using rootdisk first and spilling to other disks only if the software does not fit. partitioning existing keeps all file systems except /, /usr, /usr/openwin, /opt and /var, which are recreated, and then every filesys line needs size existing.

x86: the fdisk layer

On x86 the Solaris slices live inside one fdisk partition, so the profile also needs an fdisk line, otherwise the default fdisk all solaris maxfree applies. Entries are processed in order, existing partitions are kept unless you delete them, and the Solaris partition holding the root file system is made the active one.

# /export/jumpstart/web_x86 : wipe the disk, one Solaris fdisk partition, UFS slices
install_type    initial_install
fdisk           rootdisk solaris all
partitioning    explicit
filesys         rootdisk.s0     10240   /
filesys         rootdisk.s1     2048    swap
filesys         rootdisk.s7     free    /export/home
cluster         SUNWCuser
  • fdisk c0t0d0 solaris maxfree: use the largest free space for a Solaris partition, or reuse an existing Solaris partition. The disk needs at least one unused fdisk partition and free space, or the install fails.
  • fdisk c0t0d0 0x04 delete (or dosprimary delete): remove DOS partitions by type before creating the Solaris one. A size of 0 is the same as delete.
  • fdisk rootdisk solaris all: delete everything on the disk and give it all to Solaris. all is only valid with type solaris.

Software selection: cluster and package

The cluster keyword has two jobs. With a group name it picks the software group; as in part 16, the values are:

Software groupValue
Reduced Network SupportSUNWCrnet
Core System SupportSUNWCreq
End UserSUNWCuser
DeveloperSUNWCprog
Entire DistributionSUNWCall
Entire Distribution plus OEM SupportSUNWCXall

With a cluster name, cluster SUNWCname add or delete (add is the default) adjusts the group; clusters can be adjusted in both initial installs and upgrades. package SUNWname add or delete does the same for single packages. Dependencies are your problem: deleting a package that others need can leave a system that installs but does not behave.

package can also pull a package that is not on the install media, from an NFS server or an HTTP server. If the path contains $HOST, it is replaced by the client’s host name, so each client can have its own directory. Several packages can follow, and the location of the last one is reused when omitted:

package   SUNWnew add nfs js01:/export/packages/Solaris_10 retry 5
package   SUNWother add

Locales are chosen with locale (a $LANG style value such as de_DE) or geo (a region such as N_America that contains several locales). English packages are always installed, and a locale you preset in sysidcfg is installed automatically.

Testing a profile with pfinstall

Never discover a profile mistake on the client. pfinstall reads a profile and simulates the installation without writing to a disk. Run it on a Solaris 10 system of the same platform type, from the directory that holds the profile. The -D option tests against the disk layout of the machine you are on; -d file tests against a saved disk configuration file.

Always include -D or -d. Without one of them, pfinstall installs for real and everything on the disks is overwritten.

# cd /export/jumpstart
# /usr/sbin/install.d/pfinstall -D -c /export/install/s10u11_sparc web_ufs

-c is the path to the Solaris image and is only needed when you did not boot from the DVD, such as on an already installed system where the image lives on the JumpStart server. To test a different memory size, set SYS_MEMSIZE in MB first:

# SYS_MEMSIZE=4096 ; export SYS_MEMSIZE
# /usr/sbin/install.d/pfinstall -D -c /export/install/s10u11_sparc web_zfs

A passing run goes through the profile line by line, verifies the disk configuration and the space allocation, and ends with a successful exit status. The output looks roughly like this, but the exact wording and size lines vary by release and software group:

Processing profile
        - Selecting cluster (SUNWCuser)
        - Selecting package (SUNWbcp) [delete]
Verifying disk configuration
Verifying space allocation
...
Test run complete.  Exit status 0.

Testing against a disk you do not have

A disk configuration file lets one machine test profiles for other disk layouts. On SPARC, capture the VTOC of the whole-disk slice 2:

# prtvtoc /dev/rdsk/c0t3d0s2 > 146g_sparc
# cat 146g_sparc 72g_sparc > multi_disk_test    # then make the target numbers unique
# /usr/sbin/install.d/pfinstall -d 146g_sparc -c /export/install/s10u11_sparc web_ufs

On x86 the file is built in two steps, the fdisk table and then the VTOC:

# fdisk -R -W 500_test -h /dev/rdsk/c0t0d0p0
# prtvtoc /dev/rdsk/c0t0d0s2 >> 500_test

Upgrade profiles cannot be tested with a disk configuration file; they must be run with -D on the real machine and the real installed software. On x86, pfinstall -D fails if the profile contains a locale keyword; Oracle documents a workaround for the “could not select locale” error.

Validate the whole directory with check

pfinstall tests one profile. The check script from part 18 validates the rules file and every profile it names, then writes rules.ok:

# cd /export/jumpstart
# ./check -p /export/install/s10u11_sparc
Validating rules...
Validating profile web_ufs...
Validating profile web_zfs...
The JumpStart configuration is ok.
# ls -l rules.ok
-rw-r--r--   1 root     root         182 Nov 22 09:14 rules.ok

Make sure root owns rules.ok with mode 644. Run check after every profile change, because JumpStart reads rules.ok, not rules, and a stale file silently uses the old profile.

Solaris 10 versus Solaris 11.4

Solaris 11.4 has no JumpStart profiles in the installer. Automated installs use the Automated Installer (AI): an XML manifest for disk layout and packages, plus system configuration (SC) profiles for identity. Everything the profile keywords above do has an equivalent, but the structure is different:

Solaris 10 JumpStart profileSolaris 11.4 Automated Installer
pool rpool auto auto auto mirror ...<zpool name="rpool" is_root="true"> with <vdev name="mirrored" redundancy="mirror"/> and two <disk in_zpool="rpool" in_vdev="mirrored"> elements
bootenv installbe bename NAME<be name="solaris"/> inside the zpool
cluster SUNWCall, package<software_data action="install"> with pkg:/entire and a group package such as pkg:/group/system/solaris-large-server. There is no one-to-one match with the old software groups
partitioning, filesys, fdiskWhole disks or explicit partitions and slices in the <disk> element, <filesystem> and zvol elements. UFS root is gone; root is always ZFS
usedisk / dontuse / root_device<disk_name> elements, or a selection by size, type or vendor
pfinstall -D, checkinstalladm validate, which checks a manifest before it is attached to a service
<target>
  <disk whole_disk="true" in_zpool="rpool" in_vdev="mirrored">
    <disk_name name="c1t0d0" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="rpool" in_vdev="mirrored">
    <disk_name name="c2t0d0" name_type="ctd"/>
  </disk>
  <logical>
    <zpool name="rpool" is_root="true">
      <vdev name="mirrored" redundancy="mirror"/>
      <be name="solaris"/>
    </zpool>
  </logical>
</target>

This is the Oracle example for a mirrored root pool on 11.4. To migrate existing JumpStart profiles, the js2ai tool (in the install/js2ai package) converts them: js2ai -p web_zfs converts one profile and js2ai -r rules converts a rules file into AI criteria. Review the generated manifest and the warnings, because keywords with no direct equivalent are reported rather than translated. The AI posts later in this series cover manifests, SC profiles and criteria in detail.

Troubleshooting

SymptomLikely cause and fix
Invalid disk name (c0t0d0) in a ZFS profileWhole disk used in pool. Use slices such as c0t0d0s0.
check reports a bad profile or keywordA UFS keyword in a ZFS profile (partitioning, local filesys, metadb), a second software group, cluster placed after package, or install_type not first.
free does not workfilesys ... free must be the last filesys line.
Wrong disk got installedInstaller chose rootdisk by the rules above. Set root_device or boot_device, or exclude other disks with dontuse.
Both usedisk and dontuseNot allowed in the same profile; use one.
Not enough space for the softwareThe slices are too small for the cluster you chose. Use auto for sizes or compare against the group sizes from part 16, and re-run pfinstall -D.
Change to profile has no effectrules.ok was not regenerated. Run ./check again.
x86 install fails on fdiskThe disk has no unused fdisk partition or free space for maxfree; use fdisk ... delete first or all.
x86 EEPROM error with boot_deviceOn x86 the second value must be preserve.

What was tested

I did not run these profiles on a live Solaris 10 JumpStart client. The keyword syntax, ordering rules, defaults and limits, the pfinstall options and the disk configuration file procedures come from the Oracle Solaris 10 1/13 Installation Guide: JumpStart Installations (E28039) and the Solaris 11.4 documentation. The disk names, host names and sizes are the sample values of the lab in part 18. The pfinstall and check output above is representative, not a captured transcript. The examples apply to Solaris 10 (the 1/13 guide is the reference; ZFS root needs Solaris 10 10/08 or later in practice). Dry run every profile with pfinstall -D on a non-production machine first.

Solaris Admin Series: this is part 19. Previous: part 18, Solaris 10 JumpStart Server Setup. Catch up with part 17, Solaris 10 sysidcfg, part 16, Solaris 10 Software Groups, part 15, Installing Solaris 10 on x86, part 14, Installing Solaris 10 on SPARC and part 2, Solaris on SPARC vs x86. Next up: JumpStart begin and finish scripts for post-install automation (part 20), followed by DHCP, x86 PXE and WAN boot (part 21).

References: Oracle Solaris 10 1/13 Installation Guide: JumpStart Installations (chapters 3 and 8 for profiles and keywords, chapter 9 for ZFS root pools, and the sections on testing profiles and creating disk configuration files); Converting Rules and Profile Files (js2ai); Oracle Solaris 11.4 Installing the ZFS Root Pool; the pfinstall(1M) and check documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *