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:
parent
a65416a49b
commit
3f65029734
3 changed files with 9 additions and 2 deletions
|
@ -4,3 +4,5 @@ MODIFY_EFI_ENTRIES=0
|
||||||
# MODIFY_EFI_ENTRIES=1
|
# MODIFY_EFI_ENTRIES=1
|
||||||
# Kernel command-line options. Example:
|
# Kernel command-line options. Example:
|
||||||
# OPTIONS="root=/dev/sda3"
|
# OPTIONS="root=/dev/sda3"
|
||||||
|
# Disk where EFI Partition is. Default is /dev/sda
|
||||||
|
# DISK="/dev/sda"
|
||||||
|
|
|
@ -14,6 +14,11 @@ fi
|
||||||
|
|
||||||
OPTIONS="${OPTIONS} initrd=/initramfs-${VERSION}.img"
|
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"
|
# get major version, e.g. "4.8" for "linux4.8"
|
||||||
major_version=$(echo $PKGNAME | cut -c 6-)
|
major_version=$(echo $PKGNAME | cut -c 6-)
|
||||||
|
|
||||||
|
@ -31,7 +36,7 @@ if [ "$existing_entry" != "" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create the new entry
|
# 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
|
# restore the boot order
|
||||||
efibootmgr -qo $bootorder
|
efibootmgr -qo $bootorder
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'efibootmgr'
|
# Template file for 'efibootmgr'
|
||||||
pkgname=efibootmgr
|
pkgname=efibootmgr
|
||||||
version=14
|
version=14
|
||||||
revision=1
|
revision=2
|
||||||
hostmakedepends="pkg-config"
|
hostmakedepends="pkg-config"
|
||||||
makedepends="libefivar-devel zlib-devel pciutils-devel"
|
makedepends="libefivar-devel zlib-devel pciutils-devel"
|
||||||
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
|
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
|
||||||
|
|
Loading…
Add table
Reference in a new issue