Boot into Ubuntu Recovery Mode
Boot into Ubuntu Recovery Mode
In this tutorial, you will learn about Ubuntu Recovery Mode and the steps to boot into recovery mode. Sometimes, your Ubuntu system may fail to start properly due to system errors, corrupted files, or insufficient disk space. In such situations, Ubuntu provides a special mode called Recovery Mode that allows you to perform maintenance, fix errors, and regain control of your system without needing to boot into the regular desktop environment.
What is Ubuntu Recovery Mode
Ubuntu Recovery Mode is a special boot option provided by the GRUB bootloader. It starts the system with a minimal environment that allows users to troubleshoot and repair the system. This mode includes several useful options like root shell prompt, filesystem checks, network access, and package repairs.
Steps to Boot into Ubuntu Recovery Mode
Follow these steps to boot into Recovery Mode on an Ubuntu system:
- Turn on or restart your Ubuntu system.
- When the system is booting, press and hold the Shift key (for BIOS systems) or press Esc repeatedly (for UEFI systems) to display the GRUB menu.
- In the GRUB menu, use the arrow keys to select the entry that includes
Advanced options for Ubuntu
and press Enter. - From the next screen, choose the recovery kernel (usually has the word
(recovery mode)
at the end) and press Enter.
- Wait for the Recovery Menu to appear. You will see a list of options such as
clean
,dpkg
,fsck
,grub
,network
,root
, etc. - Select the desired option, like root to get a root shell prompt, and press Enter to continue.
Example
System Fails to Start Due to Low Disk Space
One common reason for system startup failure is running out of disk space. When the disk is full, essential services like GNOME Display Manager (gdm) may fail to start.
Here’s how to fix this using Recovery Mode:
- Boot into Recovery Mode and select the root option to get a command prompt with root access.
- Remount the root filesystem in read-write mode using the command:
mount -o remount,rw /
- Check disk usage with:
df -h
- Navigate to large directories such as
/var/log
or/tmp
and delete unnecessary files to free up space: - Example command to delete old logs:
rm -rf /var/log/*.gz /var/log/*.[0-9]
- After freeing up space, type
reboot
to restart the system.
Recovery Mode is a powerful feature that helps users diagnose and repair Ubuntu systems without needing to perform a full reinstall. Whether you’re dealing with low disk space, broken packages, or filesystem errors, this tool can be a lifesaver for system recovery.