You are here

How to Boot into Single User Mode in CentOS/RHEL 7

Error message

  • Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1389 of /usr/share/nginx/html/blog.headup.ws/htdocs/includes/bootstrap.inc).
  • Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1389 of /usr/share/nginx/html/blog.headup.ws/htdocs/includes/bootstrap.inc).

DISCLAIMER: this is not my post is only a copy, in case the original get deleted or whatever, posting on my personal blog get easier for me to find it. You can find the original one in this link https://vpsie.com/knowledge-base/boot-single-user-mode-centos-rhel-vpsie/

The first thing to do is to open Terminal and log in to you CentOS 7 server.

After, restart your server wait for GRUB boot menu to show.

Next step is to select your Kernel version and press

e

key to edit the first boot option.Find the kernel line (starts with “linux16“), then change the

ro

to

rw init=/sysroot/bin/sh .

When you have finished, press

Ctrl-X

or

F10

to boot into single user mode

After mount root filesystem using the following command:

chroot /sysroot/

Now, to finish this process reboot your server using the following command:

reboot -f

Tags: