You are not logged in.

#1 2013-01-21 15:45:46

iamjerico
Member
Registered: 2012-12-10
Posts: 20

[SOLVED] Sync EFISTUB Kernel in UEFISYS partition using Systemd

Hello all,

I followed the instructions in the wiki to sync EFISTUB kernel with systemd (I boot Arch along with Win8 using rEFInd).  The process appears to be running, but when I update my kernel (for example, this morning to 3.7.3-1 via pacman -Syu) the copy doesn't seem to succeed.  On my next reboot, the previous kernel tries to load, so I need to boot into a live distribution and copy the new files manually into /boot/efi/EFI/arch.  This has happened on the last couple kernel updates.

Here is my /etc/systemd/system/efistub-update.path:

justin@zen [ ~ ] # cat /etc/systemd/system/efistub-update.path
[Unit]
Description=Copy EFISTUB Kernel to UEFISYS Partition

[Path]
PathChanged=/boot/vmlinuz-linux
PathChanged=/boot/initramfs-linux.img
PathChanged=/boot/initramfs-linux-fallback.img

[Install]
WantedBy=multi-user.target

And here is my /etc/systemd/system/efistub-update.service:

justin@zen [ ~ ] # cat /etc/systemd/system/efistub-update.service
[Unit]
Description=Copy EFISTUB Kernel to UEFISYS Partition

[Service]
Type=oneshot
ExecStart=/bin/cp -f /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi
ExecStart=/bin/cp -f /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img
ExecStart=/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img

efistub-update.path looks like it is running:

justin@zen [ ~ ] # sudo systemctl status efistub-update.path
efistub-update.path - Copy EFISTUB Kernel to UEFISYS Partition
	  Loaded: loaded (/etc/systemd/system/efistub-update.path; enabled)
	  Active: active (waiting) since Mon 2013-01-21 04:02:49 EST; 6h ago

And here is the efistub-update.service itself, which shows some activity on Jan 5th and again today at 719am (when I updated my system), and is now "inactive (dead)":

justin@zen [ ~ ] # sudo systemctl status efistub-update.service
efistub-update.service - Copy EFISTUB Kernel to UEFISYS Partition
	  Loaded: loaded (/etc/systemd/system/efistub-update.service; static)
	  Active: inactive (dead)

Jan 05 10:19:18 zen systemd[1]: Starting Copy EFISTUB Kernel to UEFISYS Partition...
Jan 05 10:19:18 zen systemd[1]: Started Copy EFISTUB Kernel to UEFISYS Partition.
Jan 21 07:19:25 zen systemd[1]: Started Copy EFISTUB Kernel to UEFISYS Partition.
Jan 21 07:19:30 zen systemd[1]: Starting Copy EFISTUB Kernel to UEFISYS Partition...
Jan 21 07:19:30 zen systemd[1]: Started Copy EFISTUB Kernel to UEFISYS Partition.
Jan 21 07:19:36 zen systemd[1]: Starting Copy EFISTUB Kernel to UEFISYS Partition...
Jan 21 07:19:36 zen systemd[1]: Started Copy EFISTUB Kernel to UEFISYS Partition.
Jan 21 07:43:01 zen systemd[1]: Started Copy EFISTUB Kernel to UEFISYS Partition.

I'm not quite sure what I've done incorrectly here.  Any advice?

Thanks in advance!

Justin

Last edited by iamjerico (2013-01-23 00:11:02)

Offline

#2 2013-01-22 03:24:51

smudge
Member
Registered: 2011-03-20
Posts: 133

Re: [SOLVED] Sync EFISTUB Kernel in UEFISYS partition using Systemd

Are you mounting your UEFISYS partition before updating the kernel? If you try to mount it after updating, the newer vfat module (assuming you're using vfat) will be incompatible with the older running kernel.

Offline

#3 2013-01-22 11:08:37

89c51
Member
Registered: 2012-06-05
Posts: 639

Re: [SOLVED] Sync EFISTUB Kernel in UEFISYS partition using Systemd

my efistub_copy.path looks like :

[Unit]
Description=Copy EFISTUB Kernel and Initramfs to UEFISYS Partition

[Path]
PathChanged=/boot/initramfs-linux-fallback.img
Unit=efistub_copy.service

[Install]
WantedBy=multi-user.target

and it works flawlessly all the time. Your file doesn't seem to have the Unit=..... in the [Path] section. I don't know if its needed. The wiki changed since i created my files. Adapt it to your naming scheme.

Offline

#4 2013-01-22 22:13:54

iamjerico
Member
Registered: 2012-12-10
Posts: 20

Re: [SOLVED] Sync EFISTUB Kernel in UEFISYS partition using Systemd

Thanks for the replies.

Smudge - I wasn't manually mounting my UEFISYS partition at all, which made me realize I have no entry for it in at all in my fstab.  Perhaps that is my issue?

Offline

#5 2013-01-22 22:50:21

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] Sync EFISTUB Kernel in UEFISYS partition using Systemd

If you are not mounting it, then where is it you expect the copy to go?  The path does not exist.

Offline

#6 2013-01-23 00:10:01

iamjerico
Member
Registered: 2012-12-10
Posts: 20

Re: [SOLVED] Sync EFISTUB Kernel in UEFISYS partition using Systemd

Fair enough, WonderWoofy. As I said, I didn't realize it wasn't mounted (vis fstab, as I wasn't doing it manually).  I added an entry to fstab now - hopefully that sorts the issue out.

Thanks everyone.

Edit: just updated to 3.7.4-1 and the kernel sync worked perfectly.

Last edited by iamjerico (2013-01-23 13:47:25)

Offline

Board footer

Powered by FluxBB