RecoveryMode
Contents |
If your system fails to boot for whatever reason, it may be useful to boot it into recovery mode. This mode just loads some basic services and drops you into command line mode. You are then logged in as root (the superuser) and can repair your system using command line tools. If booting into recovery mode does not work you can still use your installation CD (if it is a live cd) as described in LivecdRecovery.
Booting into recovery mode
- Switch on your computer.
- Wait until the UEFI/BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.) Note: UEFI fast boot may be too fast to give time to press any key.
- With BIOS, quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) With UEFI press (perhaps several times) the Escape key to get grub menu.
Select the line which starts with "Advanced options".
Select the line ending with "(recovery mode)", probably the second line, something like:
Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)
- Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a number of options. One of the options (you may need to scroll down to the bottom of the list) will be "Drop to root shell prompt". Press Return with this option highlighted.
The root partition is mounted read-only. To mount it read/write, enter the command
mount -o remount,rw /
If you have /home, /boot, /tmp, or any other mount point on a separate partition, you can mount them with the command
mount --all
(This must be done following step 8 so that /etc/mtab is writable.) Alternatively, you could try selecting "Enable networking" in step 7, though this has been found to cause the system to hang (see https://bugs.launchpad.net/ubuntu/+source/friendly-recovery/+bug/981792).
NOTE 1: If you have Ubuntu Quantal (12.10) or earlier, omit step 4 (the recovery mode menu items are displayed on the top-level menu).
NOTE 2: If you reboot, there is no need to hold the Shift key in step 3. The GNU GRUB menu will continue to be displayed automatically on each boot until a normal startup of Ubuntu completes. To configure GRUB so the menu is always displayed, even after a normal startup, see https://help.ubuntu.com/community/Grub2/Setup.