Endeavour doesn't recognize it's own boot

Hello. I’ve been having some issues regarding the boot manager in my drive, as it seems it doesn’t recognize any OS while executing grub-mkconfig

First, some context. I wanted to install Endeavour into a removable ssd drive, so I can take the OS with me and use it when I’m in school and when I’m home.
This is because the school uses computers that are poorly maintained, while using a very restricted Lliurex OS. This way, i can keep my own versions of the programs that I need with the added benefit of ensuring compatibility at home.
Until now i’ve been using Manjaro for this, and it went fine until it started breaking after every update. So, I gave a try for Endeavour, since with regular testing it broke way less.

At home, it worked as it should. However, back in school the computer didn’t recognize the boot manager for Endeavour, only the Windows boot manager (at home I have a Windows).

After that I booted into a live version, and tried to fix it. I chroot into the system (with boot mounted), and used the commands grub-install and grub-mkconfig. The grub-install went correctly, as now i could see the boot entry in the boot order. But the mkconfig could not generate the entry for the Os, so the only entry was “UEFI firmware settings”.
I’ve tried to add my own custom entry in the grub.cfg to refer to Endeavour using the UUID, but I couldn’t find any vmlinuz and initrd.img in the /boot directory. Is that a problem or am I doing it wrong?

Is there a way to be able to rescue the boot and be able to use it in both computers? i fell that reinstalling will not solve the issue.

Home computer output of lsblk -o name,type,fstype,size,uuid (sdd is the drive where i installed endeavour)

NAME        TYPE FSTYPE     SIZE UUID
loop0       loop squashfs   1.7G 
sda         disk          931.5G 
├─sda1      part ntfs     780.6G 1335244B3D2FB6D4
└─sda2      part ext4     150.9G c7f9e590-6110-4508-af6d-04458f147600
sdb         disk            1.8T 
├─sdb1      part             16M 
└─sdb2      part ntfs       1.8T 2C7ECE217ECDE424
sdc         disk iso9660   28.9G 2022-12-17-15-01-34-00
├─sdc1      part iso9660    1.8G 2022-12-17-15-01-34-00
└─sdc2      part vfat       105M A59C-8529
sdd         disk          111.8G 
├─sdd1      part vfat      1000M 00B6-6235
├─sdd2      part ext4       102G 23e3fb70-cbb4-4b97-8683-53d356a393d5
└─sdd3      part swap       8.8G 84def723-737c-4857-9289-38b8e5f2c159
nvme0n1     disk          465.8G 
├─nvme0n1p1 part            128M 
├─nvme0n1p2 part ntfs       499M 2E7694DC7694A65D
├─nvme0n1p3 part vfat        99M 11F3-4132
└─nvme0n1p4 part ntfs     465.1G F4A1B1C30AD20615

i can’t access the school computer right now, but it has only one drive. And it is a desktop with an i5-4th gen, integrated graphics and 8gb ram.

EDIT: tried again and i was able to boot into it at home after using grub-mkconfig. However, i still feel that tomorrow i’m going to have the same problems. Any ideas?

Not sure if you have mistyped the command now or that is what you have used.
The correct command, anyways, would be:

grub-mkconfig -o /boot/grub/grub.cfg

for regenerating the grub.cfg.

Yes, i see that i got commands messed up. I always used grub-mkconfig -o /boot/grub/grub.cfg. I’m going to edit the post now.

If this is the external drive you will be using at school, you could use the flag --removable with the grub-install command.

--removable            the installation device is removable. This option
                              is only available on EFI.

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.

:eye: https://wiki.archlinux.org/title/GRUB#Installation

Thank you, right now it seems that there isn’t any problem and I’m able to access the system at home. I’ll check tomorrow when i return to school to see if the problem persists.

If the problem still remains, do i open a new post or just reply to you in this one? I feel that creating another one will look like spamming, but idk

1 Like

Post here.

Update: I’m at school now and the problem is still there. Once in chroot i executed grub-install --removable --efi-directory /boot (it would give me an error if i didn’t specify the efi directory) and grub-mkconfig -o /boot/grub/grub.cfg. The install went ok, and the output of the mkconfig is:

Generating grub configuration file ...
Found background: /usr/share/endeavouros/splash.png
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
Found Ubuntu 18.04.6 LTS (18.04) on /dev/sda2
Adding boot menu entry for UEFI Firmware Settings ...
done

And here’s the output of efibootmgr:

