Fixing Ubuntu in Recovery Mode

TL;DR

Enter “recovery mode” from grub and fix the problem.

  1. From grub, select Advanced options for Ubuntu
  2. Select Ubuntu, with Linux x.y.z-t-generic (recovery mode)
  3. In the recovery menu, select root Drop to root shell prompt
  4. Press [Enter] if prompted
  5. Type the following commands:
# Configure the keyboard layout
loadkeys fr
# Mount the root partition in read/write mode
mount -rw -o remount /

# Fix the problem. Here are some examples:
# Reset the password (yes, it's that easy)
passwd <username>
# Fix a (terrible) mistake in .bashrc
vim /home/<username>/.bashrc
# etc.

# Sync the changes to the disk and reboot
sync
reboot
Advertisements

1 thought on “Fixing Ubuntu in Recovery Mode”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s