8/20/20

Simple way to Boot up CentOS 7 / RHEL 7 in single user mode

The simplest way I found to boot up CentOS or RHEL version 7 is as follows:

  • Boot up or reboot your server
  • Choose the desired kernel from the Grub boot loader menu by moving with your keyboard's arrow keys
  • Press "e" (for Edit ) on your keyboard then scroll down the lines till you see the line that begins with "linux16" word
  • Navigate to the end of the line and type “rd.break” at end of the line
  • Hold down "Ctrl+x" to boot up that kernel you just edited


  • Once booting up is finished, you should see a message saying "Entering Emergency Mode" and you should be presented with a shell prompt 
  • Remount /sysroot in ‘rw’ mode with the following commands:
    • switch_root:/# mount -o remount,rw /sysroot
    • switch_root:/# chroot /sysroot


  • Once mounting the fs is done successfully,  you can proceed with whatever the reason was for booting in Single user mode, like checking/fixing partitions, resetting root's password, disabling/enabling service, etc..
Once you are finished doing what you need to do while in Single User Mode, type exit or hold down the "Ctrl+d" keys to exit that shell, then reboot your system your usual way like shutdown -r now or reboot etc..

That's all.


No comments:

Quick HTTP to HTTPS - Apache2

There are several methods for redirecting your Apache-based website visitors who might type your servers URL using the plain (non-secure) HT...