9

I am unable to install Ubuntu 18.04.

To start things off, I see a black screen instead of installation instruction after booting the liveusb using BIOS boot (not UEFI). Not sure why this black screen but I am guessing its a graphics driver issue. I am using a newly bought amd rx560 card.

But I did however gain access to the OS by setting 'nomodeset'. Unfortunately at the end of the installation process, it failed to install the GRUB, giving me the error message shown in the title of this question.

I usually have two partitions for any linux distro: swap and root. I also leave the "Device for bootloader installation" option untouched. Which is by default /dev/sda

Please feel free to ask me any information regarding this. I really need help on this. I don't want to go back to windows after 9 years of ubuntuship.

marked as duplicate by David Foerster, karel, Eric Carvalho, Fabby, Thomas Jul 9 '18 at 8:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • If doing an UEFI install you must also have the ESP - efi system partition. It should be FAT32 with boot flag. Windows makes it 100MB and that will work, but 500MB gives some room for experiments or more installs if you want. UEFI suggest the ESP be first. But it probably just needs to be not too far into larger drives. See this if manually partitioning for UEFI: askubuntu.com/questions/743095/… – oldfred Apr 27 '18 at 22:00
  • For Googlers: I saw the titular message when trying to install after selecting UEFI: <thumbdrive> in the boot menu. Selecting <thumbdrive> instead led through a working installation. – Raphael May 1 '18 at 20:21
10

Try this if it makes sense to you:

  1. Boot Ubuntu Live DVD/USB in testing mode and open terminal

  2. Run installation process without installing boot loader by:

    sudo ubiquity -b
    
  3. Press Continue testing after installation is over.

  4. Mount the newly installed file system into /mnt:

    sudo mount /dev/sda2 /mnt
    sudo mkdir /mnt/boot/efi
    sudo mount /dev/sda1 /mnt/boot/efi
    for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
    

    (Where sda2 is the root partition and sda1 is the EFI partition.)

  5. Load the efivars module by:

    sudo modprobe efivars
    
  6. Reinstall grub-install for a 64-bit version:

    sudo apt-get install --reinstall grub-efi-amd64-signed
    sudo grub-install --no-nvram --root-directory=/mnt
    
  7. Change root to /mnt and update Grub:

    sudo chroot /mnt
    update-grub
    
  8. Move and rename the installed boot loader:

    cd /boot/efi/EFI
    cp -R ubuntu/* BOOT/
    cd BOOT
    cp grubx64.efi bootx64.efi
    
  9. Reboot the system.

  • What did I ever do to Ubuntu to deserve this? All I was trying to do is install an operating system. While I appreciate your effort, I would still like to know what have I done wrong that I have to go through all these steps. Installing an OS in 2018 should NOT be this complicated. – Eisenheim Apr 27 '18 at 10:42
  • 1
    Microsoft oriented/dependent Hardware Manufacturers make this BIOS/UEFI issue sometimes more difficult. But it is just a question of time, so that installing stays a breez. Q&A are precious in that process. :-) As a consolation maybe: I just installed 3 PC, two older with no problem, a recent that was solved with the above approach. – Mo des Bois Apr 27 '18 at 10:46
  • 3
    "What did I ever do to Ubuntu to deserve this?" @Eisenheim that would be "you installed Ubuntu on a system Microsoft does not want you to install it". – Rinzwind May 17 '18 at 7:44
  • This was a big help to me installing Ubuntu on my ASUS Zen Book, thank you so much. I don't understand much of what is happening here, and I hate that. Can you explain what the above steps are doing at a higher level ? – ctorx May 22 '18 at 18:01
  • Because the classic installation procedure installs at the end a bootloader (which is that tool that shows up right after pushing the power on button) and because that last step fails, the same installation is done without that buggy step. Finally you have to mount the new files and folder from the hard drive by switching over from the installation files and do manually what the normal installation procedure does for you. – Mo des Bois May 24 '18 at 14:29
7

Create an EFI file system partition sized 1024mb while installing. I choose custom partition as following and its working fine:

HDD1 (/dev/sda)

  • Device: /dev/sda1
  • Partition type: EFI System (FAT)
  • size: 1.0 GB

  • Device: /dev/sda2
  • Partition type: Linux swap (Swap)
  • size: 16 GB

  • Device: /dev/sda3
  • Partition type: Linux File System (Ext4)
  • size: Rest of the space available in this HDD
  • mount point: /

HDD2 (/dev/sdb)

  • Device: /dev/sdb1
  • Partition type: Linux File System (Ext4)
  • size: All available space in this HDD
  • mount point: /home
3

I had same problem and I fixed it. Go to your boot device menu and pick your liveUSB but not the UEFI one (UEFI:Jetflash........).


UEFI Boot Mode (installing using the GPT partition style) and Legacy BIOS Boot Mode (installing using the MBR partition style)

To know the difference you can search this: UEFI Boot Mode or Legacy BIOS Boot Mode

  • 1
    Great!!! it works! – vicke4 Dec 21 '18 at 11:51
  • 1
    This is the best and simplest fix. When you do this, the installer even uses the correct resolution and has a GUI screen for choosing whether to install or try Ubuntu (rather than a command line one). – Trevor Jan 8 at 23:11
3

This bug has three workarounds:

It's a real bug in the Ubuntu installer and should be fixed asap, it affects a lot of people.

  • Just using GPT and creating an "EFI System partition" on it still isn't enough. Installer detects it, but package install fails the same way. – Velkan Jul 20 '18 at 7:41
  • @Velkan: Not for me. Adding and EFI partition solved the issue for me. – bluenote10 Oct 13 '18 at 18:05

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