Skip to content

Having possibly huge issue with installing Arch and EFI, will give $25 Visa gift card to first person who can help me fix the problem

Let me preface this by saying that this will be a long post, because there's a lot to say and I'm not sure what information is important and what information isn't. I will give a $25 Visa gift card to the first person who can help me fix this problem.

I've installed Arch before (which is why this problem is so strange to me), and I decided that I want to reinstall it on my computer (the reason why isn't important). I've completely installed Arch, I just have to install the bootloader now. So I install GRUB for 64-bit EFI system using the Arch Wiki (I have no idea wtf EFI is btw lol, I just know my computer uses it), and then I reboot, When the computer boots up, it boots into...a Windows setup??? To be exact, it seems like some legacy Windows setup for some ancient version of Windows. Prior to installing Arch, I wiped all partitions, and filled my primary drive with random noise, and I haven't used Windows in years, so I have absolutely no fucking idea where this came from. Eventually, after trying to load stuff for the set up, it blue screens, stating that my BIOS isn't ACPI compliant. Booting back into the Arch installation USB and running efibootmgr shows that the entry for GRUB has disappeared. So I arch-chroot again, and use efibootmgr to create an entry for GRUB. When I reboot, the entry disappears. This happens every time. I went into my BIOS and changed the boot mode from UEFI+Legacy to just UEFI, and it no longer boots into the Windows setup; it just boots directly into the BIOS, probably because there's nothing to boot, because once again, the GRUB EFI entry is wiped on reboot. The efibootmgr command I run is efibootmgr -cd /dev/sda -p 1 -l /EFI/BOOT/BOOTX64.EFI -L GRUB. Running fdisk -l shows no extra partitions that I'm unaware of; only the partitions on my main drive (my actual installation), one on my secondary drive that's just for storage, the partition on the USB installation stick, and /dev/loop0 which I assume is normal. Is something wrong with my BIOS? Is this fixable, and if it's not, what did I do wrong to cause this issue? Absolutely any help whatsoever is appreciated. I can run additional commands or give more information if needed.

0 points22 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 100% up
Kind
Text
ID
e322b5

Author

16
posts
44
comments
5
media
View profile

23 comments

Make sure you reused the existing windows partition instead of making a new one.

Go into your bios and see if you can change the priority.

Last ditch hack. Remove bootx64.efi or whatever it's called it your efi partition and replace it with a copy of your bootloader.

1 points

There is no existing Windows partition, that's why this whole thing is so confusing. I've looked through the BIOS and I can't find anything to change the priority, because there's nothing to boot for some reason.

1 points

Check everything obvious. Read the wiki. I assume you've set up EFI before successfully.

I assume you made your boot partition with mkfs.fat -F32 or something like and it is mounted as /boot

Is your disk an NMVe drive? if so pass -e 3 to your efibootmgr command. Could be worth trying this anyway. This is well worth a try as I have a Dell XPS that worked fine with EFI WITHOUT this flag until the day I booted windows. Since then never again. grub-install always left it unable to boot as I had to run efibootmgr again with this flag. Clear CMOS and all boot entries did not fix.

Some BIOS only work if the efi executable is a certain name. I think this is covered in the Arch wiki though....

Edit: looking at your post your mounting your efi folder under /EFI. Make sure grub is aware of this (add --efi-directory=/EFI to grub-install)

1 points

You are correct, my boot partition is FAT32 mounted as /boot. I don't know what an NMVe drive is, but I'm confident my drive is not one. My EFI directory is /boot/efi. In my grub-install command, I put --efi-directory=/boot/efi. Inside /boot/efi is /EFI/BOOT/BOOTX64.EFI. I was under the impression that the efibootmgr command has the location set relative to the EFI directory. Is that not the case?

1 points

Ah my bad. Yes what you have put around relative paths is right.

Other than adding -e 3 to efibootmgr I'm out. Update the BIOS also maybe?

1 points

Your efi directory is NOT /boot/efi. Your whole /boot is sda1 (your vfat efi system partition) which means /boot is your efi directory.

The whole bit about /boot/efi/EFI is about weird (imo) setups where your /boot isn't your efi system partition and mounting that separately onto /boot/efi

1 points
unknown author

This is wrong.

EFI is the boot directory and to be mounted at /efi

When you install grub tell it to install to /efi or just efi. You should be chrooted into the system when doing this with / and /efi mounted. --efi-directory=/efi

Leave the /boot directory alone.

This is posted from an efi booted install, and i've gone through the install at least 20 times over the years.

Mount the EFI system partition and in the remainder of this section, substitute esp with its mount point.

grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB

its /efi

make sure to run grub-mkconfig -o /boot/grub/grub.cfg afterwards

1 points

