Artix Linux => Installation / Migration / Configuration => Topic started by: JWJ212 on 08 August 2023, 04:18:33
Title: [SOLVED] Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 08 August 2023, 04:18:33
Hello,
I am running a fresh install of Artix and after following all steps in the installation guide I was presented with no boot entry for GRUB.
I have tried the solutions listed in a few other forum posts, namely https://forum.artixlinux.org/index.php/topic,1398.0.html (Installing GRUB and then the kernel) and one from the Arch wiki https://bbs.archlinux.org/viewtopic.php?id=279958 (Running through the installation again)
I have tried reinstalling GRUB a few other times and also manually adding the boot entry but it seems that my BIOS does not have that functionality.
I am unsure what to include in this post, as this is my first time posting on a forum for Linux, so I will happily supply anything that is asked of me.
I apologize for being a noob, and thank you for you help!
EDIT: I tried using efibootmgr to manually add the entry as described here https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#efibootmgr (obviously changing the command for my system) This did not work either.
EDIT 2:
After booting in how reply 1 described using the ISO I tried running efibootmgr again to create an entry I ran efibootmgr --create --disk /devnvme1n1 --part 1 --loader /boot/efi/EFI/grub/grubx64.efi --label "GRUB Boot Manager" --unicode and got the output
BootCurrent: 0005 Timeout: 2 seconds BootOrder: 0000,0005,0006,0004,0001,0003 Boot0001* Hard Drive BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200) Boot0003 Windows Boot Manager HD(2,GPT,297e9aef-059f-4ff5-81e6-54220a803a5a,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI) Boot0004* USB HDD BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0900) Boot0005* UEFI: USB DISK 3.0 PMAP PciRoot(0x0)/Pci(0x14,0x0)/USB(17,0)/CDROM(1,0x18842c,0x8000) Boot0006* UEFI: USB DISK 3.0 PMAP, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(17,0)/HD(1,MBR,0x0,0x18842c,0x2000) Boot0000* GRUB Boot Manager HD(1,GPT,3c41c4d6-0d5b-40fa-97ef-dc221050c4f5,0x800,0x200000)/File(\boot\efi\EFI\grub\grubx64.efi)
However, still no entry in the BIOS after rebooting.
EDIT 2: My problem has been solved, thank you to all who helped out! The solution that ended up working was moving the grubx64.efi file to /boot/efi/EFI/BOOT/bootx64.efi as described in reply #20.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: ####### on 08 August 2023, 04:39:54
If you boot an Artix iso there is an option at the bottom of the onscreen list to find efi boot things or something like that - if you are lucky it might find your OS and even give it an entry in the BIOS EFI menu, if you are mostly installed correctly. It can take a while to search the drives. Older computers don't have EFI boot, and newer ones might need various settings in BIOS to work. The Artix and Arch wiki have some useful info:
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 08 August 2023, 05:05:30
Alright, I was able to find my bootloader inside the ISO and successfully boot into my system through GRUB. However, there is still no boot entry, but at least I know it CAN boot so I can try and create it.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: tintin on 08 August 2023, 06:05:29
Alright, I was able to find my bootloader inside the ISO and successfully boot into my system through GRUB. However, there is still no boot entry, but at least I know it CAN boot so I can try and create it.
And once you were able to boot to your system, did you just try sudo grud-install /dev/sd<the root partition>?
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: mrbrklyn on 08 August 2023, 06:12:39
what is your hardware?
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 08 August 2023, 06:19:32
Alright, I was able to find my bootloader inside the ISO and successfully boot into my system through GRUB. However, there is still no boot entry, but at least I know it CAN boot so I can try and create it.
And once you were able to boot to your system, did you just try sudo grud-install /dev/sd<the root partition>?
Yes, I did this just now and still no dice.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: tintin on 08 August 2023, 09:34:43
Here is the content of my /etc/default/grub to possibly compare with what you have:
# Preload both GPT and MBR modules so that they are not missed GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable Hidden Menu, and optionally hide the timeout count #GRUB_HIDDEN_TIMEOUT="5" #GRUB_HIDDEN_TIMEOUT_QUIET="true"
# Uncomment to use basic console GRUB_TERMINAL_INPUT="console"
# Uncomment to disable graphical terminal #GRUB_TERMINAL_OUTPUT="console"
# The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE="1680x1050x8" GRUB_GFXMODE="1024x768,800x600"
# Uncomment to allow the kernel use the same resolution used by grub GRUB_GFXPAYLOAD_LINUX="keep"
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter # format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" GRUB_DISABLE_LINUX_UUID="true"
# Uncomment to disable generation of recovery mode menu entries # GRUB_DISABLE_RECOVERY="true"
# Uncomment and set to the desired menu colors. Used by normal and wallpaper # modes only. Entries specified as foreground/background. export GRUB_COLOR_NORMAL="light-blue/black" export GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme GRUB_BACKGROUND="/home/jp/Images/2020-04-26_09-21-12.png" #GRUB_THEME="/usr/share/grub/themes/artix/theme.txt"
# Uncomment to get a beep at GRUB start #GRUB_INIT_TUNE="480 440 1"
GRUB_SAVEDEFAULT="true"
GRUB_DISABLE_LINUX_RECOVERY="false"
GRUB_DISABLE_OS_PROBER="false"
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: ####### on 08 August 2023, 16:19:01
It seems from the description not related to entries in grub.cfg missing, but in the BIOS efi list. Yet in the first post the efibootmgr mentions a Grub entry, so it must be nearly there. You need an EFI partition which you apparently have. This must be mounted on /boot/efi, if /boot is on it's own partition this must be mounted first on /boot, check /etc/fstab is correct, then run mkinitcpio -P if changes were made. Once you have /boot/efi mounted in your Artix install (you can do all this in a chroot and manually mount /boot/efi or boot with the help of the iso) then run from within your new Artix OS:
With apparently 3 or 4 disks present, there could be some confusion possible - perhaps temporarily disable some from booting in the BIOS or even unplug / remove them to simplify matters until it's working.You will need the disk with the EFI partition and the Artix one (the NVMe drive it seems) if different. In my BIOS I had no obvious method to add EFI boot entries, but it was required and there was indeed a way, consulting the relevant Dell (in my case) manual online showed how to do it.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 08 August 2023, 18:47:31
It seems from the description not related to entries in grub.cfg missing, but in the BIOS efi list. Yet in the first post the efibootmgr mentions a Grub entry, so it must be nearly there. You need an EFI partition which you apparently have. This must be mounted on /boot/efi, if /boot is on it's own partition this must be mounted first on /boot, check /etc/fstab is correct, then run mkinitcpio -P if changes were made. Once you have /boot/efi mounted in your Artix install (you can do all this in a chroot and manually mount /boot/efi or boot with the help of the iso) then run from within your new Artix OS:
With apparently 3 or 4 disks present, there could be some confusion possible - perhaps temporarily disable some from booting in the BIOS or even unplug / remove them to simplify matters until it's working.You will need the disk with the EFI partition and the Artix one (the NVMe drive it seems) if different. In my BIOS I had no obvious method to add EFI boot entries, but it was required and there was indeed a way, consulting the relevant Dell (in my case) manual online showed how to do it.
Alright, after unplugging all of my drives mounting my efi partition to /boot/efi as before and reinstalling grub it still is not functioning. I have been looking around to see how to manually add boot entries in my bios (MSI Click Bios 5) and the only info I found was in this forum post https://forum-en.msi.com/index.php?threads/click-bios-5-uefi-boot-entry-management.294360/
“ I've contacted MSI technical support. The outcome of our chatting was: - there are no options to manage UEFI boot entries from Click BIOS 5; - they are not planning to implement them.”
So I am kind of at a loss here, I may try to move the actual EFI file around and see if this changes anything.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: mrbrklyn on 08 August 2023, 20:30:15
It seems from the description not related to entries in grub.cfg missing, but in the BIOS efi list. Yet in the first post the efibootmgr mentions a Grub entry, so it must be nearly there. You need an EFI partition which you apparently have. This must be mounted on /boot/efi, if /boot is on it's own partition this must be mounted first on /boot, check /etc/fstab is correct, then run mkinitcpio -P if changes were made. Once you have /boot/efi mounted in your Artix install (you can do all this in a chroot and manually mount /boot/efi or boot with the help of the iso) then run from within your new Artix OS:
With apparently 3 or 4 disks present, there could be some confusion possible - perhaps temporarily disable some from booting in the BIOS or even unplug / remove them to simplify matters until it's working.You will need the disk with the EFI partition and the Artix one (the NVMe drive it seems) if different. In my BIOS I had no obvious method to add EFI boot entries, but it was required and there was indeed a way, consulting the relevant Dell (in my case) manual online showed how to do it.
Alright, after unplugging all of my drives mounting my efi partition to /boot/efi as before and reinstalling grub it still is not functioning. I have been looking around to see how to manually add boot entries in my bios (MSI Click Bios 5) and the only info I found was in this forum post https://forum-en.msi.com/index.php?threads/click-bios-5-uefi-boot-entry-management.294360/
“ I've contacted MSI technical support. The outcome of our chatting was: - there are no options to manage UEFI boot entries from Click BIOS 5; - they are not planning to implement them.”
So I am kind of at a loss here, I may try to move the actual EFI file around and see if this changes anything.
If you are running in bios then efi will not work and vice-versa Your hardware setting have to match your installation.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: ####### on 08 August 2023, 21:24:21
It's hidden in a spoiler in the first post, but this seems to be EFI:
Quote
I ran efibootmgr --create --disk /devnvme1n1 --part 1 --loader /boot/efi/EFI/grub/grubx64.efi --label "GRUB Boot Manager" --unicode and got the output
BootCurrent: 0005 Timeout: 2 seconds BootOrder: 0000,0005,0006,0004,0001,0003 Boot0001* Hard Drive BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200) Boot0003 Windows Boot Manager HD(2,GPT,297e9aef-059f-4ff5-81e6-54220a803a5a,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI) Boot0004* USB HDD BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0900) Boot0005* UEFI: USB DISK 3.0 PMAP PciRoot(0x0)/Pci(0x14,0x0)/USB(17,0)/CDROM(1,0x18842c,0x8000) Boot0006* UEFI: USB DISK 3.0 PMAP, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(17,0)/HD(1,MBR,0x0,0x18842c,0x2000) Boot0000* GRUB Boot Manager HD(1,GPT,3c41c4d6-0d5b-40fa-97ef-dc221050c4f5,0x800,0x200000)/File(\boot\efi\EFI\grub\grubx64.efi)
And here you can change your UEFI boot order in this BIOS: https://us.msi.com/support/technical_details/DT_Boot_Priority (https://us.msi.com/support/technical_details/DT_Boot_Priority)
In the above output you can see grub getting mentioned, so efibootmgr could potentially add a UEFI boot entry to the available options you would think. I'm not sure if it's just a typo but some of that command looks suspect - /devnvme1n1 - shouldn't there be a / after dev?
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 08 August 2023, 21:48:46
It's hidden in a spoiler in the first post, but this seems to be EFI:
Quote
I ran efibootmgr --create --disk /devnvme1n1 --part 1 --loader /boot/efi/EFI/grub/grubx64.efi --label "GRUB Boot Manager" --unicode and got the output
BootCurrent: 0005 Timeout: 2 seconds BootOrder: 0000,0005,0006,0004,0001,0003 Boot0001* Hard Drive BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200) Boot0003 Windows Boot Manager HD(2,GPT,297e9aef-059f-4ff5-81e6-54220a803a5a,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI) Boot0004* USB HDD BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0900) Boot0005* UEFI: USB DISK 3.0 PMAP PciRoot(0x0)/Pci(0x14,0x0)/USB(17,0)/CDROM(1,0x18842c,0x8000) Boot0006* UEFI: USB DISK 3.0 PMAP, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(17,0)/HD(1,MBR,0x0,0x18842c,0x2000) Boot0000* GRUB Boot Manager HD(1,GPT,3c41c4d6-0d5b-40fa-97ef-dc221050c4f5,0x800,0x200000)/File(\boot\efi\EFI\grub\grubx64.efi)
And here you can change your UEFI boot order in this BIOS: https://us.msi.com/support/technical_details/DT_Boot_Priority (https://us.msi.com/support/technical_details/DT_Boot_Priority)
In the above output you can see grub getting mentioned, so efibootmgr could potentially add a UEFI boot entry to the available options you would think. I'm not sure if it's just a typo but some of that command looks suspect - /devnvme1n1 - shouldn't there be a / after dev?
Yeah, that was just a typo, I fixed it after posting. In any case while I can change my boot order in my BIOS settings I am not able to add any new entries and there is not an option for GRUB or Artix at all when selecting.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: mrbrklyn on 08 August 2023, 22:04:17
also GPT needs some empty space at the end of the drive.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: ####### on 08 August 2023, 22:17:38
The Debian wiki suggests this including the -w flag: https://wiki.debian.org/UEFI#efibootmgr_and_efivar (https://wiki.debian.org/UEFI#efibootmgr_and_efivar) efibootmgr example 3 - add a new boot entry Create a new boot entry, pointing to a bootloader program on disk /dev/sdb, partition 1; write a new signature to the MBR if needed; call it "debian"; the bootloader program is in \EFI\debian\grubx64.efi # efibootmgr -c -d /dev/sdb -p 1 -w -L debian -l '\EFI\debian\grubx64.efi'
I installed Devuan a while ago and the installation automatically set everything to boot via Devuan grub which I didn't actually want, so they have it working somehow, although more recently yet on another machine I selected advance install for Devuan and didn't install Grub to avoid this, but then it wiped my efi partition and left it empty so nothing booted until it was fixed from an Artix iso. But on that one I added the new entry from the BIOS.
That certainly created a new entry for a non-existent debian which appeared in my BIOS uefi boot options when I tried just now. (I don't have Windows installed, that's just some relic in the BIOS from past use, or some default thing I guess.)
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 08 August 2023, 23:16:21
also GPT needs some empty space at the end of the drive.
Yeah, I didn’t have this free space so after going in and repartitioning to account for it and reinstalling everything it still has not worked unfortunately. At least it is a step in the right direction, thanks!
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 08 August 2023, 23:24:54
The Debian wiki suggests this including the -w flag: https://wiki.debian.org/UEFI#efibootmgr_and_efivar (https://wiki.debian.org/UEFI#efibootmgr_and_efivar) efibootmgr example 3 - add a new boot entry Create a new boot entry, pointing to a bootloader program on disk /dev/sdb, partition 1; write a new signature to the MBR if needed; call it "debian"; the bootloader program is in \EFI\debian\grubx64.efi # efibootmgr -c -d /dev/sdb -p 1 -w -L debian -l '\EFI\debian\grubx64.efi'
I installed Devuan a while ago and the installation automatically set everything to boot via Devuan grub which I didn't actually want, so they have it working somehow, although more recently yet on another machine I selected advance install for Devuan and didn't install Grub to avoid this, but then it wiped my efi partition and left it empty so nothing booted until it was fixed from an Artix iso. But on that one I added the new entry from the BIOS.
That certainly created a new entry for a non-existent debian which appeared in my BIOS uefi boot options when I tried just now. (I don't have Windows installed, that's just some relic in the BIOS from past use, or some default thing I guess.)
I tried this out and it seemingly created an entry but it is still not accessible on startup just as before.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: ####### on 08 August 2023, 23:56:02
I think I read somewhere that some EFI BIOS implementations can only hold a limited number of entries and you need to delete one if there are none left - I leave it to you to consider which if any you wish to delete at your own risk, and quite likely it won't help either, after all nothing else so far has. ;D It might be possible to hijack an existing entry by somehow duplicating a uuid, filename and location, but I have no idea if that could work in reality...
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: JWJ212 on 09 August 2023, 00:22:21
I think I read somewhere that some EFI BIOS implementations can only hold a limited number of entries and you need to delete one if there are none left - I leave it to you to consider which if any you wish to delete at your own risk, and quite likely it won't help either, after all nothing else so far has. ;D It might be possible to hijack an existing entry by somehow duplicating a uuid, filename and location, but I have no idea if that could work in reality...
I looked into removing entries through my bios and it seems like there is no way to do that just as there was no way to add them.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: ####### on 09 August 2023, 04:19:44
You should be able to do that with efibootmgr according to the man page, it gives an example of how to remove a boot entry.
Title: Re: Fresh install, GRUB not creating a boot entry.
Post by: tintin on 09 August 2023, 05:57:28
On my Acer ES1-732, you have to work on the "vfat" partition after installing grub. Here are my notes that might inspire you: Spoiler (click to show/hide)
If you can't boot a system you just installed, boot in live mode and detect the "vfat" partition with the "GPT" label: sudo blkid /dev/sda4: UUID="B772-4C60" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="GPT" PARTUUID="cca063d4-6381-4c12-970f-986c81ead4aa"
On my Acer this vfat partition is on /dev/sda4
mount the partition of the system that we have just installed (for example on /dev/sda2): sudo mount /dev/sda2 /mnt sudo mkdir /mnt/boot/efi sudo mount /dev/sda4 /mnt/boot/efi
Create the EFI directory sudo mkdir /mnt/boot/efi/EFI
Copy or move /mnt/boot/efi/artix/grubx64 file next to /mnt/boot/efi/EFI/BOOT and rename it to bootx64.
On my Acer ES1-732, you have to work on the "vfat" partition after installing grub. Here are my notes that might inspire you: Spoiler (click to show/hide)
If you can't boot a system you just installed, boot in live mode and detect the "vfat" partition with the "GPT" label: sudo blkid /dev/sda4: UUID="B772-4C60" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="GPT" PARTUUID="cca063d4-6381-4c12-970f-986c81ead4aa"
On my Acer this vfat partition is on /dev/sda4
mount the partition of the system that we have just installed (for example on /dev/sda2): sudo mount /dev/sda2 /mnt sudo mkdir /mnt/boot/efi sudo mount /dev/sda4 /mnt/boot/efi
Create the EFI directory sudo mkdir /mnt/boot/efi/EFI
Copy or move /mnt/boot/efi/artix/grubx64 file next to /mnt/boot/efi/EFI/BOOT and rename it to bootx64.
Title: Re: [SOLVED] Fresh install, GRUB not creating a boot entry.
Post by: Hitman on 09 August 2023, 14:03:27
If I'm not wrong, when grub will need to be reinstalled (doesn't usually happen but last autumn an update needed it for instance) you'll have to copy that file again. Just something to keep in mind :)
Title: Re: [SOLVED] Fresh install, GRUB not creating a boot entry.
Post by: tintin on 09 August 2023, 21:51:05
If I'm not wrong, when grub will need to be reinstalled (doesn't usually happen but last autumn an update needed it for instance) you'll have to copy that file again. Just something to keep in mind :)
Undoubtedly yes. However, I have never had to do this for a few years on this Acer ES1-732. sudo update-grub goes smoothly on that same PC.