* [PR PATCH] efibootmgr: add LOADER_PATH to the kernel hook
@ 2022-09-10 17:30 08A
2022-09-10 17:32 ` [PR PATCH] [Updated] " 08A
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: 08A @ 2022-09-10 17:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]
There is a new pull request by 08A against master on the void-packages repository
https://github.com/08A/void-packages efibootmgr-add-loader-path
https://github.com/void-linux/void-packages/pull/39214
efibootmgr: add LOADER_PATH to the kernel hook
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
# Description
## efibootmgr: fix when no bootorder is configured
When no bootorder is configured, the script fail because `$bootorder` is empty.
## efibootmgr: add LOADER_PATH to the kernel hook
I use the dracut-uefi hook. It creates an EFI binary to a custom location. Because voidlinux keep olds kernels, I need to update with `efibootmgr` every time. This commit provides a new variable to configure the location of the loader.
PS: In theory, it is the last step for a secure boot ready voidlinux.
A patch file from https://github.com/void-linux/void-packages/pull/39214.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-efibootmgr-add-loader-path-39214.patch --]
[-- Type: text/x-diff, Size: 3922 bytes --]
From f000d20539a80b484f27b8903b223cfb43cf8914 Mon Sep 17 00:00:00 2001
From: Alexis Ehret <git@08a.re>
Date: Sat, 10 Sep 2022 19:15:52 +0200
Subject: [PATCH 1/2] zfs: fix when no bootorder is configured
---
srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install | 4 +++-
srcpkgs/efibootmgr/template | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
index adf523e7b1fa..8ee051fed3fb 100644
--- a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
+++ b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
@@ -42,4 +42,6 @@ fi
efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}"
# restore the boot order
-efibootmgr -qo $bootorder
+if [ -n "$bootorder" ]; then
+ efibootmgr -qo $bootorder
+fi
diff --git a/srcpkgs/efibootmgr/template b/srcpkgs/efibootmgr/template
index 2f636914a566..8db1f68fd3f6 100644
--- a/srcpkgs/efibootmgr/template
+++ b/srcpkgs/efibootmgr/template
@@ -1,7 +1,7 @@
# Template file for 'efibootmgr'
pkgname=efibootmgr
version=18
-revision=1
+revision=2
hostmakedepends="pkg-config"
makedepends="libefivar-devel popt-devel"
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
From bbc23081a99a36217301e77cdffca16227a08b24 Mon Sep 17 00:00:00 2001
From: Alexis Ehret <git@08a.re>
Date: Sat, 10 Sep 2022 19:17:28 +0200
Subject: [PATCH 2/2] efibootmgr: Add LOADER_PATH to the kernel hook
---
srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd | 2 ++
.../efibootmgr/files/kernel.d/efibootmgr.post-install | 9 ++++++---
srcpkgs/efibootmgr/template | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd b/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd
index 42adfc0da400..25f0f99fdba9 100644
--- a/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd
+++ b/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd
@@ -2,6 +2,8 @@
MODIFY_EFI_ENTRIES=0
# To allow efibootmgr to modify boot entries, set
# MODIFY_EFI_ENTRIES=1
+# To choose an alternative loader path, set
+# LOADER_PATH=/efi/EFI/void/linux-${VERSION}.efi
# Kernel command-line options. Example:
# OPTIONS="root=/dev/sda3 loglevel=4"
# Disk where EFI Partition is. Default is /dev/sda
diff --git a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
index 8ee051fed3fb..ace3af262258 100644
--- a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
+++ b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
@@ -12,8 +12,6 @@ if [ "x${MODIFY_EFI_ENTRIES}" != x1 ]; then
exit 0
fi
-OPTIONS="${OPTIONS} initrd=/initramfs-${VERSION}.img"
-
args=""
if [ "x${DISK}" != x ]; then
args="-d $DISK"
@@ -39,7 +37,12 @@ if [ "$existing_entry" != "" ]; then
fi
# create the new entry
-efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}"
+if [ -z "${LOADER_PATH}" ]; then
+ OPTIONS="${OPTIONS} initrd=/initramfs-${VERSION}.img"
+ efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}"
+else
+ efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l "${LOADER_PATH}"
+fi
# restore the boot order
if [ -n "$bootorder" ]; then
diff --git a/srcpkgs/efibootmgr/template b/srcpkgs/efibootmgr/template
index 8db1f68fd3f6..35ca33ef9897 100644
--- a/srcpkgs/efibootmgr/template
+++ b/srcpkgs/efibootmgr/template
@@ -1,7 +1,7 @@
# Template file for 'efibootmgr'
pkgname=efibootmgr
version=18
-revision=2
+revision=3
hostmakedepends="pkg-config"
makedepends="libefivar-devel popt-devel"
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Updated] efibootmgr: add LOADER_PATH to the kernel hook
2022-09-10 17:30 [PR PATCH] efibootmgr: add LOADER_PATH to the kernel hook 08A
@ 2022-09-10 17:32 ` 08A
2022-12-10 1:58 ` github-actions
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: 08A @ 2022-09-10 17:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]
There is an updated pull request by 08A against master on the void-packages repository
https://github.com/08A/void-packages efibootmgr-add-loader-path
https://github.com/void-linux/void-packages/pull/39214
efibootmgr: add LOADER_PATH to the kernel hook
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
# Description
## efibootmgr: fix when no bootorder is configured
When no bootorder is configured, the script fail because `$bootorder` is empty.
## efibootmgr: add LOADER_PATH to the kernel hook
I use the dracut-uefi hook. It creates an EFI binary to a custom location. Because voidlinux keep olds kernels, I need to update with `efibootmgr` every time. This commit provides a new variable to configure the location of the loader.
PS: In theory, it is the last step for a secure boot ready voidlinux.
A patch file from https://github.com/void-linux/void-packages/pull/39214.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-efibootmgr-add-loader-path-39214.patch --]
[-- Type: text/x-diff, Size: 3929 bytes --]
From f759dab4a32b54fa1db52f0a2c911b1c6cbcf8af Mon Sep 17 00:00:00 2001
From: Alexis Ehret <git@08a.re>
Date: Sat, 10 Sep 2022 19:15:52 +0200
Subject: [PATCH 1/2] efibootmgr: fix when no bootorder is configured
---
srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install | 4 +++-
srcpkgs/efibootmgr/template | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
index adf523e7b1fa..8ee051fed3fb 100644
--- a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
+++ b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
@@ -42,4 +42,6 @@ fi
efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}"
# restore the boot order
-efibootmgr -qo $bootorder
+if [ -n "$bootorder" ]; then
+ efibootmgr -qo $bootorder
+fi
diff --git a/srcpkgs/efibootmgr/template b/srcpkgs/efibootmgr/template
index 2f636914a566..8db1f68fd3f6 100644
--- a/srcpkgs/efibootmgr/template
+++ b/srcpkgs/efibootmgr/template
@@ -1,7 +1,7 @@
# Template file for 'efibootmgr'
pkgname=efibootmgr
version=18
-revision=1
+revision=2
hostmakedepends="pkg-config"
makedepends="libefivar-devel popt-devel"
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
From 3800ed69612755df99141fa475c735ec25542d4a Mon Sep 17 00:00:00 2001
From: Alexis Ehret <git@08a.re>
Date: Sat, 10 Sep 2022 19:17:28 +0200
Subject: [PATCH 2/2] efibootmgr: add LOADER_PATH to the kernel hook
---
srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd | 2 ++
.../efibootmgr/files/kernel.d/efibootmgr.post-install | 9 ++++++---
srcpkgs/efibootmgr/template | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd b/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd
index 42adfc0da400..25f0f99fdba9 100644
--- a/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd
+++ b/srcpkgs/efibootmgr/files/efibootmgr-kernel-hook.confd
@@ -2,6 +2,8 @@
MODIFY_EFI_ENTRIES=0
# To allow efibootmgr to modify boot entries, set
# MODIFY_EFI_ENTRIES=1
+# To choose an alternative loader path, set
+# LOADER_PATH=/efi/EFI/void/linux-${VERSION}.efi
# Kernel command-line options. Example:
# OPTIONS="root=/dev/sda3 loglevel=4"
# Disk where EFI Partition is. Default is /dev/sda
diff --git a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
index 8ee051fed3fb..ace3af262258 100644
--- a/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
+++ b/srcpkgs/efibootmgr/files/kernel.d/efibootmgr.post-install
@@ -12,8 +12,6 @@ if [ "x${MODIFY_EFI_ENTRIES}" != x1 ]; then
exit 0
fi
-OPTIONS="${OPTIONS} initrd=/initramfs-${VERSION}.img"
-
args=""
if [ "x${DISK}" != x ]; then
args="-d $DISK"
@@ -39,7 +37,12 @@ if [ "$existing_entry" != "" ]; then
fi
# create the new entry
-efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}"
+if [ -z "${LOADER_PATH}" ]; then
+ OPTIONS="${OPTIONS} initrd=/initramfs-${VERSION}.img"
+ efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l /vmlinuz-${VERSION} -u "${OPTIONS}"
+else
+ efibootmgr -qc $args -L "Void Linux with kernel ${major_version}" -l "${LOADER_PATH}"
+fi
# restore the boot order
if [ -n "$bootorder" ]; then
diff --git a/srcpkgs/efibootmgr/template b/srcpkgs/efibootmgr/template
index 8db1f68fd3f6..35ca33ef9897 100644
--- a/srcpkgs/efibootmgr/template
+++ b/srcpkgs/efibootmgr/template
@@ -1,7 +1,7 @@
# Template file for 'efibootmgr'
pkgname=efibootmgr
version=18
-revision=2
+revision=3
hostmakedepends="pkg-config"
makedepends="libefivar-devel popt-devel"
short_desc="Tool to modify UEFI Firmware Boot Manager Variables"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: efibootmgr: add LOADER_PATH to the kernel hook
2022-09-10 17:30 [PR PATCH] efibootmgr: add LOADER_PATH to the kernel hook 08A
2022-09-10 17:32 ` [PR PATCH] [Updated] " 08A
@ 2022-12-10 1:58 ` github-actions
2022-12-25 1:58 ` [PR PATCH] [Closed]: " github-actions
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: github-actions @ 2022-12-10 1:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/39214#issuecomment-1344975514
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Closed]: efibootmgr: add LOADER_PATH to the kernel hook
2022-09-10 17:30 [PR PATCH] efibootmgr: add LOADER_PATH to the kernel hook 08A
2022-09-10 17:32 ` [PR PATCH] [Updated] " 08A
2022-12-10 1:58 ` github-actions
@ 2022-12-25 1:58 ` github-actions
2023-11-26 13:47 ` Barbaross93
2023-12-01 12:31 ` 08A
4 siblings, 0 replies; 6+ messages in thread
From: github-actions @ 2022-12-25 1:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
There's a closed pull request on the void-packages repository
efibootmgr: add LOADER_PATH to the kernel hook
https://github.com/void-linux/void-packages/pull/39214
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
# Description
## efibootmgr: fix when no bootorder is configured
When no bootorder is configured, the script fail because `$bootorder` is empty.
## efibootmgr: add LOADER_PATH to the kernel hook
I use the dracut-uefi hook. It creates an EFI binary to a custom location. Because voidlinux keep olds kernels, I need to update with `efibootmgr` every time. This commit provides a new variable to configure the location of the loader.
PS: In theory, it is the last step for a secure boot ready voidlinux.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: efibootmgr: add LOADER_PATH to the kernel hook
2022-09-10 17:30 [PR PATCH] efibootmgr: add LOADER_PATH to the kernel hook 08A
` (2 preceding siblings ...)
2022-12-25 1:58 ` [PR PATCH] [Closed]: " github-actions
@ 2023-11-26 13:47 ` Barbaross93
2023-12-01 12:31 ` 08A
4 siblings, 0 replies; 6+ messages in thread
From: Barbaross93 @ 2023-11-26 13:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
New comment by Barbaross93 on void-packages repository
https://github.com/void-linux/void-packages/pull/39214#issuecomment-1826789273
Comment:
It is unfortunate this became stale. This PR fixes my exact issue. Did you end up finding an alternative solution @08A ? AFAIK, `refind` can scan for efi binaries, but I find it extremely cumbersome compared to just using `efibootmgr` directly.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: efibootmgr: add LOADER_PATH to the kernel hook
2022-09-10 17:30 [PR PATCH] efibootmgr: add LOADER_PATH to the kernel hook 08A
` (3 preceding siblings ...)
2023-11-26 13:47 ` Barbaross93
@ 2023-12-01 12:31 ` 08A
4 siblings, 0 replies; 6+ messages in thread
From: 08A @ 2023-12-01 12:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
New comment by 08A on void-packages repository
https://github.com/void-linux/void-packages/pull/39214#issuecomment-1836043338
Comment:
> It is unfortunate this became stale. This PR fixes my exact issue. Did you end up finding an alternative solution @08A ? AFAIK, `refind` can scan for efi binaries, but I find it extremely cumbersome compared to just using `efibootmgr` directly.
I switched to `refind`. It is indeed not perfect but it was working.
PS: I am not using void anymore.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-01 12:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-10 17:30 [PR PATCH] efibootmgr: add LOADER_PATH to the kernel hook 08A
2022-09-10 17:32 ` [PR PATCH] [Updated] " 08A
2022-12-10 1:58 ` github-actions
2022-12-25 1:58 ` [PR PATCH] [Closed]: " github-actions
2023-11-26 13:47 ` Barbaross93
2023-12-01 12:31 ` 08A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).