Try repairing the GRUB bootloader with Boot Repair. Boot to an Ubuntu live session from the live USB/DVD that you used to install Ubuntu. While running an Ubuntu live session open the terminal and type:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install -y boot-repair
sudo boot-repair
Open the Boot Repair application and select Advanced Options -> Main Options tab -> check Reinstall GRUB and Unhide boot menu as shown in the below screenshot. Click the Apply button. Then reboot the computer with sudo reboot
If the OSs were installed in different modes, dual booting Windows and Ubuntu can't work. If your Windows is installed in BIOS mode, it is recommended to install your Ubuntu in BIOS mode, but if it's installed in UEFI mode, then do the same with Ubuntu.
BIOS vs. UEFI
To check whether your computer has UEFI or BIOS firmware open the terminal and type dmesg | grep "EFI v"
This will return a line like this, if the system was booted from EFI:
[ 0.000000] EFI v2.00 by Lenovo
Or it will return nothing if it was booted from BIOS.
If you have installed Ubuntu in legacy mode on the same drive with GPT partitioning, you can use Boot Repair's Advanced options to uninstall grub-pc and install grub-efi-amd64. That converts the Ubuntu installation from BIOS boot to UEFI boot, the same firmware as most recently manufactured laptops with Windows pre-installed have.
Converting Ubuntu into UEFI mode
- Start Boot-Repair, and select Advanced options -> GRUB location tab.
- If you do not see a Separate /boot/efi partition option, this means that your PC does not have any UEFI partition.
If you see a Separate /boot/efi partition option, put a checkmark in the checkbox to the left of it, then click the Apply button in the lower right corner.
Set up your BIOS so that it boots the hard drive in UEFI mode. The way to adjust this setting depends on the specific model of the computer, but generally this setting is located in the boot priority settings under the Boot tab of the BIOS/UEFI setup utility.
For more information about converting Ubuntu into UEFI mode review https://help.ubuntu.com/community/UEFI in the section about Converting Ubuntu into UEFI mode.
The grub bootloader can also be converted in the opposite direction from UEFI to BIOS. Linux can boot fine from a GPT disk in BIOS mode. See this answer: Convert from EFI to BIOS boot
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.
Best Answer
Recovery mode boots up with basic services and drops you to a command line as root. From there you can repair any problems that are preventing you from booting Ubuntu normally.
Using recovery mode requires a little experience with the command line.