Skip to main content
Topic: [SOLVED] Installation going wrong, efi issues (?). Help! (Read 1746 times) previous topic - next topic
0 Members and 7 Guests are viewing this topic.

[SOLVED] Installation going wrong, efi issues (?). Help!

Hello. So I've decided to install Artix on my system after a good while of consideration, with s6.

I'm at the point where everything I would want for it is fully well configured. I have cross referenced a bunch of guides, and triple checked all my commands.

I am at the point of installing the boot manager, which I chose as Grub. You know, the average

Code: [Select]
Grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB /dev/sdb
Grub-mkconfig -o /boot/grub/grub.cfg

Thing is, it goes on successfully. It runs without issue. I go check efibootmgr, sure enough my new Artix is there too. I exit chroot, its still there.

I reboot. Its not there anymore. I enter the same installation media that told me it was installed 2 seconds ago, and it doesn't show up in efibootmgr. I redo the grub-install cmd and sure enough, its back.

Does anyone have any advice? What could be going wrong?

Re: Installation going wrong, grub issues. Help!

Reply #1
What a weird thing, which hardware are you using out of curiosity?
Since you are not booting off of nvme, does it work if you install it as legacy? (e.g. without /boot partition)

Re: Installation going wrong, grub issues. Help!

Reply #2
Assuming you followed the guide in the wiki normally the grub-install command is:
Code: [Select]
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
so
Code: [Select]
--efi-directory=/boot/efi
and not
Code: [Select]
--efi-directory=/boot

If following the guide you created the efi partition and mounted it like so:
Code: [Select]
 mkdir /mnt/boot/efi                            (UEFI)
 mount /dev/disk/by-label/ESP /mnt/boot/efi     (UEFI)

So your fat efi partition is at /mnt/boot/efi and not /mnt/boot

Not sure if this could be the problem.  I have in the past mounted the efi partition at /mnt/boot myself, but I know that by default it's /mnt/boot/efi.

Re: Installation going wrong, grub issues. Help!

Reply #3
Strange indeed. If the NVRAM is being cleared on a reboot that sounds like a hardware issue, not an installation issue. Although weird stuff can happen with software like grub-install or refind-install. I think refind-install in particular expects a /boot/efi directory, if it sees just /boot it will only pretend to work - no idea why, but it's not relevant here anyway I guess. What happens if you try to manually create the entry with efibootmgr? In your case something like:

Code: [Select]
efibootmgr -c -d /dev/sdb -p 1 -l '\boot\grub\grubx64.efi' -L 'GRUB' -u

Of course you'll need to change the path, partition, and other details if they're different.

Re: Installation going wrong, grub issues. Help!

Reply #4
What a weird thing, which hardware are you using out of curiosity?
Since you are not booting off of nvme, does it work if you install it as legacy? (e.g. without /boot partition)

Well, I'm currently using a 1Tb HDD for it, ATX Z390 motherboard with a 13th gen Intel and RTX4060 but that's not too relevant.

I'd rather use GPT/EFI than legacy, and I've followed all steps for it. I could try eventually though.

Assuming you followed the guide in the wiki normally the grub-install command is:
Code: [Select]
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
so
Code: [Select]
--efi-directory=/boot/efi
and not
Code: [Select]
--efi-directory=/boot

If following the guide you created the efi partition and mounted it like so:
Code: [Select]
 mkdir /mnt/boot/efi                            (UEFI)
 mount /dev/disk/by-label/ESP /mnt/boot/efi     (UEFI)

So your fat efi partition is at /mnt/boot/efi and not /mnt/boot

Not sure if this could be the problem.  I have in the past mounted the efi partition at /mnt/boot myself, but I know that by default it's /mnt/boot/efi.

Well, I've followed some other guides. I have been mounting it to /boot rather than /boot/efi so the commands correct from what I can see here.

Strange indeed. If the NVRAM is being cleared on a reboot that sounds like a hardware issue, not an installation issue. Although weird stuff can happen with software like grub-install or refind-install. I think refind-install in particular expects a /boot/efi directory, if it sees just /boot it will only pretend to work - no idea why, but it's not relevant here anyway I guess. What happens if you try to manually create the entry with efibootmgr? In your case something like:

Code: [Select]
efibootmgr -c -d /dev/sdb -p 1 -l '\boot\grub\grubx64.efi' -L 'GRUB' -u

Of course you'll need to change the path, partition, and other details if they're different.


This looks like it might do the trick! I'll go ahead paste that through once I get back home to my workstation.


Re: Installation going wrong, grub issues. Help!

Reply #5
I had the same problem in boxes with windows, where its EFI entry takes precedence over grub. Post the output of efibootmgr.

Re: Installation going wrong, grub issues. Help!

Reply #6
I had the same problem in boxes with windows, where its EFI entry takes precedence over grub. Post the output of efibootmgr.

I'm still not at my machine yet, but I'll post some outputs to recommended commands as well as this soon enough.

In the meantime, my human recreation of the output;

I am making this on a machine that has:
- 2 windows systems, one EFI, one BIOS, on separate disks (SSD 2TB, HDD 2TB)
- 1 Artix Linux system, installed on its own separate 1TB HDD.

Before running grub-install, efibootmgr shows something along the lines of;

0001; UEFI Windows
0002; UEFI Kingston Datatraveller 3.0 (my USB)
0003; UEFI Kingston Datatraveller 3.0 USB key (USB again)

I run grub-install, and it seems to add another entry with ID 0000. After letting the install fully go through, it ends up being ordered in this respective order;

