The post describes few troubleshooting tips for resolving the boot issues related to SMF(Service Management Facility). We can boot to early milestones and can go from one level to the next. this way we can identify the milestone causing the issues and eventually the service causing it.
Before going into more detailed troubleshooting, we can enable a more verbose debugging while booting the server. Look at results of below booting commands to check for any error messages (options ‘-vV’ and ‘-m verbose’ can be combined).
ok> boot -vV ## display verbose debugging information verbose info of OBP boot and kernel ok> boot -m verbose ## to show which service was last run and use that to check which service which should be run next. Provides verbose information on SMF. ok> boot -m debug ## this shows SMF services in very verbose level. Not recommended in normal cases.
SMF and milestones
1. Try to boot to the various levels from the ok prompt
ok> boot -m milestone=none ## This won't load any services so if one of them is causing problems you can fix it before loading it. ok> boot -m milestone=single-user ok> boot -m milestone=multi-user ok> boot -m milestone=multi-user-server
2. boot to early milestone and go from one level to the next
ok> boot -m milestone=none # svcadm -v milestone svc:/milestone/single-user:default # svcadm -v milestone svc:/milestone/multi-user:default # svcadm -v milestone svc:/milestone/multi-user-server
3. Check the status of the services required for each run level
# svcs -d milestone/single-user:default # svcs -d milestone/multi-user:default # svcs -d milestone/multi-user-server:default
If a service is shown as disabled that should be enabled, try to re-enable it with:
# svcadm -v enable -r [FMRI]
# svcadm -v enable -r svc:/system/device/local:default # svcadm -v enable -r svc:/system/filesystem/local:default
The -r option, for recursive, will start the dependencies
4. Check the status of all failing services
# svcs -xv
5. Refer log files
For problem services refer to the log files located in
/etc/svc/volatile is an empty mountpoint that a tmpfs is mounted on during boot So it will only have files in the active boot environment
6. Rebuild the repository
We can also rebuild the SMF repository if required. Note that if you select boot, your system will reboot during the rebuild.
or if booted failsafe
# /a/lib/svc/bin/restore_repository -r /a
7. Check status of milestones
# svcs | grep milestone online Jun_05 svc:/milestone/network:default online Jun_05 svc:/milestone/devices:default online Jun_05 svc:/milestone/single-user:default online Jun_05 svc:/milestone/sysconfig:default online Jun_05 svc:/milestone/name-services:default online Jun_05 svc:/milestone/multi-user:default online Jun_05 svc:/milestone/multi-user-server:default
The troubleshooting steps mentioned in the post are specifically related to SMF issues and may not be applicable in other hardware or software issues.