LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 05-01-2007, 12:30 PM   #1
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Default Run Level


Hello All,

I've just finished my first installation of Solaris 10 (on an x86 server). And I have a question.

After the installation finished it started in GUI mode. How do I change the default runlevel to 3? I tried to edit the /etc/inittab file but the file (obviously) looks nothing like the Linux inittab file.

How do I edit this file? Which line do I edit?
Code:
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# The /etc/inittab file controls the configuration of init(1M); for more
# information refer to init(1M) and inittab(4).  It is no longer
# necessary to edit inittab(4) directly; administrators should use the
# Solaris Service Management Facility (SMF) to define services instead.
# Refer to smf(5) and the System Administration Guide for more
# information on SMF.
#
# For modifying parameters passed to ttymon, use svccfg(1m) to modify
# the SMF repository. For example:
#
#       # svccfg
#       svc:> select system/console-login
#       svc:/system/console-login> setprop ttymon/terminal_type = "xterm"
#       svc:/system/console-login> exit
#
#ident  "@(#)inittab    1.41    04/12/14 SMI"
ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -f /etc/sock2path
smf::sysinit:/lib/svc/bin/svc.startd    >/dev/msglog 2<>/dev/msglog </dev/console
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
pt:s1234:powerfail:/usr/lib/svc/method/installupdates lock</code>

Last edited by custangro; 05-01-2007 at 12:31 PM.
 
Old 05-01-2007, 01:58 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 79
Quote:
How do I edit this file? Which line do I edit?
You don't edit it. I guess you didn't read the comments
"... It is no longer necessary to edit inittab(4) directly; administrators should use the Solaris Service Management Facility (SMF) to define services instead. ..."

If you don't read smf(5) man page, but instead do a Google search about it, you'll find these in the result:

http://www.google.com/search?hl=en&r...fault+runlevel

Solaris Service Management Facility - Quickstart Guide
svcadm(1M) is now the preferred method of setting the system's default run level. This is done with the milestone subcommand and the FMRI of a valid milestone:

Old method
Code:
# vi /etc/inittab
SMF Method
Code:
# svcadm milestone -d milestone/single-user:default
http://www.sun.com/bigadmin/content/...uickstart.html

Run Levels
Run Level => SMF Milestone FMRI

S => milestone/single-user:default

2 => milestone/multi-user:default

3 => milestone/multi-user-server:default

http://docs.sun.com/app/docs/doc/819...4m1vlg3?a=view

Last edited by bsdunix; 05-01-2007 at 02:01 PM.
 
Old 05-01-2007, 02:49 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Original Poster
Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by bsdunix
You don't edit it. I guess you didn't read the comments
"... It is no longer necessary to edit inittab(4) directly; administrators should use the Solaris Service Management Facility (SMF) to define services instead. ..."

If you don't read smf(5) man page, but instead do a Google search about it, you'll find these in the result:

http://www.google.com/search?hl=en&r...fault+runlevel

Solaris Service Management Facility - Quickstart Guide
svcadm(1M) is now the preferred method of setting the system's default run level. This is done with the milestone subcommand and the FMRI of a valid milestone:

Old method
Code:
# vi /etc/inittab
SMF Method
Code:
# svcadm milestone -d milestone/single-user:default
http://www.sun.com/bigadmin/content/...uickstart.html

Run Levels
Run Level => SMF Milestone FMRI

S => milestone/single-user:default

2 => milestone/multi-user:default

3 => milestone/multi-user-server:default

http://docs.sun.com/app/docs/doc/819...4m1vlg3?a=view
Thank you! This worked perfectly....

Hmmm....maybe I should read ALL the comments in a file before posting ....sorry
 
Old 05-01-2007, 03:08 PM   #4
bsdunix
Senior Member
 
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 79
Quote:
Hmmm....maybe I should read ALL the comments in a file before posting
No problem, I get that way sometimes too.
 
Old 05-01-2007, 11:31 PM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,499

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Quote:
Originally Posted by custangro
After the installation finished it started in GUI mode. How do I change the default runlevel to 3?
Solaris default runlevel (now miletone) is already 3, but there is no runlevel 4 to enable the GUI with Solaris. This is something specific to most (but not all) Linux distributions.

If what you are really looking for is how to disable the graphic environment, this can be done with that command: "/usr/dt/bin/dtconfig -d" or better with latest Solaris 10: "svcadm disable cde-login".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs in run level 3 then switch to X (level 7) then back to level 3 dsoliver Slackware 3 09-01-2006 03:31 AM
Why Run Level 2 by Default? aquaboot Ubuntu 4 08-24-2005 07:50 PM
Can I set the default printer on a user level? robinBones Linux - Software 3 12-02-2004 07:40 PM
No packets received at application-level without a default gateway urban_olofsson Linux - Networking 3 10-29-2004 08:51 AM
Setting default run level blacktempest07 Linux - Newbie 2 03-03-2004 12:47 AM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration