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.
About this post
- Posted
- Archived
- Score
- 0 · 100% up
- Kind
- Text
- ID
- e322b5
23 comments
Don't give away your money, unless it's for charity.
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.
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.
Did you verify you system is booted in uefi mode?
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)
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?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?
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
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.
its /efi
make sure to run grub-mkconfig -o /boot/grub/grub.cfg afterwards
Does
/EFI/BOOT/BOOTX64.EFIactually 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.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.
You mean you have your ESP mounted at
/boot/efi??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 afindof 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.
Yeah, I probably shouldn't have done a giant wall of text, lol, you're right.
fdisk -lgives this output (shortened a lot so I can do less typing, hopefully everything that's actually important is included):/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/efigives:According to this information your
efibootmgrcommand is missing the/efipart of the path. As your EFI System Partition (/dev/sda1) is mounted under/boot, the relative paths required byefibootmgrstart 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 GRUBalso, is
/boot/efi/EFI/BOOT/BOOTX64.EFIa 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 GRUBlet's give those a try ... if it works still got to figure why the entry disappears.
Can you please post the results of the
efibootmgr --verbosecommand just after you use the efibootmgr command you mention in your post, and after rebooting.After running the efibootmgr command:
After rebooting:
EDIT: formatting
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.
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.
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.
Deleted before we saved it.