Verified and Tested 02/28/2015
This article will show you how to enter single user mode for maintenance of multi-user environments or changing/resetting a lost superuser password of Ubuntu servers.
Why do I need this?
My cloud server will only enter read-only mode, FSCK complains about permissions, or I need to make sure no one can access my server while I make security changes.
I forgot my cloud server password, and I would not like to use the automated password reset feature (see https://www.atlantic.net/community/howto/resetting-a-cloud-server-password/).
You will need to access your cloud server using the provided VNC. See the following URL on how to access the server. https://www.atlantic.net/community/howto/using-vnc-to-access-a-cloud-server/
Entering Single User Mode for Ubuntu
Once you have decided that single user mode is the only way you can or want to proceed, you will need to VNC to the server. Don’t worry about logging into the server at this point, since this process will need you to reboot the server.
From the cloud portal issue a hard reboot, instructions here: https://www.atlantic.net/community/howto/how-do-i-soft-or-hard-reboot-my-cloud-server/
Once you issue the hard reboot, you may need to click Refresh in the top right of the VNC screen since the hard reboot will reset that connection. You need to click this refresh very quickly otherwise you will miss the boot screen where you can interrupt the boot process.
When the server starts to boot, you will see a GRUB menu/screen. You will need to interrupt the boot by pressing any key.
Now you can edit the default kernel your system boots to. By default, the most recently added kernel is at the top of the list and is the default kernel.
Press e to edit.
Grub boot menu
Go to the line that starts with “linux /boot/vmlinuz”.
Replace the end of the line “ro \ console=ttyS0 console=tty0” with “rw init=/bin/bash”.
Press F10 to boot into the newly edited kernel.
Boot to single user
If you get an error like I did, just press enter.
Now you are in single user mode. You may perform actions such as FSCK, passwd, and other commands for maintenance.