grub

Run Level 1

Run Level Change the run level - on RHEL reboot press a key in Grub,

go to the kernel like. Press a and add 1 at the end of the line.

Then Press return

Check the runlevel

runlevel

You should see

1 S

Run level 1 Single user

Password hit

passwd

Debian

to boot into the OS direct as root

  • Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
  • As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.
  • You will see a GRUB boot prompt - press "e" to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)
  • Find the kernel line (starts with "linux /boot/") and add init="/bin/bash" at the end of the line (On CentOS 7, the line may start with linux16).
  • Press CTRL-X or F10 to boot. System will boot and you will see the root prompt. Type "mount -rw -o remount /" and then "passwd" to change the root password and then reboot again. 6.1 For Ubuntu 17.04, the command may need to be mount -o remount,rw /.