Boot loop after installing Ubuntu 18.04 alongside Windows 10

I have a Dell G3 3590 laptop with Core i5 9300H CPU, GTX 1650 GPU and 8GB RAM. I have Windows 10 installed on my 256GB SSD and I have another 1TB HDD in my laptop, so I partitioned 300GB of the HDD for Ubuntu 18.04 as I'll be using it for Python and some deep learning projects for my university. Everything went smoothly. I've chosen the Something else option in ther Ubuntu installer so I can select my 300GB partition.

I allocated 40GB for / set 12GB for swap and allocation the rest to /home. When selecting those parameters I was following multiple tutorials/threads.

I was afraid of selecting the normal option when Ubuntu figured that I had Windows 10 already installed and it would take care of the partitioning for me, but I thought it might install it on the SSD, not on the 300GB I partitioned.

My laptop after installation ended went into a boot loop and won't load past the BIOS DELL splash screen. I couldn't load into Windows 10 or Ubuntu. I couldn't even save the boot sequence; it would always say Ubuntu first priority.

Because I don't have much experience in this I went with the safest way possible because I was afraid on the hardware. I did a complete internal SATA & NVMe erase on my SSD and HDD which took hours to finish, and finally I could install Windows 10 back.

What did I do wrong while installing Ubuntu and how should I avoid what I did? I still need it for my work so I'll try to reinstall it again alongside Windows 10. At least I need steps that I can follow safely because I don't want to go on that road again. And if the automatic installation will detect the 300GB partition tell me as I'll just use that instead.


Solution 1:

A) UEFI/BIOS

  1. Set to "UEFI mode only" (no legacy/CSM).

  2. Disable "secure boot"

  3. Disable "Intel Rapid Start" (if equipped)

  4. Disable "fast boot" in UEFI (note this is different than the "fast startup" setting in Windows 8/10). The options in your UEFI/BIOS might say something like Full/Minimal/Automatic for boot mode. Select Full (or thorough, or complete, etc whatever your UEFI vendor has chosen to call it).

B) Advanced Power Options (Fastboot)

Disable fast startup in Windows 8/10 under "advanced power options". Restart computer to ensure that this subsequent boot and the next reboot/shutdown will be in "normal" mode.

C) Rufus / Bootable USB stick

Use Rufus to create a bootable USB stick with your choice of Ubuntu based distro. Make sure in Rufus that you CHOOSE the option UEFI/GPT only. This ensures the Linux environment boots only into UEFI mode during your install.

D) Boot Menu

Reboot your computer and press key for one time boot menu (Dell is typically F12). Select your USB stick from the boot options.

Note: Make sure it says UEFI in front of the USB stick in the boot menu. If not, return to Windows and recreate your USB stick with Rufus ensuring you choose the UEFI/GPT (only) option.

E) Boot into USB Stick

Boot into Linux live environment and begin the install.

F) Installation type

When you get to the installation option, choose "Something else" at the bottom of the Ubiquity installer.

G) Create partitions

Find your secondary HDD that you will be installing Linux to.

In my case it was listed as /dev/sdc (with /dev/sda being the windows drive and /dev/sdb the USB drive [which was invisible in the installer]).

So basically:

