I am using ArchLinux on a machine using systemd-boot and UEFI to boot the system. When I receive a new kernel update, the new kernel get's created in my /boot , but the UEFI-Boot Partition is mounted unter /boot/efi with the files I tell my system to load being in /boot/efi/EFI/arch/ .

Where can I configure a hook that copies the .img files and vmlinuz-linux from my /boot into my /boot/efi/EFI/arch/ whenever I update my kernel?


Since the question isn't answered and I came by the same problem/question, I write my own approach, maybe it helps future searchers:

Note that I use Kali and I couldn't confirm that it works, since my kernel is already upgraded(I will update this answer, after I can finally confirm it)

create a file in /etc/kernel/postinst.d for example zz_systemd_boot (the grub-file start with zz so I assumed that the files are executed alphabetical) with something similar to this:


echo Copy files for systemd-boot

cp /initrd.img /mnt/boot/kali/initrd.img
cp /vmlinuz /mnt/boot/kali/vmlinuz

and than make the file executeablechmod 755 zz_systemd_boot


using uefi over legacy does not change the location of the kernel images. I use uefi boot loader and my images are all in boot.

For comparison here is my boot partition;

$ find /boot/ -type d

the directory /boot/efi/EFI contains the uefi boot images;

$ find /boot/efi/EFI/ -type f

the directory "/boot/grub/x86_64-efi" contains all the uefi mod files

$ find /boot/grub/x86_64-efi -type f | head -10

and my linux images are all stored in "/boot/"

$ find /boot -maxdepth 1 -type f -iname "vmlin*" | head -10
  • 4
    The location does make a difference if you are using a simple boot manager like systemd-boot instead of Grub. – Johan Myréen Nov 21 '16 at 12:20
  • 1
    The Archwiki recommends simply mounting the UEFI Boot Partition to /boot upon system start, though since in /boot there are already files before configuring stuff, they will be hidden behind the mounted partition and things would propably get wierd. Therefore I mounted in /boot/efi but new images are (obviously) not copied to their relevant locations on their own. – salbeira Nov 21 '16 at 12:59
  • An alternative is to use a bind mount, as described under "Using bind mount" on Archwiki. It's not without drawbacks, but may work for you. – Johan Myréen Nov 21 '16 at 13:08
  • The main question would be: Can I delete everything in my /boot directory and just mount my /dev/sda1 to /boot , change a thing here and there in the boot config and be fine with it. I would need to call mkinitcpio once again and the new images would be created on the now mounted partition in /boot ; change the location the bootloader looks up the images and done – salbeira Nov 21 '16 at 15:16
  • Depends on what you have in there. I'm using systemd-boot with an efistub kernel and have mounted the ESP on /boot. I have a total of eight files in /boot, four of which are installed by pacman -S linux, two belong to systemd-boot, and two are configuration files: /boot/loader/loader.conf and /boot/loader/entries/arch.conf. – Johan Myréen Nov 21 '16 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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