Ubuntu 16.04 is installed on my laptop.

Yesterday I installed Windows 7 in unallocated space. When I restart my laptop, I don't get any menu to choose what OS to boot into. It just automatically boots into Windows.

I thought I might have accidentally removed Ubuntu and so I wrote Ubuntu on a USB and tried reinstalling. That installer says I already have Ubuntu and is making me choose whether or not I want to erase and reinstall, so it isn't removed.

How can I boot into it?

  • 1
    Windows 7 had a chronic attitude that you didn't need Linux if you installed it last. Windows 10 recently fixed this. – K7AAY Nov 7 '19 at 19:12

Insert your Ubuntu CD or live USB reboot your computer and set it to boot from CD/USB in the BIOS or in boot manager on newer PCs and boot into a live session.
Install and run Boot-Repair Click "Recommended Repair". Now reboot your system. The usual GRUB boot menu should appear. If it does not, hold Left Shift while booting(may be different system to system). You will be able to choose between Ubuntu and Windows .

(Terminal in LiveSesion)
sudo apt install software-properties-common
sudo add-apt-repository -y ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && boot-repair
And boot-repair will appear.

  • 1
    This worked flawlessly to fix the boot but when I booted into ubuntu it didn't recognize my graphics card and I/O. Forced me into a terminal and I was able to fix this issue on my own and successfully booted into ubuntu like usual. Thanks a lot. – Eyad H. Nov 7 '19 at 13:52

You can boot into Ubuntu Live boot, and list hard disk partitions then reinstall grub.

sudo fdisk -l

Find the partition Labeled Linux or Ubuntu. Use that in next commands.

sudo mkdir /media/sdaX # Replace X with appropriate number.
sudo mount /dev/sdaX /media/sdaX
sudo grub-install --root-directory=/media/sdaX /dev/sdaX

Not the answer you're looking for? Browse other questions tagged or ask your own question.