I tried to install Arch Linux on my HP laptop such that it would boot directly from UEFI. I did it before but I don't remember exact method I used. I follow standard instructions form wiki and have /dev/sda1 mounted at /mnt/boot and /dev/sda2 mounted at /mnt. After chrooting in /mnt I use pacman to download efibootmgr. Then I use the command:

efibootmgr -d /dev/sda -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sda2 rw initrd=/initramfs-linux.img"

following wiki again. I always make sure that boot order is proper but after reboot, computer doesn't see any bootable system.

Then using UEFI shell from USB I wanted to try

Shell> bcfg boot add N fsV:\vmlinuz-linux "Arch Linux"

but my shell only lists USB as fs0 and everything else is listed as blk0, blk1 and so on. They are not accesible directories so I can't use these in command above.

I don't know what else could I try. I burnt USB using rufus and I tried most of the options. Currently I used drive formatted GPT, FAT32 and I used DD mode with rufus. I have legacy and secure boot disabled in BIOS. Laptop's disk is formatted GPT and /dev/sda1 is EFI partition. Both partitions are formatted as ext4 using mkfs.ext4. I tried multiple times reainstalling the system but I still can't figure out where the problem lies.

  • Sometimes EFIs get confused and can no longer accept new boot entries. Using the firmware setup utility to reset all firmware options to their defaults may fix this problem, but I can make no promises about that. – Rod Smith Jul 5 '17 at 14:50

I do not trust in efibootmgr so I like to do this manually, If I missing something please write a comment.

First you need to boot from the USB installation media in UEFI mode. I try to highlight the arch installation process UEFI part.

The UEFI boot required not just efi but a boot partition too.

First two partition should look like this: boot 1M size and start at the first sector. then a 500M efi partition.

fdisk -l
Device       Start       End   Sectors  Size Type
/dev/sda1     2048      4095      2048    1M BIOS boot
/dev/sda2     4096   1028095   1024000  500M EFI System

I recommend gdisk to create them.

Both should be formated as FAT:

mkfs.vfat /dev/sda1
mkfs.vfat /dev/sda2

Mount root FS to /mnt as you would do then create a esp folder in the /mnt and mount efi partition as the following:

mkdir /mnt/esp
mount -o rw,relatime,fmask=0033,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro /dev/sda2 /mnt/esp

At this point the pacstrap and then genfstab could be done from the UEFI point of veiw.

add the following to the end of the /mnt/etc/fstab file.

/esp/EFI/arch   /boot   none    bind    0 0

This required because the pacman update the /boot while the boot loader will looking the files in /esp/EFI/arch so system become unbootable after an update.

now you have to edit /etc/mkinitcpio.conf HOOKS= section, should look like this:

HOOKS='base systemd autodetect modconf block sd-lvm2 filesystems keyboard fsck sd-shutdown'

sd-lvm2 only required if you using lvm partitions.

Now this point we have to chroot into /mnt

run this commands :

mkinitcpio -p linux
bootctl --path=/esp install # install boot loader
echo -e "# Load vfat at boot\nvfat\n" > /etc/modules-load.d/vfat.conf   # Load vfat module at boot

Create a file /esp/loader/entries/arch.conf contain the folowing:

title   Arch Linux
linux   /EFI/arch/vmlinuz-linux
#initrd  /EFI/arch/intel-ucode.img
initrd  /EFI/arch/initramfs-linux.img
options root=/dev/sda3 rw

initrd /EFI/arch/intel-ucode.img line should be uncommented if you using intel cpu you also have to install pacman -Sy intel-ucode for intel cpu, root= should contain the system root partition.

the config file looking files under /EFI/arch/ so we create the directory and copy every file from /boot then delete /boot/* since we will bind mount /EFI/arch/ to /boot when the system will boot up.

mkdir -p /esp/EFI/arch
cp /boot/* /esp/EFI/arch/
rm /boot/*

If every else is done you like to config in chroot, you could try to boot up the new system.

  • 1
    Actually, the BIOS boot partition is irrelevant in this case and neither should it be formatted. – Daniel B Jul 6 '17 at 11:33

If your EFI System Partition isn’t formatted as FAT32, then that’s the problem. While theoretically UEFI may support any file system, the only fs it has to support is FAT32. (Maybe some CD/DVD fs too.)

The ESP must be FAT32.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.