WARNING: Using single-user mode can be potentially dangerous. This guide is designed for those who are technically advanced. The wording in this may be confusing to some, and if so, please do not use this guide unless specifically told by a support agent.

Booting into single user mode permits you to access the file system in a read/write permissive mount that allows you to make modifications to the server you otherwise wouldn't without a recovery environment. This can be used for multiple things, including but not limited to:

Recovering the root password, if the root password reset does not work on the panel
Recovering server data, modifying correct network parameters
Modifying kernel parameters
Any other low-level system operations that require a runlevel of 1

Due to the lack of services on single-user mode, SSH will not be available. You'll need to use your servers VNC server to access the console of the server to continue with the recovery.

The VNC server acts as a KVM. You can do anything, including boot from a custom ISO image file.

A screen like this should appear, when it does, you need to press the e key to edit the grub configuration.

GRUB for CentOS 7.x Menu

Next, you'll come up with a bunch of text. Scroll down until you find a line that starts with linux16, then look for the two characters "ro"

ro stands for read-only.

Since we'll want to adjust this to allow read/write operations, and with the proper shell, we'll need to just the configuration to the following:

Replace ro with rw init=/sysroot/bin/sh

Once this has been completed, please press f10 or ctrl-x to continue boot sequence. These changes will not be saved once the server is rebooted.

You'll receive a prompt like this, if you do, please run the command chroot /sysroot/

Successful Single-User boot

You are now running in init level 1 / single-user mode. All operations are available for low-level maintenance tasks.

WARNING: DO NOT RUN YOUR SERVER FROM THIS MODE. ONCE YOU HAVE COMPLETED WHAT YOU ARE WANTING TO DO, PLEASE REBOOT THE SERVER USING A SOFT REBOOT.
Was this article helpful?
Cancel
Thank you!