You are not logged in.

#1 2018-11-13 12:28:25

penguin
Member
From: Gotham City
Registered: 2010-12-31
Posts: 168

[SOLVED] EFI grub-install boot problem after a hard drive swap

Hi!

I'm in some urgent need of wisdom:

I moved my SSD (M.2 pci) from one Dell XPS15 (9660) to another Dell XPS15 (9670), and now it will not boot.

I followed the XPS15 guide, i.e. un-selected secure boot, and from "RAID on" to "AHCI", and changed fast boot to "Thorough".

In BIOS I also select the efi image (/boot/EFI/grub/grubx86.efi), but when rebooting and selecting this, I get a blank screen (tiny cursor "_" in the top left corner).

I've tried booting from an USB with a live arch linux image, and doing grub-install, following this, i.e.:

1. Boot from a Arch ISO (USB).
2. mount the "/" partition
3. arch-chroot into the "/" partition
4. mount /boot and go there
5. then:

$ grub-mkconfig > grub.cfg 
$ grub-install /dev/nvme0n1
grub-install error: cannot find EFI directory

My EFI /boot disk is located on /dev/nvme0n1p2 and I get the same error if doing:

grub-install /dev/nvme0n1

.
I've also tried mounting /dev/nvme0n1p2 to /boot, and

grub-install --efi-directory=/boot

Then I get a success message, saying it installed, and boot/grub/locale is refreshed (new timestamp), but rebooting I still get a blank screen.

I'm not sure which partition grub-install wants to run against, and if the boot partition should be mounted or not? Any ideas on which way to go forward would be greatly appreciated!

Last edited by penguin (2018-11-13 13:37:58)

Offline

#2 2018-11-13 12:36:20

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] EFI grub-install boot problem after a hard drive swap

Don't follow random tutorials off the internet as they're usually incorrect.

Read the grub wiki page to get the correct commands for reinstalling grub.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-11-13 13:37:06

penguin
Member
From: Gotham City
Registered: 2010-12-31
Posts: 168

Re: [SOLVED] EFI grub-install boot problem after a hard drive swap

solved it, by doing both (yeah, probably unnecessary):

grub-install --efi-directory=/boot  --bootloader-id=GRUB --target=x86_64-efi --removable
grub-install --efi-directory=/boot  --bootloader-id=GRUB --target=x86_64-efi

and checking time-stamp on efi images got updated, and then re-selecting the efi-images in bios, just to be sure.

I included the --removable due to wiki saying something very interesting for my case:

Arch wiki on GRUB wrote:

Tip: If you use the option --removable then GRUB will be installed to esp/EFI/BOOT/BOOTX64.EFI (or esp/EFI/BOOT/BOOTIA32.EFI for the i386-efi target) and you will have the additional ability of being able to boot from the drive in case EFI variables are reset or you move the drive to another computer. Usually you can do this by selecting the drive itself similar to how you would using BIOS. If dual booting with Windows, be aware Windows usually has a BOOT folder inside the EFI folder of the EFI system partition, but its only purpose is to recreate the UEFI boot entry for Windows.

Offline

Board footer

Powered by FluxBB