+--------------+--------+---------------------------+--------------------------------+
| Device path  | Device | Operating System (OS)     | Visible in Ubiquity installer? |
+--------------+--------+---------------------------+--------------------------------+
| /dev/sda     |  SSD   | Windows 10                | yes                            |
| /dev/sdb     |  USB   | Ubuntu 20.04 (Live Stick) | no                             |
| /dev/sdc     |  HDD   | None                      | yes                            |
+--------------+--------+---------------------------+--------------------------------+
  • 1st Partition / EFI (For separate EFI partition. See below for what this does.)
  1. Select your target drive (in my case /dev/sdc)

  2. Select "Make New Partition Table" (IMPORTANT: This will format the entire disk. Do not do this if you have any data you want in this disk. In that case, you can back up the data and proceed. You can recreate a partition and store the data back in there.)

  3. Partition the target drive as follows:

  • Size: 650 MB
  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  • Use as: EFI (this will be listed as /dev/sdc1 efi in the partitioning tool once you create it)
  • 2nd Partition / Root (All the software you install are stored here)
  1. Select "free space" under your target drive (in my case /dev/sdc)

  2. Select "+"

  3. Partition the target drive as follows:

  • Size: min. 10 GB (25+GB recommended. I have 40GB)
  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  • Use as: ext4
  • Mount point: Choose "/"
  • 3rd Partition / Swap (Only needed if you want to Hybernate)
  1. Select "free space" under your target drive (in my case /dev/sdc)

  2. Select "+"

  3. Partition the target drive as follows:

  • Size: Depends on your RAM. See Swap FAQ.
  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  • Use as: swap
  • 4th Partition / Home (Only needed if you want to keep your personal files separate from / Root partition)
  1. Select "free space" under your target drive (in my case /dev/sdc)

  2. Select "+"

  3. Partition the target drive as follows:

  • Size: Remainder of space on the drive or any size you want. (You will need to leave some space if you want to make another partition. Of course, you can always shrink "/home" partition later)
  • Type for the new partition: Primary
  • Location for the new partition: Beginning of this space
  • Use as: ext4
  • Mount point: Choose "/home"

H) Boot loader Device

  • BEFORE clicking "Install Now", from the "device for boot loader installation" option button, select the 650MB EFI partition you just created as the target for the bootloader. (example /dev/sdc1 in my case).
  • Click "Install Now".

I) Installation & Reboot

  • Finish the installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

J) Upon reboot

After UEFI/BIOS reads the new bootloader entry that Linux has added to it, you will be presented with the grub menu with a listing of your Linux distro as well as a listing to boot Windows 10.

  1. Boot into Linux

  2. Install any updates and then reboot and attempt to enter Windows 10 from the grub menu to make sure that grub correctly handles the hand-off to the Windows 10 bootloader.


What you have done:

You have installed the Linux EFI bootloader to the newly created EFI partition. In the process of this, Linux has added an entry to your UEFI listings in your systems UEFI/BIOS. Linux has also automatically detected your Windows 10 install and added a grub menu item to boot it. Your computer at this point will now automatically boot to Linux unless you choose to boot to Windows (from the Grub menu).

What you have not done:

You have not in any way altered your Windows 10 install or its bootloader or even so much as touched the Windows 10 EFI partition. Everything is reversible simply by removing the Linux UEFI listing from your UEFI/BIOS settings. How to do so varies from each vendor.

Borrowed and edited from user613363's answer. (Dual Boot Windows 10 and Linux Ubuntu on Separate Hard Drives)

Solution 2:

I have the exact same PC, and it was totally messed up when I received it.

In order to have a proper dual boot with Ubuntu 18.04 alongside Windows 10 I had to :

  • Change the partition table on the NVMe drive from MBR to GPT (this SSD drive was empty, the manufacturer/retailer installed Windows on the HDD instead ...)
  • Divide the SSD into 4 partitions (or 3 ? I don't remember if Windows makes its own boot partition or if I had to do it myself, sorry ...) with a live Ubuntu and Gparted.
    The first is for UEFI, the Second for Windows, the third for the Windows Bootloader, and the last for Ubuntu.
  • Install windows from a USB flash drive
    /!\ Even with a wipe of the HDD (I did a simple one, not the "fill disk with zero" thing), your new install will try to use your old boot partition, which you don't want since it is slower. You have to unmount the HDD in the BIOS to avoid that.
  • Install Ubuntu in the 4th partition (you can divide it again during the installation if you want to).
    /!\ When installing Grub, Ubuntu will check for the existing boot files, and will find the ones on the SSD AND the HDD if it is mounted in the BIOS.

If you have too much boot options in your BIOS, it is likely that you have both the ones from the SSD and the HDD. In that case, the command

$ blkid

in ubuntu will help you choose which ones you should delete (the UUID of the disk appears when you click on the "View" button in the list of boot options in the BIOS)

I am sorry for the lack of precisions in my answer, I don't remember very well what I did. If someone has precisions and links, feel free to edit or comment.