Friday, 23 June 2017

Booting to the none milestone in Solaris 10 x86 architecture system

In this brief article I'll describe how to boot a Solaris x86 system into the none milestone for troubleshooting purposes. A milestone is basically a designated point during the Solaris boot process which denotes the activation of a certain set of services. These milestones can be considered analogous to run levels.

The available milestones are listed below filtered from the "svcs -a" output:


An optimally functioning system would boot to svc:/milestone/multi-user-server:default milestone which is analogous to run level 3.
Here's some more information about the multi-user-server milestone:

root@sandbox:/# svcs -l svc:/milestone/multi-user-server:default
fmri         svc:/milestone/multi-user-server:default
name         multi-user plus exports milestone
enabled      true
state        online
next_state   none
state_time   Fri Jun 23 21:57:58 2017
logfile      /var/svc/log/milestone-multi-user-server:default.log
restarter    svc:/system/svc/restarter:default
dependency   require_all/none svc:/milestone/multi-user (online)
dependency   optional_all/none svc:/application/management/dmi (online)
dependency   optional_all/none svc:/application/management/snmpdx (online)
dependency   optional_all/none svc:/network/ssh (online)
dependency   optional_all/none svc:/network/dhcp-server (disabled)
dependency   optional_all/none svc:/network/samba (disabled)
dependency   optional_all/none svc:/network/rarp (disabled)
dependency   optional_all/none svc:/network/nfs/server (disabled)
dependency   optional_all/none svc:/network/winbind (disabled)
dependency   optional_all/none svc:/network/rpc/bootparams (disabled)
dependency   optional_all/none svc:/network/wins (disabled)


If the server is unable to boot to a functaional or usable state the alternative is to boot into single user mode and troubleshoot the issue. In Solaris in single user mode no login services ecept for sulogin on the cosole are running. Apart from single user mode we also have the option of booting the server into the none milestone. It's availble fe although not listed within svcs -a output.
If a problem prevents user programs from starting normally then a Solaris 10 system can be instrcuted to start as few porgrams as possible during boot by specifying the -m milestone=none in the boot arguments. Once logged in the svcadm milestone all command can be issued to instruct SMF to continue initialization as usual.

Now, we'll go through a demo.

Reboot the Solaris system and interrupt the boot process by typing e and we will be presented with the below screen:



Use the arrow key to move to the line beginning with the word kernel and press e to enter the grub promtp to pass a boot argument.

Once here type -m milestone=none after $ZFS-BOOTFS as shown below


Now press enter. We are back to the previous screen but now we can observe that the boot argument we provided will be passed to the kernel during system startup.


Press b to continue with boot.

After the system boots we observe the message stating the system has booted to milestone none and we are prompted to enter the root password for system maintenance.



A this point we can login and perform any troubleshooting actions that are required and once done we need to type svcadm milestone all to instruct SMF to proceed with the system initialization process as shown below


No comments:

Post a Comment

Using capture groups in grep in Linux

Introduction Let me start by saying that this article isn't about capture groups in grep per se. What we are going to do here with gr...