Does /EFI/BOOT/BOOTX64.EFI actually exist on your EFI partition? Remember, this path should be relative to the EFI partition, as if it was mounted at /, not relative to how your partitions are mounted in linux.

1 points

I have a boot partition mounted on /boot, and an efi directory in /boot/efi. When I installed GRUB, I specified the EFI directory was /boot/efi. /EFI/BOOT/BOOTX64.EFI does exist inside that directory.

1 points

and an efi directory in /boot/efi

You mean you have your ESP mounted at /boot/efi??

1 points

You'll get more people to read your post if it isn't a wall of text, but perhaps a numbered or bullet list. Also, you should provide your partition table (fdisk -l), lsblk -f -o +SIZE, so we can see what's going on, and a find of the contents of the ESP (the EFI System Partition, likely the first, most likely some FAT).

We often must assume nothing when you come to us with a problem like this. We must check.

1 points

Yeah, I probably shouldn't have done a giant wall of text, lol, you're right.

fdisk -l gives this output (shortened a lot so I can do less typing, hopefully everything that's actually important is included):

Disk /dev/sda: 931.53 GiB (...)
(...)
Disklabel type: gpt
(...)

Device (...)
/dev/sda1 (...) 487M EFI System
/dev/sda2 (...) 837.7G Linux filesystem
/dev/sda3 (...) 3.7G Linux filesystem

Disk /dev/sdb: 2.75 TiB (...)
(...)
Disklabel type: gpt
(...)

Device (...)
/dev/sdb1 (...) 2.7T Linux filesystem

Disk /dev/sdc: 3.79 GiB (...)
(...)
Disklabel type: dos
(...)

Device (...)
/dev/sdc1 * (...) 3.8G (...) W95 FAT32 (LBA)

Disk /dev/loop0: 508.23 MiB (...)
(...)

Disk /dev/mapper/cryptroot: 837.72 GiB (...)
(...)

/dev/sda1 (boot partition) is mounted at /boot, and is FAT32. /dev/sda2 (main partition) is ext4, mounted at / obviously. /dev/sda3 is the swap partition. /dev/sdb is just another hard drive I use to store other stuff. /dev/sdc is the Arch USB stick.

find /boot/efi gives:

/boot/efi
/boot/efi/EFI
/boot/efi/EFI/BOOT
/boot/efi/EFI//BOOT/BOOTX64.EFI
/boot/efi/EFI/GRUB
/boot/efi/EFI/GRUB/grubx64.efi
1 points

According to this information your efibootmgr command is missing the /efi part of the path. As your EFI System Partition (/dev/sda1) is mounted under /boot, the relative paths required by efibootmgr start under this mount point (/boot "becomes" / when booting), so the command should be:

efibootmgr -cd /dev/sda -p 1 -l /efi/EFI/BOOT/BOOTX64.EFI -L GRUB

also, is /boot/efi/EFI/BOOT/BOOTX64.EFI a copy of /boot/efi/EFI/GRUB/grubx64.efi ?

If don't, then the command should point to the bootable efi GRUB stub instead, like this:

efibootmgr -cd /dev/sda -p 1 -l /efi/EFI/GRUB/grubx64.efi -L GRUB

let's give those a try ... if it works still got to figure why the entry disappears.

1 points

Can you please post the results of the efibootmgr --verbose command just after you use the efibootmgr command you mention in your post, and after rebooting.

1 points

After running the efibootmgr command:

BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0000,0004,0001,0002,0003
Boot0000* GRUB HD(1,GPT,348832cc-16bd-4029-bd5e-99daae4f6043,0x800,0xf3800)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0001 Hard Drive (..., stuff that's not important and I really don't want to have to type out)
Boot0002 CD/DVD Drive (...)
Boot0003 USB KEY (...)
Boot0004* UEFI: Flash Drive SM_USB20 3000, Partition 1 (...)

After rebooting:

BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0004,0001,0002,0003
Boot0001 Hard Drive (...)
Boot0002 CD/DVD Drive (...)
Boot0003 USB KEY (...)
Boot0004* UEFI: FLASH Drive SM_USB20 3000, Partition 1 (...)

EDIT: formatting

2 points

What does your boot partition look like? Should be efi partition using a fat fs and needs to be a specific size. Most people having issues with EFI boot loaders are doing one of those things wrong.

1 points

My boot partition is a FAT32 EFI system partition mounted at /boot. It's 512MB, which is probably overkill but I feel like shouldn't be harmful, as I've done Arch installs in the past with a boot partition that size.

1 points

I've had some great success with systemd-boot on my EFI laptop. https://wiki.archlinux.org/index.php/Systemd-boot

​

The windows setup does sound like some storage media has a 'hidden' partition with that setup on it. Or possibly another media device inside, if you are absolutely sure that you've cleared the disk.

1 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.