How to fix Ubuntu 19.04 won't boot after installing Windows 10 (Grub2 fixing)

When you install Windows on your computer it will replace the GRUB2 boot loader resulting your Ubuntu unaccessible. Here is a simple guide to fix GRUB2 bootloader and make ubuntu 17.04 work again.

The issues arise when you have Ubuntu installed on your computer, installing Windows 10 will erase the bootloader used by Ubuntu operating system. Because Windows assumes it'll be the only operating system.

Use bootable USB flash drive


In this method, we'll use boot-repair program which you can run using the terminal and for the same, you'll need a Bootable ubuntu flash Drive (can be DVD, mah!)

download and flash the Ubuntu ISO to a USB flash drive.



  1. Download an Ubuntu ISO, (same Ubuntu version which is installed on your computer is not necessary) we just need to fire up the terminal so download any ubuntu OS image and make a bootable media device.

  2. Boot from the USB and select “Try Ubuntu” option to temporary boot Ubuntu on your computer. Plese, note that it's not you be the same operating system which is installed on your hard drive.

  3. We'll use this Ubuntu instance to run terminal (a tool like Command prompt but for Linux). Once you're booted from the USB, click the Start Button and search for Terminal. Or simply click the left-top side button and look for Terminal and click to open it.

  4. Use the following commands to install and run Boot-repair to fix (re-write) Grub2 boot loader.


sudo apt-add-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair

boot-repair

If you think typing these lines will eat your time, launch Firefox and open this webpage. copy paste the above commands in Terminal and hit the enter key. For nerds, this will require an active internet connection, if Wifi is not working try USB tethering your Android mobile.

That's it, the command “boot-repair” will analyze your Ubuntu installation location, possible issues and tries to fix them. Once it's done, go ahead and select “Recommended fixes” option and the tool will install the GRUB2 bootloader with the information required to boot the Ubuntu OS. The last command opens the Boot-repair and will give you two options. The first option solves all the normal startup problems including re-writing/installing the grub2 boot loader. Don't worry you still can boot Windows using from the Grub2 menu.

This is the easiest way to get everything working again. Also, take a backup of your Ubuntu files just in case (or if installing/re-installing OS's is your routine).

Use terminal and commands


Use this when you don't have an active internet connection. 

If you don't have an internet connection or want to try the hard way. You're welcome.

If you don't want to download Ubuntu OS image, just because it seems a big task for this tiny problem. You'll still need the Ubuntu's bootable drive.

Boot from the Ubuntu Live DVD or USB and select “Try Ubuntu” for a temporary Ubuntu OS instance.

Open the Terminal from the dash and type these commands. unlike using the boot-repair (click-click method) you'll need to recognize the partition on which your Ubuntu is installed. For that purpose, we'll use the following commands.

sudo fdisk -l

sudo blkid

fdisk -l will list partition, and system column will have “Linux” word making it easier for you to determine. And the blkid command will identify if that partition is ext4 file system. If you see more than one ext4 file system partition, you can easily get the idea as the partition should be bigger where the OS is installed.

There may be more than one ext4 partition, pick the larger one. If you're unsure check the order of the disk and partition size to get an idea.

Now run the command to mount the ubuntu partition to the /mnt/ubuntu location. Replace the /dev/sdX# with the partition name (from the above command).

sudo mkdir /mnt/ubuntu

sudo mount /dev/sdX# /mnt/ubuntu

The partition is /dev/sda6 in the screenshot above. But most people install Ubuntu at /dev/sda1. If it's sda1 this means the first partition on the first disk, be careful and choose the correct one.

In the case when you have a separate boot partition,  you can know this seeing at those ext4 partitions (result from above commands) the small size partition is the one you should pick. In that case, do not use the above command and use this instead.

sudo mkdir /mnt/ubuntu/boot

sudo mount /dev/sdX# /mnt/ubuntu

In this step, we'll command to reinstall GRUB2 from the Live DVD/USB, replace /dev/sd$ with the hard disk. Remember, you should type sda4 if used sda5.

sudo grub-install --boot-directory=/mnt/ubuntu/boot /dev/sdX

Now momentarily press the power button to shut down your computer. Or from Ubuntu's power option click shutdown.

When you start your computer you'll see GRUB 2 bootloader menu, you can press enter to boot Ubuntu or select Windows 10 using the arrow keys.

As usual, this might won't fix the issue if you have done something complex beyond erasing grub boot loader. In that case, Boot another Operating system (Windows) and mount the Ubuntu partition and extract the files you'd need and do a clean Ubuntu installation.

COMMENTS

Name

#Redstone 5,3,#Registry hacks,1,All in One,1,Basics,1,Blog update,1,Booting from USB,1,Common Issues,3,Getting Started,1,How to,3,Installation,1,Internet,3,ISO,1,News,2,Redstone 4,1,Resources,4,Update,5,UUP,1,Windows 10,2,Windows 10 1803,1,Windows 10 Fall Creators Update,1,Windows Insider,1,Windows KB,1,
ltr
item
Windows Vibes: How to fix Ubuntu 19.04 won't boot after installing Windows 10 (Grub2 fixing)
How to fix Ubuntu 19.04 won't boot after installing Windows 10 (Grub2 fixing)
Windows Vibes
https://www.windowsvibes.com/2018/02/how-to-fix-ubuntu-1904-won-boot-after.html
https://www.windowsvibes.com/
https://www.windowsvibes.com/
https://www.windowsvibes.com/2018/02/how-to-fix-ubuntu-1904-won-boot-after.html
true
2980521010431497091
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy