Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. #/etc/initramfs/post-update.d/update-efi-loader
  2. #!/bin/sh
  3.  
  4. cat /etc/kernel-cmdline > /tmp/cmdline
  5.  
  6. objcopy \
  7.   --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
  8.   --add-section .cmdline=/tmp/cmdline --change-section-vma .cmdline=0x30000 \
  9.   --add-section .linux=/boot/vmlinuz-$(uname -r) --change-section-vma .linux=0x2000000 \
  10.   --add-section .initrd=/boot/initrd.img-$(uname -r) --change-section-vma .initrd=0x3000000 \
  11. /usr/lib/systemd/boot/efi/linuxx64.efi.stub /tmp/ubuntu.efi
  12.  
  13. cp /tmp/ubuntu.efi /boot/efi/EFI/BOOT/BOOTX64.EFI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement