Ubuntu – How to Enter Recovery Mode from Grub

grub2recovery-mode

I have a dual boot installation with Windows 7 and Ubuntu 12.04 LTS. I am currently trying to solve this problem, where any mouse and keyboard input is ignored on the login screen.

The apparently helpful answer ("Phew! Thanks for the help blue; so this is what I ended up doing: …") suggests to start by entering the recovery mode from the grub boot menu.

My grub ("GNU GRUB version 1.99-21ubuntu3.14") boot menu displays the following options:

  • Ubuntu, with Linux 3.2.0-50-generic-pae
  • Ubuntu, with Linux 3.2.0-50-generic-pae (recovery mode)
  • Previous Linux versions
  • Memory test (memtest86+)
  • Memory test (memtest86+, serial console 115200)
  • Windows Recovery Environment (loader) (on /dev/sda1)
  • Windows 7 (loader) (on /dev/sda4)

The first option brings me to the usual graphical login screen where, in the current state, there is no reaction. The second option ("Ubuntu (…) (recovery mode)") displays lots of text running over the text-only screen, then it enters the graphical login screen as well, where again I have no way to input anything.

How do I get into recovery mode?

I have found quite some similar questions, none of which seems to apply to my situation:

  • This one seems to refer primarily to single-boot-setups where one doesn't normally get into grub, but even then, once within grub, the entry "… (recovery mode)" is claimed to help, which is not the case for me.
  • This one too claims that the "… (recovery mode)" entry will bring me anywhere else than the normal Ubuntu boot entry.
  • This one doesn't even see any option that looks like a recovery mode.
  • This one talks about getting somewhere else with the "… (recovery mode)" entry, but being unable to input anything there.
  • This one talks about being unable to enter the recovery mode from grub, though with different symptoms that what I am experiencing (plus there is no answer/solution provided yet).
  • This one experiences simply a freeze upon entering the "recovery mode" from grub.
  • This one too does get into some recovery menu and has their problem only then.

Best Answer

I know you posted this back in May, but I found some stuff that might help anyone looking at this article. I have the same exact problem, and I have not found a true fix for my symptoms yet, but I figured I would post some of my findings.

First, the trick with running some apt-get updates can be found here:link.

I modified mine a bit based on some other articles I read, and also because I encountered one error message with the cp command while trying to copy:

(This is assuming you did the first two steps from the link above and are running from a Live CD that you booted from)

sudo mkdir /media/precise
sudo mkdir /media/precise/proc /media/precise/dev /media/precise/etc
sudo mount /dev/sda1 /media/precise
sudo mount -o bind /proc /media/precise/proc
sudo mount -o bind /dev /media/precise/dev/
sudo mount -o bind /dev/pts /media/precise/dev/pts
sudo cp --remove-destination /etc/resolv.conf /media/precise/etc/resolv.conf
sudo chroot /media/precise apt-get update
sudo chroot /media/precise apt-get upgrade
sudo chroot /media/precise apt-get update --fix-missing
sudo chroot /media/precise dpkg --configure -a
sudo chroot /media/precise dpkg-reconfigure keyboard-configuration
sudo chroot /media/precise apt-get -f install

The reason I had to add the --remove-destination is because I was getting an error message that read something to the effect of: cp: not writing through dangling symlink path/to/danling/symlink/a-file (found the solution for that here: force cp to copy on dangling symlinks)

Secondly, it wasn't until the OS booted that the problem presented itself (hence why the Live Disk worked just fine). So, choosing different option in Grub was possible. I had gone back by two kernels and still had the problem.

Finally, while working on it with someone else at work, he had looked the computer the day before, and said that he booted back several kernels and got into command line, but not GUI. This was a great start because I had an Apache Web Server I needed to get up and available for people again ASAP. So, right now, the machine is running on an old kernel with a broken GUI but apparently working CLI and I am not sure what to do next. Try to remove the kernel? Remove and reinstall X? Not totally sure, but at least its a start, and maybe the link and code I listed above will be a fix for someone else with this problem.