Ubuntu – GRUB not showing up after installing ubuntu

bootdual-bootgrub2partitioninguefi

Before question, I'm completely new to linux and ubuntu, so pardon me.

I've installed ubuntu to my ssd, where I've installed my Windows. I've created two partitions while creating ubuntu. Each of them named sda5/sda6, which is for efi partition (because an alert popped up while installing ubuntu)/ext4(for installing ubuntu). After install, I rebooted my computer, and only I see is ubuntu startup screen, neither windows boot manager or GRUB. What should I do?

+I've removed my restore partitions before ubuntu install. Does this will be the cause of my problem?


Ok. I've found the problem. It was the problem of windows (which is probably my fault). It didn't have bootmgfw.efi. But thanks for all of your help. Gonna re-install windows and try again to install Ubuntu.

Best Answer

To get dual-boot working fine on your laptop, you can check these steps:

Section - I: Getting Windows OS ready for Dual-boot

  • Login to your Windows machine with an Administrative account and right-click on the Start Menu >> Command Prompt (Admin) option to open Windows Command Line with elevated privileges
  • Once you are in the command prompt, type diskmgmt.msc to open "Disk Management Utility". From here, right click on the "C:" partition and select Shrink Volume in order to resize the partition

  • On "Shrink C:" enter a value to shrink in MB and hit the Shrink option to start partition resize

Note: Do not forget to create a Bootable USB having Ubuntu loaded into it before you start with the next section.

Section - II: Installing Ubuntu OS

  • Reboot the machine and instruct the BIOS/UEFI to boot-up from the DVD/USB by pressing a special function key (usually its F12, F10 or F2 depending on the vendor specifications)
  • Once the media boot-up, a new Grub screen should appear on your monitor. From the menu select Install Ubuntu and hit the Enter key to continue

Note: After the boot media finishes loading into RAM you will end up with a completely functional Ubuntu system running in live mode

  • On the "Launcher" hit on the second icon from the top, Install Ubuntu 18.04, and the installer utility will start. Choose the language you wish to perform the installation and click on the Continue button to proceed further

  • Next, leave both options from Preparing to Install Ubuntu unchecked and hit on the Continue button again

  • On the "Installation Type" screen, prefer to choose the Install Ubuntu alongside Windows Boot Manager option if you want to automate the process and do not wish to have a personalized partition scheme. In case you want a custom partition layout, check the Something Else option and hit on the "Continue" button to proceed further.

P.S.: The option "Erase disk and install Ubuntu" should be avoided on dual-boot because is potentially dangerous and will wipe out your disk completely.

  • Now, if you go with "Something Else" option, its time to create the partitions manually. I would recommend that you create three partitions, one for root, one for the Home and one "Swap" partition. To create the first root partition, select the free space (the shrinking space from Windows created earlier) and hit on the "+" icon below. On partition settings use the following configurations and hit OK to apply changes:

Size = at least 20000 MB

Type for the new partition = Primary

Location for the new partition = Beginning

Use as = EXT4 journaling file system

Mount point = /

  • Similarly, create the "Home" partition and the "Swap" partition. For "Home" use the following configuration:

Size = all remaining free space

Type for the new partition = Primary

Location for the new partition = Beginning

Use as = EXT4 journaling file system

Mount point = /home

  • When you are finished creating all partitions as per your requirements, hit the Install Now button in order to apply the changes to disk and start with the installation process. A pop-up window might appear to inform you about the "Swap" space, but you can ignore the alert by pressing on the "Continue" button

  • Next a new pop-up window will ask you if you agree with committing changes to disk. Hit the Continue button to write changes to disk and the installation process will now start

Once you are done installing Ubuntu OS, proceed with the next section.

Section - III: Setting Up the GRUB Menu

  • Boot into your Windows OS
  • Combine the keys Windows + r together and type cmd to open command prompt.
  • Type the command: bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi and hit the Enter key

P.S. - You do not need to have admin rights on command prompt before you perform the above action.

If you wish to switch between the OS, just reboot the computer and select your preferred OS from the Grub menu.

Section - IV: Unable to Load into Windows & Booting directly into Ubuntu

In case you boot directly into Ubuntu OS and do not get the GRUB menu, perform the following steps:

  • Create a file: /boot/grub/custom.cfg by running the command: sudo -H gedit /boot/grub/custom.cfg with these contents:

menuentry "Windows (UEFI)" {

search --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi

chainloader /EFI/Microsoft/Boot/bootmgfw.efi

}

Note: Copy and paste the above code into the Gedit window. Save the file and quit Gedit.

  • Reboot your system and you should be able to see an entry titled Windows (UEFI)

  • Select it and the Windows OS should boot.

If this doesn't work, please run the boot info script (http://bootinfoscript.sourceforge.net/ ) and post the RESULTS.txt that it produces so that we can help you accordingly.

P.S. You can also try and use the GRUB tool.

Related Question