BootCurrent: 000E
Timeout: 5 seconds
BootOrder: 000E,0003,000D,0001,000B,000C
Boot0001* ubuntu	HD(1,GPT,11feba85-056c-4699-a65d-19c5dea9ca1d,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0003* endeavouros	HD(1,GPT,a7f8ade9-e835-684d-aeb5-b6956ea09355,0x1000,0x1f4000)/File(\EFI\ENDEAVOUROS\GRUBX64.EFI)
Boot000B* UEFI: PXE IP4 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/MAC(7085c2dbf133,0)/IPv4(0.0.0.00.0.0.0,0,0)0000424f
Boot000C* UEFI: PXE IP6 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/MAC(7085c2dbf133,0)/IPv6([::]:<->[::]:,0,0)0000424f
Boot000D* Windows Boot Manager	HD(1,GPT,a7f8ade9-e835-684d-aeb5-b6956ea09355,0x1000,0x1f4000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot000E* UEFI: hp v212w PMAP	PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/CDROM(1,0x398c00,0xd2a6)0000424f

It did create a new entry called “endeavouros”, but when i enter the only options available are “Ubuntu” (this computer OS) and “Advanced Uefi configuration”.

But one thing that I realized is that the long number in efibootmgr (which i guess is the UUID), is different from the actual drive UUID. Output of lsblk -f:

NAME   FSTYPE   FSVER         LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0  squashfs 4.0                                                                  0   100% /run/archiso/airootfs
sda                                                                                           
├─sda1 vfat     FAT32                     C6E5-EA60                                           
└─sda2 ext4     1.0                       dd301d80-35bf-4e4a-8e23-19cce5147b59                
sdb                                                                                           
├─sdb1 vfat     FAT32                     00B6-6235                             695.1M    30% /mnt/boot
├─sdb2 ext4     1.0           endeavouros 23e3fb70-cbb4-4b97-8683-53d356a393d5     49G    46% /mnt
└─sdb3 swap     1             swap        84def723-737c-4857-9289-38b8e5f2c159                
sdc    iso9660  Joliet Extens EOS_202212  2022-12-17-15-01-34-00                              
├─sdc1 iso9660  Joliet Extens EOS_202212  2022-12-17-15-01-34-00                     0   100% /run/archiso/bootmnt
└─sdc2 vfat     FAT16         ARCHISO_EFI A59C-8529                                           
sdd                                                                                           

Where sdb is the drive where I installed endeavour.
I’ve looked for possible configuration problems in the Bios, but everything seems fine.

If i manually add en entry in the grub configuration, would it resolve the problem?

Try:

grub-install --removable --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=EnOS-grub

Edit:

That should be PARTUUID in the output of efibootmgr.

Run

sudo blkid

or

lsblk -o name,type,fstype,size,label,uuid,partuuid

and compare.

Ok, you were right. The Part UUID is exactly the same.

After that, I used the command you gave me, grub-install --removable --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=EnOS-grub
And it didn’t show any errors. Then, I run grub-mkconfig -o /boot/grub/grub.cfg. The output is:

Generating grub configuration file ...
Found background: /usr/share/endeavouros/splash.png
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
Found Ubuntu 18.04.6 LTS (18.04) on /dev/sda2
Adding boot menu entry for UEFI Firmware Settings ...
done

But nothing changed, the isn’t a new boot option with that name and the last one didn’t change. Maybe the grub-mkconfig command should be different?

Edit: output of efibootmgr:

BootCurrent: 000E
Timeout: 5 seconds
BootOrder: 000E,0003,000D,0001,000B,000C
Boot0001* ubuntu	HD(1,GPT,11feba85-056c-4699-a65d-19c5dea9ca1d,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0003* endeavouros	HD(1,GPT,a7f8ade9-e835-684d-aeb5-b6956ea09355,0x1000,0x1f4000)/File(\EFI\ENDEAVOUROS\GRUBX64.EFI)
Boot000B* UEFI: PXE IP4 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/MAC(7085c2dbf133,0)/IPv4(0.0.0.00.0.0.0,0,0)0000424f
Boot000C* UEFI: PXE IP6 Realtek PCIe GBE Family Controller	PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/MAC(7085c2dbf133,0)/IPv6([::]:<->[::]:,0,0)0000424f
Boot000D* Windows Boot Manager	HD(1,GPT,a7f8ade9-e835-684d-aeb5-b6956ea09355,0x1000,0x1f4000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot000E* UEFI: hp v212w PMAP	PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/CDROM(1,0x398c00,0xd2a6)0000424f

sdb sdb1 vfat … /mnt/boot

You need to mount it under /boot/efi.

sudo mount /dev/sdXN  /mnt # replace X with the letter and N with the number of the system partition
sudo mount /dev/sdYM /mnt/boot/efi # replace Y with the letter and M with the number of the EFI partition
sudo arch-chroot /mnt

It says:

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

And dmseg says:

dmesg: read kernel buffer failed: Operation not permitted

Is that a problem? Should I manually create the folder?

What options did you choose when installing EnOS?
There are choices for systemd-boot, Grub or no bootloader at all?
If this was a UEFI install with Grub, I am surprised that there is no /boot/efi directory.

I am sure I chose the grub option. I also allowed for Endevour to create all partitions (erase all data in the drive). Should I try reinstalling? I already have the user directory backed up, so i can definitely do it.

Edit: if I mount it in /boot, there is a directory called “EFI” (in capital letters, but only after it is already mounted), does that have anything to do with it?

Yes, at this juncture, a reinstall is perhaps the fastest fix.
Make sure you boot up your EnOS’ live usb in UEFI mode. Choose erase disk and Grub in the installer.

The issue of moving the drive to another computer might still persist so I recommend to do a grub-install with --removable option according to the command line given above.

You can do this when your new install is finished and before rebooting.

That’s because you did a grub-install into /boot where you had mounted sdb1 before instead of /boot/efi.

When i select the partition options theres no “erase”, only manually partition, replace partition and install with another. Do i select replace, or do I completely format the drive so that erase option shows?

Try that.

Ok, well, it does boot in the school computer. I’ll update later if i can boot from home.

1 Like

No luck. I’ve given up :pensive:. I’m gonna reinstall Manjaro and better start memorizing how to reload and repair kernel modules from now.

However, I’ll probably install Endeavour in my home computer alongside windows since from the short period I’ve used it, I’ve absolutely loved it. Thank you very much for helping me up until this moment, really appreciate how helpful this community is.

I suspected that the issue will still be there.
That’s why you need the --romvable option in grub-install to install the bootloader as well in a fallback path for when you need to move the installation between different machines.

If you find time and have interest in giving it another shot to perhaps make it work, have a look at this (specially 2.2):

https://wiki.archlinux.org/title/Boot

1 Like

I did the grub-install with --removable after installation.

Also, after installation it did create the /boot/efi file and I mounted the boot partition there, just as you said.

But after two days of basically doing nothing at school, I’m going to stick to what worked before (partially, but still).