[SOLVED] Dual boot 'GRUB installation failed' on NVMe drives

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

[SOLVED] Dual boot 'GRUB installation failed' on NVMe drives

Post by voidturbulence »

Hi,

New to Linux and thank you for checking this out.

I'm trying to dual boot Windows 10 and Linux Mint on my Asus UX580.

I downloaded linuxmint-19.3-cinnamon-64bit from the Linux Mint site.
Created Live USB with Rufus on Sandisk Cruzer Fit 8GB, using GPT.
I double checked my System Information on Windows and Bios Mode reads 'UEFI'.

I boot into Live USB from UEFI Boot Menu 'UEFI: Sandisk Cruzer Fit'.
Linux Mint splash appears. If I just press enter (on the first menu option, "try it normally or w.e it was"), it doesn't work and gives a bunch of errors.
So after Googling, I discovered I had to type 'acpi=off' before 'quiet script', after pressing 'e' on that first menu option. Then it worked.

I'm now at the LM desktop so I press desktop shortcut to install. As I go through the install wizard, when it reaches 'installing grub2' it hits me with 'GRUB installation failed.'

I googled a lot:
Disabling/restoring internet connection didn't work.
Tried many things like creating a second EFI partition (first one already made by Windows), didn't work.
Disabling VT-x in my bios, didn't work.
Changing Legacy USB support to Disabled in my bios, didn't work.
Tried splash screen OEM install, didn't work.
Tried recommended boot-repair. Locked-ESP error. Unmounted all drives in GParted and retried boot-repair. Still Locked-ESP error. Even when I shutdown Windows every time (to stop ESP from locking, but from my tries it didn't unlock the ESP...)
EDIT: Tried disabling Secure boot, didn't work.

Been trying for like 20 hours on Google...nothing seems to work. I'm stumped.

They all lead to the same error window "GRUB installation failed: The 'grub-efi-amd64-signed' package failed to install into / target/. Without the GRUB boot loader, the installed system will not boot."

Upon opening /var/log/syslog I found this:

Code: Select all

mint@mint:~$ grep "grub-efi-amd64-signed" /var/log/syslog
Jan 19 02:26:31 mint ubiquity:   grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed
Jan 19 02:26:34 mint ubiquity: Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-efi-amd64-signed amd64 1.93.15+2.02-2ubuntu8.14 [299 kB]
Jan 19 02:26:35 mint ubiquity: Selecting previously unselected package grub-efi-amd64-signed.
Jan 19 02:26:35 mint ubiquity: Preparing to unpack .../grub-efi-amd64-signed_1.93.15+2.02-2ubuntu8.14_amd64.deb ...
Jan 19 02:26:35 mint ubiquity: Unpacking grub-efi-amd64-signed (1.93.15+2.02-2ubuntu8.14) ...
Jan 19 02:26:38 mint ubiquity: Setting up grub-efi-amd64-signed (1.93.15+2.02-2ubuntu8.14) ...
Jan 19 02:26:39 mint ubiquity: dpkg: error processing package grub-efi-amd64-signed (--configure):
Jan 19 02:26:39 mint ubiquity:  installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Jan 19 02:26:39 mint ubiquity:  grub-efi-amd64-signed
Jan 19 02:26:40 mint ubiquity: Setting up grub-efi-amd64-signed (1.93.15+2.02-2ubuntu8.14) ...
Jan 19 02:26:41 mint ubiquity: dpkg: error processing package grub-efi-amd64-signed (--configure):
Jan 19 02:26:41 mint ubiquity:  installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Jan 19 02:26:41 mint ubiquity:  shim-signed depends on grub-efi-amd64-signed; however:
Jan 19 02:26:41 mint ubiquity:   Package grub-efi-amd64-signed is not configured yet.
Jan 19 02:26:41 mint ubiquity:  grub-efi-amd64-signed
Jan 19 02:26:41 mint grub-installer: info: Calling 'apt-install grub-efi-amd64-signed' failed
Appreciate any and all help.
Last edited by voidturbulence on Sun Jan 19, 2020 2:07 pm, edited 4 times in total.

User avatar
LanceM
Level 8
Level 8
Posts: 2374
Joined: Sun Jul 08, 2018 11:50 pm

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by LanceM »

Do you have secure boot turned off in the motherboard firmware settings? If not try that.
Last edited by LanceM on Sat Jan 18, 2020 11:51 pm, edited 1 time in total.
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.
Mint accepts donations: https://linuxmint.com/donors.php

voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by voidturbulence »

Yes, it was one of the first things I did.

Kur1os
Level 1
Level 1
Posts: 8
Joined: Sat May 19, 2018 12:31 am

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by Kur1os »

Have you tried disabling Fast Boot in your bios settings (if your motherboard has it), I couldn't get dual boot to work until I did that?

User avatar
Pierre
Level 20
Level 20
Posts: 10265
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by Pierre »

so, try again, but with an off-line machine .. sometimes, this does work, for an odd reason.

you will still have to Turn that Secure Boot thing - OFF & deal with an Secure Boot switching code,
but, it should work out & install that Grub Boot Loader.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

User avatar
kato181
Level 5
Level 5
Posts: 775
Joined: Fri Mar 24, 2017 12:33 am
Location: Frederickton NSW

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by kato181 »

This maybe a silly question, but just in case you didn't...When installing mint, did you select install mint alongside winwoes? You need to do that if you want to dual boot with winwoes.
Also check to see if the Sata mode is AHCI

voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by voidturbulence »

Tried it again while offline, with Secure Boot turned off. Fast Boot was already turned off from earlier too, and my BIOS was already set to AHCI from default - with it being the only option.

Also, yes I did click 'install alongside Windows 10' many times, however each time it is more along the lines of 'delete Linux Mint Tricia and re-install'.

Same error - Grub installation failed at the final part of the install.

I've done OS installs many times before but first time trying and installing Linux. Thoroughly stumped! Typing this out as fast as I can before my morning swim. Maybe somebody will figure this out! :)

User avatar
Pierre
Level 20
Level 20
Posts: 10265
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by Pierre »

did you manually create an New EFI partition with size about 200MB – 500MB,
as per this article:
https://www.learningpenguin.net/2018/07 ... to-target/

also note the section about leaving “Install third-party software for graphics and Wi-Fi hardware, Flash, MP3 and other media” unchecked,
- when installing Linux Mint .. the same as Installing OFF-line, really.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

JeremyB
Level 20
Level 20
Posts: 11595
Joined: Fri Feb 21, 2014 8:17 am

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by JeremyB »

Boot into the Mint ISO, open terminal, post results for

Code: Select all

sudo parted -l

voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by voidturbulence »

Yes, I've tried creating EFI partitions exactly like those articles specify - but to no avail. Tried putting the EFI partition first, then ext4, then swap. Then tried EFI, swap, then ext4. And other combos, but none worked.

Also, already tried fiddling with that "install third-party software..." check box:
internet connected, box checked = GRUB installation failed
internet disconnected, box checked = GRUB installation failed
internet connected, box unchecked = GRUB installation failed
internet disconnected, box unchecked = GRUB installation failed

Upon typing 'sudo parted -l' in the Terminal, these were the outputs:

Code: Select all

mint@mint:~$ sudo parted -l
Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? i                                                          
Model: SanDisk Cruzer Fit (scsi)
Disk /dev/sda: 32.0GB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags: 

Number  Start  End     Size    File system  Name   Flags
 1      2048B  6143B   4096B                Apple
 2      348kB  2871kB  2523kB               EFI


Model: INTEL SSDPEKNW020T8 (nvme)
Disk /dev/nvme0n1: 2048GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  473MB   472MB   ntfs            Ba    hidden, diag
 2      473MB   578MB   105MB   fat32           EF    boot, esp
 3      578MB   595MB   16.8MB                  Mi    msftres
 4      595MB   1940GB  1940GB  ntfs            Ba    msftdata
 5      1940GB  2030GB  90.0GB  ext4
 6      2030GB  2048GB  18.0GB  linux-swap(v1)


mint@mint:~$
EDIT: My USB is definitely not SCSI...and I don't even have a Mac. Maybe that has something to do with it?

JeremyB
Level 20
Level 20
Posts: 11595
Joined: Fri Feb 21, 2014 8:17 am

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by JeremyB »

In terminal in Live ISO do

Code: Select all

sudo mkdir -p /mnt/boot/efi
sudo mount /dev/sda5 /mnt
sudo mount /dev/sda2 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
apt-get update
apt-get install --reinstall grub-efi grub-efi-amd64 grub-efi-amd64-signed
update-grub
exit
Post any errors that may occur, if no errors, try a reboot and see if you have a Grub menu without the ISO

voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by voidturbulence »

I remember trying something similar earlier, and got lots of errors like this:

Code: Select all

mint@mint:~$ sudo mkdir -p /mnt/boot/efi
mint@mint:~$ sudo mount /dev/sda5 /mnt
mount: /mnt: special device /dev/sda5 does not exist.
mint@mint:~$ sudo mount /dev/sda2 /mnt/boot/efi
mount: /mnt/boot/efi: /dev/sda2 already mounted or mount point busy.
mint@mint:~$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
mount: /mnt/dev: mount point does not exist.
mount: /mnt/dev/pts: mount point does not exist.
mount: /mnt/proc: mount point does not exist.
mount: /mnt/sys: mount point does not exist.
mount: /mnt/run: mount point does not exist.
mint@mint:~$ sudo chroot /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directory
mint@mint:~$ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
mint@mint:~$ apt-get install --reinstall grub-efi grub-efi-amd64 grub-efi-amd64-signed
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
mint@mint:~$ update-grub
grub-mkconfig: You must run this as root
mint@mint:~$ exit

JeremyB
Level 20
Level 20
Posts: 11595
Joined: Fri Feb 21, 2014 8:17 am

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by JeremyB »

Didn't notice it was nvme

Code: Select all

sudo mkdir -p /mnt/boot/efi
sudo mount /dev/nvme0n1p5 /mnt
sudo mount /dev/nvme0n1p2 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
apt-get update
apt-get install --reinstall grub-efi grub-efi-amd64 grub-efi-amd64-signed
update-grub
exit

voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by voidturbulence »

Seems like I got some errors near the end. Down the rabbit hole we shall go...

Code: Select all

mint@mint:~$ sudo mkdir -p /mnt/boot/efi
mint@mint:~$ sudo mount /dev/nvme0n1p5 /mnt
mint@mint:~$ sudo mount /dev/nvme0n1p2 /mnt/boot/efi
mint@mint:~$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
mint@mint:~$ sudo chroot /mnt
root@mint:/# apt-get update
Ign:1 http://packages.linuxmint.com tricia InRelease
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease                                                                    
Hit:3 http://packages.linuxmint.com tricia Release                                                                            
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease                                                                            
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease        
Hit:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
root@mint:/# apt-get install --reinstall grub-efi grub-efi-amd64 grub-efi-amd64-signed
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 183 not upgraded.
2 not fully installed or removed.
Need to get 0 B/50.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for grub-efi-amd64-signed:amd64
root@mint:/# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/60_mint-theme.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/linuxmint/theme.txt
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
done
root@mint:/# exit

JeremyB
Level 20
Level 20
Posts: 11595
Joined: Fri Feb 21, 2014 8:17 am

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by JeremyB »

We might be good, try a reboot

voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

Re: noob can't get dual boot working, issues with grub-efi-amd64-signed

Post by voidturbulence »

It boots! Set GRUB_DEFAULT to Windows.

Only thing I gotta do now is figure out how to mess with my BIOS so I don't have to type in acpi=off every time...and that might be tricky.

Thank you for the help! Glad to finally start using Linux.

JeremyB
Level 20
Level 20
Posts: 11595
Joined: Fri Feb 21, 2014 8:17 am

Re: [SOLVED] Dual boot 'GRUB installation failed' on NVMe drives

Post by JeremyB »

Actually you can add acpi=off alongside "quiet splash" in /etc/default/grub

Code: Select all

xed admin:///etc/default/grub
Make changes, save file

Code: Select all

sudo update-grub
I would be looking for other fixes rather than to use acpi=off

voidturbulence
Level 1
Level 1
Posts: 8
Joined: Sat Jan 18, 2020 10:55 pm

Re: [SOLVED] Dual boot 'GRUB installation failed' on NVMe drives

Post by voidturbulence »

awesome, thank you!

Post Reply

Return to “Newbie Questions”