A journey to the center of boot

Liane Praza’s Weblog:
A journey to the center of boot

With the tools that smf(5) brings, you can now watch boot from the inside. Well, at least the user-land part of boot.

I personally think it is pretty cool to watch the system come up bit by bit, but perhaps not everyone shares my overdeveloped sense of wonder at a service graph. Watching boot happen is also actually useful if you’re finding you can’t get a console login prompt. We make a concerted effort with smf to drop you to a root password prompt if something goes wrong, but there are some cases where the system appears hung and there’s no login prompt to be seen. They’re rare, but not completely impossible.

At the boot prompt (ok on sparc, Select (b)oot or (i)nterpreter: on x86), type b -m milestone=none. That’ll get you to here:

Select (b)oot or (i)nterpreter: b -m milestone=none
SunOS Release 5.10 Version gate:2005-01-10 32-bit
Copyright 1983-2005 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
DEBUG enabled
Booting to milestone "none".
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run

Root password for system maintenance (control-d to bypass):

Log in. If you run svcs now, you’ll note that all services are disabled or uninitialized. The disabled services are temporarily disabled by svc.startd because that’s how we implement running in a limited milestone: we temporarily disable all services that aren’t part of that milestone’s subgraph. The uninitialized services are managed by a different restarter than svc.startd. Their restarters haven’t shown up yet to manage their state, so they remain uninitialized.

Now, to start up the rest of the system. Run svcadm milestone all, then use svcs to watch your system start up. I won’t post examples here, as this is really easy to try yourself. If you’re looking to debug a specific problem, wait until the svcs output stabilizes, then run svcs -x to see what services are causing trouble. Look at the services’ logfiles for more details on what’s going wrong.

Finally, when you’re done poking around, just exit the login shell to resume normal console login.

[composed and posted with ecto]

Solaris Tips & Tricks: IP Multipathing

The Blog of Ben Rockwood: Solaris Tips & Tricks: IP Multipathing.

Auto-building open-source apps with pkgsrc

Eric Boutilier: Auto-building open-source apps with pkgsrc

Setting up Postfix under Greenline (SMF)

This article introduces adding a new service to Solaris 10’s SMF (Service Management Facility).

SMF Quickstart
Using SMF/svcadm

Making friends with OBP

Unix Admin Corner: Making friends with OBP.

Solaris 10 Quickstart

Installing SUNpci after adding packages:

# cd /opt/SUNWspci3/drivers/solaris/
# ln -s sunpcidrv.280 sunpcidrv.2100
# ln -s sunpcidrv.280.64 sunpcidrv.2100.64
# ./sunpcload

Enabling IPF:

# vi /etc/ipf/pfil.ap (uncomment interface type)
# vi /etc/ipf/ipf.conf
# svcadm restart network/pfil
# svcadm enable network/ipfilter
# ifconfig [interface] down
# ifconfig [interface] unplumb
# ifconfig [interface] plumb [address] netmask [netmask] up
# ipfstat -io (will show running ruleset)

Listing inetd services:

# inetadm

Disable an inetd service

# inetadm -d [service name]

Listing all services:

# svcs -a

Disable/enable a non-legacy service:

# svcadm enable|disable [service path (e.g. network/nfs/client)]

Minimizing services:

# svccfg apply /var/svc/profile/generic_limited_net.xml

Enable TCP Wrappers and TCP tracing for inetd:

# inetadm -M tcp_trace=true
# inetadm -M tcp_wrappers=true

Enabling TCP wrappers for rpcbind:

# svccfg
svc:> select /network/rpc/bind
svc:/network/rpc/bind> setprop config/enable_tcpwrappers =
boolean: "true"
svc:/network/rpc/bind> setprop config/verbose_logging =
boolean: "true"