Skip to content

Instantly share code, notes, and snippets.

@angelsl
Created November 8, 2017 13:36
Show Gist options
  • Save angelsl/31323f4eaaa15459004a2a238390e5b9 to your computer and use it in GitHub Desktop.
Save angelsl/31323f4eaaa15459004a2a238390e5b9 to your computer and use it in GitHub Desktop.
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/vmlinuz-linux
Target = usr/lib/initcpio/*
[Action]
Description = Updating kernel EFI stub
When = PostTransaction
Exec = /root/updatekernelefi.sh
#!/usr/bin/bash
cat /boot/intel-ucode.img /boot/initramfs-linux.img > /root/initrd.img
objcopy --add-section .cmdline=/root/cmdline.txt --add-section .linux=/boot/vmlinuz-linux --add-section .initrd=/root/initrd.img --adjust-section-vma .cmdline=0x30000 --adjust-section-vma .initrd=0x40000 --adjust-section-vma .linux=0x3000000 /root/linuxx64.efi.stub /boot/efi/EFI/arch/arch.efi
#!/usr/bin/bash
sbsign --key /root/efikeys/DB.key --cert /root/efikeys/DB.crt --output /boot/efi/EFI/arch/arch.efi /boot/efi/EFI/arch/arch.efi
#!/usr/bin/bash
. /root/mkkernelefi.sh
. /root/signkernelefi.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment