How do I boot into single-user mode from GRUB?
After changing a few lines in xorg.conf, I can no longer boot Ubuntu (I assume it breaks when trying to load up X), so I need a way to boot into a single-user mode. However, there seems to be zero guides on the Internet how to do it, because they all assume I can actually edit files on my computer, and I obviously can't.
So how do I load Ubuntu in single-user mode?
When I turned off splash, I figured out the problem: whenever Ubuntu can't load X server due to some error, it switches to tty1 and waits for the prompt, but doesn't turn off the splash.
35 Answers
To boot into single user mode you edit the boot instructions for the GRUB menu entry you wish to boot and add the kernel parameter/option single. Brief instructions for how to do this are below.
- Hold down the left Shift key while rebooting to bring up GRUB menu
- Select (highlight) the GRUB boot menu entry you wish to use.
- Press e to edit the GRUB boot commands for the selected boot menu entry.
Look near the bottom of the list of commands for lines similar to
linux /boot/vmlinuz-3.2.0-24-generic root=UUID=bc6f8146-1523-46a6-8b\ 6a-64b819ccf2b7 ro quiet splash initrd /boot/initrd.img-3.2.0-24-genericChange the middle line in (4) by adding the kernel boot parameter
singleto the end of the line (i.e. afterro quiet splash).For this example you would change:
6a-64b819ccf2b7 ro quiet splashto
6a-64b819ccf2b7 ro quiet splash singlePress either Ctrl+X or F10 to boot using these kernel options.
Note: These changes are not persistent. Any change to the kernel boot options made this way will only affect the next boot and only if you start that boot by pressing either Ctrl+X or F10 while still in GRUB edit mode.
5Occasionally, you might not be able to use the single method as described in the accepted answer. In those cases you can tell the Linux kernel to use a different init like so:
init=/bin/bashFor example
3Good question! When booting the machine hold down the left shift key. For more info follow this:
1Not sure why the instruction is not permanent.
To make it permanent edit "/etc/default/grub"
pico /etc/default/grubMake the same changes...
update-grubI changed the line "ro quiet splash "
to "ro text single " and i start GUI with
startx 1 slm's solution worked for me in Ubuntu 20.04 when I had changed the ownership of the entire /etc directory.
I followed the instructions here (in the Alternate Root Shell Method section) and by the grace of Jesus I could boot in SINGLE USER MODE. Then I could get into the root shell without the root password (which Ubuntu doesn't give you).
This is done (roughly) as follows:
- reboot
- enter the GRUB console by pressing
shift(left, right, or both?) during the boot splash - select the regular kernel image you always boot from (this wasn't in the top-level menu, but in a menu 1 level deep)
- press
e - go to the line that starts with
linuxand move the cursor to the end - remove the part that says
ro quiet splash(or something like that) and add this at the end of the line:rw init=/bin/bash - press Ctrl-x to boot into that image with these boot parameters
That's roughly what allowed me to get into a root shell without the root password.
Don't let Ubuntu lock you out of your own computer with their "recommended measures" (ie. forcing you to use sudo, or not giving you the root user of your own computer). (Maybe there's a good reason for those, I don't know.)
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"