efibootmgr: add option to set device where EFI-patition is at

useful when it's not /dev/sda

Closes: #5781 [via git-merge-pr]
This commit is contained in:
David Flatz 2017-02-20 14:45:47 +01:00 committed by Jürgen Buchmüller
parent a65416a49b
commit 3f65029734
3 changed files with 9 additions and 2 deletions

View file

@ -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"

View file

@ -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

View file

@ -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"