Change init level

General support questions
nobody
Posts: 65
Joined: 2012/04/13 00:53:49

Change init level

Postby nobody » 2014/07/18 12:27:13

Hi,

Seems CentOS 7 has no longer support run level setting in inittab, where can I change the boot level without X?

Thanks.

- j

User avatar
WhatsHisName
Posts: 1534
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Change init level

Postby WhatsHisName » 2014/07/18 14:03:42

Code: Select all

# cat /etc/redhat-release

 Red Hat Enterprise Linux Server release 7.0 (Maipo)

# cat /etc/inittab

 # inittab is no longer used when using systemd.
 #
 # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
 #
 # Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
 #
 # systemd uses 'targets' instead of runlevels. By default, there are two main targets:
 #
 # multi-user.target: analogous to runlevel 3
 # graphical.target: analogous to runlevel 5
 #
 # To set a default target, run:
 #
 # ln -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target
 #

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: Change init level

Postby nbritton » 2014/07/18 15:14:26

nobody wrote:Seems CentOS 7 has no longer support run level setting in inittab, where can I change the boot level without X?


Runlevel 3 is now multi-user.target and runlevel 5 is now graphical.target.

systemctl set-default multi-user.target;
systemctl set-default graphical.target;

To switch from graphical to multi-user:
systemctl isolate multi-user.target;

To switch from multi-user to graphical:
systemctl isolate graphical.target;

http://www.freedesktop.org/software/sys ... ecial.html

https://www.youtube.com/watch?v=jbYucYX1WwM

Zedrick
Posts: 1
Joined: 2015/03/05 09:44:33

Re: Change init level

Postby Zedrick » 2015/03/05 10:03:23

Reviving an old thread with a follow-up question.

How can I boot into "multi-user.target" from grub? I can't use systemctl if I can't start CentOS.

User avatar
TrevorH
Forum Moderator
Posts: 19441
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Change init level

Postby TrevorH » 2015/03/05 10:30:12

Appending the digit 3 to the end of the kernel command line still works to bring it up in the systemd equivalent of runlevel 3. You can also use the methods discussed in the upstream documentation https://access.redhat.com/documentation ... oader.html
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke


Return to “CentOS 7 - General Support”

Who is online

Users browsing this forum: No registered users and 2 guests