* Mark Maule <mark_maule at yahoo.com> [2009-12-14 22:07]: > This is probably the wrong discussion group, but since smf would be a > component, I'm starting here ... > > I'm attempting to build a custom boot archive for an appliance which > has no disk. As such I will be running everything out of a writeable > ram-fs and running custom code in addition to code built from os-nv. > I would like to leverage smf to get my code running rather than > hacking inittab to just start the things I need. > > What I need minimally is: > > console login > dhcp client > ssh > syslogd > > One of the things I'm struggling with is finding the minimal set of > bits to stuff in the boot archive such that smf will come up to the > single-user milestone. > > Is there precedent for building such a minimal boot archive? I > realize this is an open-ended question - I can supply more details as > needed.
pkg(5) will help you with the package dependencies, but getting service dependencies is harder--less automated--than I would like. Right now, you have to use "svcs -d _instance_fmri_" to get the dependencies of _instance_fmri_. Then you have to search for that FMRI pattern in the manifests in /var/svc/manifest. Finally, you can search for the appropriate files in one of the pkg(5) repositories. As an example, let's follow console login from your list above. $ svcs -d console-login:default STATE STIME FMRI disabled 11:18:05 svc:/system/auditd:default online 11:18:06 svc:/system/identity:node online 11:18:09 svc:/system/filesystem/minimal:default online 11:18:23 svc:/milestone/sysconfig:default online 11:18:23 svc:/system/utmp:default $ ggrep -R identity /var/svc/manifest ... /var/svc/manifest/system/identity.xml:<service_bundle type='manifest' name='SUNWcsr:identity'> /var/svc/manifest/system/identity.xml: name='system/identity' /var/svc/manifest/system/identity.xml: exec='/lib/svc/method/identity-node' /var/svc/manifest/system/identity.xml: system identity (nodename) /var/svc/manifest/system/identity.xml: exec='/lib/svc/method/identity-domain' /var/svc/manifest/system/identity.xml: system identity (domainname) ... $ pkg search -l identity.xml INDEX ACTION VALUE PACKAGE basename file var/svc/manifest/system/identity.xml pkg:/SUNWcs at 0.5.11-0.129 Then follow our new service down... $ svcs -d identity:node ~ STATE STIME FMRI disabled 11:18:05 svc:/network/physical:default online 11:18:06 svc:/network/loopback:default online 11:18:06 svc:/network/physical:nwam until we have no further dependencies from "svcs -d". Now repeat for the other four services from console-login. Tedious. My goal in this area is to make the service dependency tracking part of the package dependencies, so that, by installing a package delivering one or more services, you get all the service dependencies automatically. As Bernd says, it may be easier to start with one of the smaller distros, like MiLaX; in particular, searching through application dependencies probably won't get you a correct set of hardware device drivers. Cheers Stephen -- sch at sun.com http://blogs.sun.com/sch/