How to get the initdefault run level in Solaris 10

Hi All,

In Solaris 9 and below
I will get the init run-level by checking the /etc/inittab entry
is:3:initdefault:

But in Solaris 10 we are using the smf functionality.
Here how I can get the init default run level.
Please help me in this problem.

Regards,
Kalai

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

Solaris 10 uses milestones, as well as the older way of working. So, you can either boot to certain levels, or milestones. In the old days, there were init S/1 2 3 5, but you tend to just boot from either S/1 or 3.

So, with this in mind, you use the milestones as a way of moving up the init level tree.

1 Boot without starting any services.
This command instructs the svc.startd daemon to temporarily disable all services and start sulogin on the console.

ok boot -m milestone=none

2 Log in to the system as root.

3 Enable all services.
# svcadm milestone all

4 Determine where the boot process is hanging.
When the boot process hangs, determine which services are not running by running svcs -a.
Look for error messages in the log files in /var/svc/log.

5 After fixing the problems, verify that all services have started.
a. Verify that all needed services are online.
# svcs -x
b. Verify that the console-login service dependencies are satisfied.
This command verifies that the login process on the console will run.
# svcs -l system/console-login:default

6 Continue the normal booting process.

The who -r command still shows the current run level. Do a bit of research on smf / milestones.

SBK