0000; ARTIX (or whatever I set the bootloader ID to)    (Points to /boot/grub/grubx64.efi)
0001; UEFI Windows
0002; UEFI Kingston Datatraveller 3.0 (my USB)
0003; UEFI Kingston Datatraveller 3.0 key (USB again)

I restart, and it goes right back to the first sequence I showed; the 0000 entry just vanishes inexplicably. Bear in mind and reminder again, this is on a separate HDD to any Windows machines to begin with. And it's not an entry randomly going infront of the Artix one in the boot order, it just straight-up vanishes without a trace.

There's no issue with /dev/sdb1 (boot partition). I remount it, it has everything the grub install needed, and the data I respectively ordered is definitely on it. I have also re-done the grub-install command with --rechecks about 4 times now.


I do need to mention though. Just before I left my workstation, I noticed there's a button in the installation media's menu which allows me to scan for bootloaders. I managed to find two (?) for some reason, GRUB entries (its likely because I may have accidentally installed it with 2 different IDs when I did grub-install a few times). Trying to boot either up comes with an error which I'll once again have to get home to print out to y'all, but for now, it was something like;

Error: file normal.mo not found (missing module?)

I looked around the internet telling me this is due to incorrect UEFI installations configured by accident for it to be using legacy mode, but I swear I've installed everything properly. The partition is an EFI system, the boot media is booted into EFI, it's mounted correctly at /boot, the grub-install command is correct, and I've ran mkinitcpio and grub-mkconfig a bunch of times with the correct parameters too. What's up? How exactly do I make sure I have these modules /.mo files?

Re: Installation going wrong, grub issues. Help!

Reply #7
Your problem is indeed weird, with the vanishing EFI boot entries. Can you try installing a non-base s6 ISO like e.g. lxde-s6 from stable branch? I'm curious to see if calamares handles this correctly.

Re: Installation going wrong, grub issues. Help!

Reply #8
Your problem is indeed weird, with the vanishing EFI boot entries. Can you try installing a non-base s6 ISO like e.g. lxde-s6 from stable branch? I'm curious to see if calamares handles this correctly.

Last time I tried Calamares, it wouldn't allow me to create LVM partitions for my system and would crash, so I decided to do it manually with the base ISO in the first place. That was on a test VM though. Base managed to work well on said VM though, so all the more confusing.

I'll go ahead give it a shot on bare-metal as a last ditch resort if all else doesn't work here, thanks for the recommendation


Any thoughts on the module not found bit at the end of my message?

Re: Installation going wrong, grub issues. Help!

Reply #9
Right, I just checked. Yep. I can see the media detects a UEFI boot on my /dev/sdb1 disk. This is the exact error:

Code: [Select]
error: file '/grub/x86_64-efi/normal.mod not found. Entering Rescue mode

All of the .mod files are in the mounted drive's /grub/x86_64-efi/ directory. Including normal. I don't know if its of note, but all files have a ~ at the end before the d in .mod.

normal.mod~ exists, normal.mod doesn't

Is that really the issue? Why tf has grub done this?

Re: Installation going wrong, grub issues. Help!

Reply #10
I renamed all the files with a bulk command. My install now boots and fully works, all the way to a sweet DE!

Issue is, until anyone manages to get a lead on it, the mysterious vanishing act of that damned missing boot still haunts me. I re-did the efi entry, even did it myself manually as a helpful user here hinted, it still just poofs after reboot.

 

Re: Installation going wrong, grub issues. Help!

Reply #11
Imho the more common/standard is mnt efi at /boot/efi e.g /etc/fstab
Code: [Select]
.
 # <file system ID>                       <mount point>  <type>  <options> <dump> <pass>
 8 UUID=0E18-1644                            /boot/efi     vfat    umask=0077 0 2
 9 UUID=1171e3f3-1b89-45c9-be8e-73064998caf5 /             ext4    defaults,noatime 0 1
it's esp. mandatory on Windows' partition boot existence

not clarified what sdb (sda too) is, can:
$ sudo gdisk /dev/sdb
$ sudo gdisk /dev/sda
?
 or $ sudio lsblk -f


Re: Installation going wrong, grub issues. Help!

Reply #12
Hello. So I've decided to install Artix on my system after a good while of consideration, with s6.

I'm at the point where everything I would want for it is fully well configured. I have cross referenced a bunch of guides, and triple checked all my commands.

I am at the point of installing the boot manager, which I chose as Grub. You know, the average

Code: [Select]
Grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB /dev/sdb
Does anyone have any advice? What could be going wrong?



My experience is that for some odd reason, systems do not like this  -

First /dev/sdb ?  don't you need the partion?

It seems to have settled on
/dev/sda3                                       499M  296K  499M   1% /boot/efi

with your own partition - but /boot/efi

ALSO - FWIW sync the partions before rebooting.




Re: Installation going wrong, grub issues. Help!

Reply #13
On my PC :
Code: [Select]
lsblk -f
NAME   FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda                                          
├─sda1                                       
├─sda2                            5,3G    67% /
├─sda3                          134,1G    80% /media/77
├─sda4                           41,4M    58% /boot/efi
└─sda5                                        [SWAP]

Re: Installation going wrong, grub issues. Help!

Reply #14
On my PC :
Code: [Select]
lsblk -f
NAME   FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda                                          
├─sda1                                       
├─sda2                            5,3G    67% /
├─sda3                          134,1G    80% /media/77
├─sda4                           41,4M    58% /boot/efi
└─sda5                                        [SWAP]


what is sda3?