Friday, February 21, 2014

Ubuntu 12.04 Grub to boot into single user mode

Hi,

Steps to boot in single user mode in Ubuntu 12.04:

Step 1: When you start your system, press "shift" key continuously to get the grub loader screen.

Step 2: In Grub 2 menu, select the menu with Linux 3.2.0.23-generic-pae highlighted.

Step3: Press 'e' to edit the grub2 menu.

Step 4:  Move the cursor to the line that starts with "linux /boot/vmlinuz-3.2.0-23-generice-pae".

Step 5: Change the content "ro quiet spalsh $vt_handoff" To "rw init=/bin/bash".

Step 6: Press "Ctrl+x" to continue boot to in single user mode.

Step 7: Now you will get prompt of the root user.

Step 8: Change root user password,
# passwd root

Step 9: Now sync and reboot the system i.e.
# sync
# reboot -f

I hope, above steps are helpful to change the root user password in single user mode.

4 comments :

Anonymous said...

Very useful article. Thanks for sharing

Unknown said...

or add single at the end of the kernel line. BTW this will work with all GRUB. Not just Ubuntu.

BTW will not work with password protected GRUB.

For that boot into a rescue CD mount the partition which contains grub.conf remove the password line and reboot. Then follow above procedure.

Tarun Kumar Singhal said...

Thank you shiv sir...

Unknown said...

When I hold down Shift during BIOS load, I get GRUB Loading, but it then carries on regardless and boots into XFCE (my default). How do I force the GRUB menu to appear?