Ben,
I haven't tried something specific like this, but DC *does* have a
section in the manifests where SMF profiles are listed:
<!--
SMF service profiles to be applied to the boot_archive.
These profiles are applied in the order they are specified.
-->
<configuration *name=*"pre-pkg-img-mod" *type=*"sysconf"
*source=*"/etc <http://src.opensolaris.org/source/s?path=etc&project=caiman>/svc
<http://src.opensolaris.org/source/s?path=etc/svc&project=caiman>/profile
<http://src.opensolaris.org/source/s?path=etc/svc/profile&project=caiman>/generic_limited_net.xml
<http://src.opensolaris.org/source/s?path=etc/svc/profile/generic_limited_net.xml&project=caiman>">
<validation *path=*"/usr <http://src.opensolaris.org/source/s?path=usr&project=caiman>/sbin
<http://src.opensolaris.org/source/s?path=usr/sbin&project=caiman>/svccfg
<http://src.opensolaris.org/source/s?path=usr/sbin/svccfg&project=caiman>" *args=*"apply -n"/>
</configuration>
<configuration *name=*"pre-pkg-img-mod" *type=*"sysconf"
*source=*"/usr <http://src.opensolaris.org/source/s?path=usr&project=caiman>/share
<http://src.opensolaris.org/source/s?path=usr/share&project=caiman>/distro_const
<http://src.opensolaris.org/source/s?path=usr/share/distro_const&project=caiman>/profile
<http://src.opensolaris.org/source/s?path=usr/share/distro_const/profile&project=caiman>/generic.xml
<http://src.opensolaris.org/source/s?path=usr/share/distro_const/profile/generic.xml&project=caiman>">
<validation *path=*"/usr <http://src.opensolaris.org/source/s?path=usr&project=caiman>/sbin
<http://src.opensolaris.org/source/s?path=usr/sbin&project=caiman>/svccfg
<http://src.opensolaris.org/source/s?path=usr/sbin/svccfg&project=caiman>" *args=*"apply -n"/>
</configuration>
<configuration *name=*"pre-pkg-img-mod" *type=*"sysconf"
*source=*"/usr <http://src.opensolaris.org/source/s?path=usr&project=caiman>/share
<http://src.opensolaris.org/source/s?path=usr/share&project=caiman>/distro_const
<http://src.opensolaris.org/source/s?path=usr/share/distro_const&project=caiman>/profile
<http://src.opensolaris.org/source/s?path=usr/share/distro_const/profile&project=caiman>/ai.xml
<http://src.opensolaris.org/source/s?path=usr/share/distro_const/profile/ai.xml&project=caiman>">
<validation *path=*"/usr <http://src.opensolaris.org/source/s?path=usr&project=caiman>/sbin
<http://src.opensolaris.org/source/s?path=usr/sbin&project=caiman>/svccfg
<http://src.opensolaris.org/source/s?path=usr/sbin/svccfg&project=caiman>" *args=*"apply -n"/>
</configuration>
<configuration *name=*"pre-pkg-img-mod" *type=*"sysconf"
*source=*"/etc <http://src.opensolaris.org/source/s?path=etc&project=caiman>/svc
<http://src.opensolaris.org/source/s?path=etc/svc&project=caiman>/profile
<http://src.opensolaris.org/source/s?path=etc/svc/profile&project=caiman>/ns_files.xml
<http://src.opensolaris.org/source/s?path=etc/svc/profile/ns_files.xml&project=caiman>">
<validation *path=*"/usr <http://src.opensolaris.org/source/s?path=usr&project=caiman>/sbin
<http://src.opensolaris.org/source/s?path=usr/sbin&project=caiman>/svccfg
<http://src.opensolaris.org/source/s?path=usr/sbin/svccfg&project=caiman>" *args=*"apply -n"/>
</configuration>
You *might* be able to simply drop your sc_profile.xml in right at the
end and have the miniroot pick those customizations up. That way you
wouldn't have to unpack an ISO, hack it, and repack it back up.
-Drew
On 5/24/12 7:52 AM, Ben de Mora wrote:
Hi all,
I've got a bit of a tough challenge here that I'm hoping someone on
this alias can help with.
In a nutshell, I'm trying to create a process to generate a customised
host-specific Solaris 11 AI boot ISO. I know this is an opensolaris
alias, but I'm hoping there are enough parallels in this case.
Essentially, I want to be able to preconfigure all of a host's details
(IP address, hostname, DNS, passwords, SMF configs, etc) in an XML
profile (such as one would use with sysconfig), and use that along
with my manifest XML file that describes packages and filesystem
layouts, in order to create a "disposable" single-use boot ISO that
will install all of it's packages from a preconfigured IPS repository.
The idea being that the target system can boot off a CD / ISO and
already know it's IP address, hostname, local DNS servers, default
gateway, IPS Repo (pkg publisher), and all it needs to do is start
hauling IPS packages over port 80 and perform the install and ensuing
system config according to those details.
This need has arisen because the target data centre for this solution
has no DHCP, and broadcast / multicast traffic of any kind is locked
down. There is a similar solution already in place for Linux installs,
where the boot ISO contains the host config files along with just
enough stuff to allow the server to begin installing packages from a
YUM repository. Thus, the Solaris 11 boot ISO needs to be able to boot
and then reference the IPS repo to install it's packages without
needing to send out any broadcasts or requests for addresses etc.
My current intended approach (which only partially works) is to
manually break apart the standard AI ISO file image, extract all the
contents, then extract the contents of the solaris.zlib within that,
then modify the manifest and enable_sci.xml profile stuff, then roll
it back up and recreate the ISO. This process is automated within a
single shell script. It boots just fine, but it fails to find these
config files and use them. I get a "Please enter URL for AI Manifest"
request during boot.
My assumption is that either I'm not putting the manifest / profile
XML docs in the right place within the CD, or that some config file
somewhere within the boot image needs to be altered to reference these
files for configuration.
It's probably worth pointing out (in order to pre-empt the question)
that my profile and manifest XML files are in perfect working order -
these exact same files are in use within my testing lab's AI server
setup, and merrily provision testing clients over the network there.
For clarity, here is an excerpt from a script I've created (please
ignore the poor scripting, and note this is the x64 bit - I also have
an equivalent sparc section) that details the creation of the ISO:
cp $WORKDIR/profile.xml
$ZLIB/$SYS_ARCH/share/auto_install/sc_profiles/enable_sci.xml
cp $WORKDIR/manifest.xml
$BUILD/$SYS_ARCH/auto_install/manifest/default.xml
mkisofs -o /tmp/solaris.zlib -quiet -N -l -R -U
-allow-multidot -no-iso-translate -cache-inodes -d -D -V "compress"
$ZLIB/$SYS_ARCH > /dev/null 2>&1
lofiadm -C lzma /tmp/solaris.zlib && mv /tmp/solaris.zlib
$BUILD/$SYS_ARCH/solaris.zlib
cd $BUILD/$SYS_ARCH
mkisofs -d -D -J -l -r -U -relaxed-filenames -b
boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4
-boot-info-table -c .catalog -V "$NODE-$LOC-S11-$SYS_ARCH-ISO" -o
$CWD/$NODE-$LOC-S11-$SYS_ARCH.iso $BUILD/$SYS_ARCH > /dev/null 2>&1
I'd be eternally indebted to anyone who could point me in the right
direction here!
Many thanks in advance.
Ben
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss