Bootloader installation error 05/30/2022

Hi. I’m coming from a dual boot setup on a ryzen 4800 laptop with windows 10 and ubuntu each on separate m.2 drives. I have wiped my ubuntu nvme and I am attempting to install endeavour os on it. I have fast boot and secure boot both disabled in the bios. I have tried multiple times both with automatic partitioning and with manual partitioning. I keep getting the hang up with the bootloader installation.

“The bootloader could not be installed. The installation command

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=endeavouros-3584 --force
returned error code 1”

https://termbin.com/sd5y

Here is some of the tests I found when trying to search for the solution.

"[liveuser@eos-2022.04.08 ~]$ inxi -Fxxc0z --no-host | eos-sendlog
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4359 0 24 100 4335 37 6857 --:–:-- --:–:-- --:–:-- 6897
https://clbin.com/0uMU7
[liveuser@eos-2022.04.08 ~]$ test -d /sys/firmware/efi && echo UEFI || echo BIOS
UEFI
[liveuser@eos-2022.04.08 ~]$ sudo parted -l
Model: SanDisk Ultra (scsi)
Disk /dev/sda: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 15.6GB 15.6GB fat32 Main Data Partition msftdata

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

Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition boot, esp
2 274MB 290MB 16.8MB Microsoft reserved partition msftres
3 290MB 1005GB 1004GB ntfs Basic data partition msftdata
4 1005GB 1005GB 682MB ntfs Basic data partition hidden, diag
5 1005GB 1024GB 18.8GB ntfs Basic data partition hidden, msftdata

Model: Samsung SSD 970 EVO Plus 1TB (nvme)
Disk /dev/nvme1n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 2097kB 631MB 629MB fat32 boot, esp
2 631MB 74.0GB 73.4GB ext4
3 74.0GB 1000GB 926GB ext4

[liveuser@eos-2022.04.08 ~]$ efibootmgr -v
BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0000,0004,0005
Boot0000* Windows Boot Manager HD(1,GPT,ae6dbce1-5517-4638-b300-ce5d5a0a79bf,0x800,0x82000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS…x…B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}…
Boot0004* ubuntu HD(1,GPT,ae6dbce1-5517-4638-b300-ce5d5a0a79bf,0x800,0x82000)/File(\EFI\UBUNTU\SHIMX64.EFI)…BO
Boot0005* UEFI: SanDisk, Partition 1 PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(4,0)/HD(1,GPT,c89f5685-7956-478f-b138-248f91ea15c3,0x800,0x1cf77df)…BO
"

Thank you for your assistance.

1 Like

Hi and welcome to EnOS’ community @LazarusSong!

Screenshot from 2022-05-10 11-31-03

:enos_flag:

1 Like

ok no problem.

"

[liveuser@eos-2022.04.08 ~]$ inxi -Fxxc0z --no-host | eos-sendlog
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4359 0 24 100 4335 37 6857 --:–:-- --:–:-- --:–:-- 6897
https://clbin.com/0uMU7
[liveuser@eos-2022.04.08 ~]$ test -d /sys/firmware/efi && echo UEFI || echo BIOS
UEFI
[liveuser@eos-2022.04.08 ~]$ sudo parted -l
Model: SanDisk Ultra (scsi)
Disk /dev/sda: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 15.6GB 15.6GB fat32 Main Data Partition msftdata

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

Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition boot, esp
2 274MB 290MB 16.8MB Microsoft reserved partition msftres
3 290MB 1005GB 1004GB ntfs Basic data partition msftdata
4 1005GB 1005GB 682MB ntfs Basic data partition hidden, diag
5 1005GB 1024GB 18.8GB ntfs Basic data partition hidden, msftdata

Model: Samsung SSD 970 EVO Plus 1TB (nvme)
Disk /dev/nvme1n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 2097kB 631MB 629MB fat32 boot, esp
2 631MB 74.0GB 73.4GB ext4
3 74.0GB 1000GB 926GB ext4

[liveuser@eos-2022.04.08 ~]$ efibootmgr -v
BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0000,0004,0005
Boot0000* Windows Boot Manager HD(1,GPT,ae6dbce1-5517-4638-b300-ce5d5a0a79bf,0x800,0x82000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS…x…B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}…
Boot0004* ubuntu HD(1,GPT,ae6dbce1-5517-4638-b300-ce5d5a0a79bf,0x800,0x82000)/File(\EFI\UBUNTU\SHIMX64.EFI)…BO
Boot0005* UEFI: SanDisk, Partition 1 PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(4,0)/HD(1,GPT,c89f5685-7956-478f-b138-248f91ea15c3,0x800,0x1cf77df)…BO

"

Pebcak I was looking at a response to a similar problem where you posted.

" I cannot see anything “off” in the output you have posted. Since the boot loader gets installed at the last stage of the installation, I would assume that the system is already installed correctly. If my assumption is correct, you could try arch-chrooting into the system and try to (re-)install the bootloader.

In the Live USB, open a terminal:


sudo su

mount /dev/sda3 /mnt ## /dev/sda3 is where you installed EnOS, right?

mount /dev/sda1 /mnt/boot/efi

arch-chroot /mnt

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS --force

"

When I try this and get to

mount /dev/nvme1n1p1 /mnt/boot/efi

I get

mount: /mnt/boot/efi: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.

I am afraid I don’t remember what the exact error/failure was in the case that you quoting from.

In yours the following seem to be relevant:

2022-05-30 - 22:25:29 [6]:     .. Target cmd: ("grub-install", "--target=x86_64-efi", "--efi-directory=/boot/efi", "--bootloader-id=endeavouros-3584", "--force") Exit code: 1 output:
 Installing for x86_64-efi platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).

error: cannot find a device for /boot/grub (is /dev mounted?)

I can’t recall having seen a failure like the above.

When you tried manual partitioning did you make sure to mount ESP at /boot/efi?

I guess this might be a case for @joekamprad to look into. Or other users who know what might be behind this failure.

In the meantime, If you want to try again to install, I would suggest:

  1. launch Gparted in the live session, choose the disk you want to install to from the dropdown menu at the top right.
    :warning: Make sure not to choose the wrong one!!

  2. in the menu bar got to devices and create a new partition table: GPT
    Click on apply.
    This will wipe your disk hence the warning above.

  3. launch the installer and choose automatic installation and point the installer to the relevant disk

If it fails again, please post the url of the install log in your reply.

1 Like

Also the following can be seen in the install log:

2022-05-30 - 22:24:55 [6]: [PYTHON JOB]: "/usr/bin/grub-probe: error: cannot find a device for / (is /dev mounted?)." 
2022-05-30 - 22:24:55 [6]: [PYTHON JOB]: "error: command failed to execute correctly"

Does it mean that there is something wrong with grub-probe not finding / and not that / is actually not there?
:thinking:

1 Like

This last attempt I manually partitioned. 600MB for the esp, I flagged it /boot /efi I was reading the arch wiki and it said the new method was just /efi? I wonder if I should have done that. However I had the same error when I used automatic partitioning. I also partitioned 70 GB to / for root, I’m a bit new to this so a stupid mistake is entirely possible. Then I did the rest of the 1 TB drive to /home with nothing for swap since the laptop has 16 GB of ram.

When I look in Gparted in the live instance to reformat I see the esp partition is flagged /boot, /esp and has /mnt and /tmp/calamares-root… as the mount point. The other 2 partitions don’t show anything for mount points in Gparted even though I selected them in manual formatting.

I will use Gparted this time and try again.

Try creating a new partition table this time as described above before launching the installer.

Let’s hope it will work this time. If it doesn’t, please post the URL for the new install log.

Good luck!

1 Like

It worked! Thanks for the help. Apparently the erase disk option doesn’t actually erase the disk like I imagined, starting with a new partition table was absolutely what was required.

For reference I did also have an issue with a pacman error earlier in the install and the fix was found on the forumn.

update mirrors in the welcome menu

sudo pacman -Sy archlinux-keyring

sudo pacman -Syu

This along with creating a new partition table worked perfectly, I appreciate all the help!

1 Like

Glad yo got it working!

If your initial issue as per the title of the topic is resolved, please consider to check the box for solution under the appropriate post that pointed to it. This will make the forum software to regard the thread as solved and other users with similar issue might find the solution more easily.

Enjoy your journey onboard Endeavour @LazarusSong!

:enos_flag:

1 Like

Maybe you can add on this note that the user can edit the current post and not re-post it a second time taking up more real estate. Just a suggestion since i see a few doing this. :wink:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.