From 3f6502973452748b63b8d6935597089673ae24ed Mon Sep 17 00:00:00 2001 From: David Flatz Date: Mon, 20 Feb 2017 14:45:47 +0100 Subject: [PATCH] efibootmgr: add option to set device where EFI-patition is at useful when it's not /dev/sda Closes: #5781 [via git-merge-pr] --- srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd | 2 ++ srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install | 7 ++++++- srcpkgs/efibootmgr/template | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd b/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd index dc8b87722df..87c0eef92c6 100644 --- a/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd +++ b/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd @@ -4,3 +4,5 @@ MODIFY_EFI_ENTRIES=0 # MODIFY_EFI_ENTRIES=1 # Kernel command-line options. Example: # OPTIONS="root=/dev/sda3" +# Disk where EFI Partition is. Default is /dev/sda +# DISK="/dev/sda" diff --git a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install index 94dca2f80ae..c3251e0a59a 100644 --- a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install +++ b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install @@ -14,6 +14,11 @@ fi OPTIONS="${OPTIONS} initrd=/initramfs-${VERSION}.img" +args="" +if ["x${DISK}" != x]; then + args="-d $DISK" +fi + # get major version, e.g. "4.8" for "linux4.8" major_version=$(echo $PKGNAME | cut -c 6-) @@ -31,7 +36,7 @@ if [ "$existing_entry" != "" ]; then fi # create the new entry -efibootmgr -qc -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}" +efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}" # restore the boot order efibootmgr -qo $bootorder diff --git a/srcpkgs/efibootmgr/template b/srcpkgs/efibootmgr/template index 843045b994d..5d40e8cfad6 100644 --- a/srcpkgs/efibootmgr/template +++ b/srcpkgs/efibootmgr/template @@ -1,7 +1,7 @@ # Template file for 'efibootmgr' pkgname=efibootmgr version=14 -revision=1 +revision=2 hostmakedepends="pkg-config" makedepends="libefivar-devel zlib-devel pciutils-devel" short_desc="Tool to modify UEFI Firmware Boot Manager Variables"