summaryrefslogtreecommitdiff
path: root/configs/profile-openrc
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2019-03-08 22:03:11 -0300
committerDavid P <megver83@parabola.nu>2019-03-08 22:13:23 -0300
commita09ac8ebf2ecc46818f819a663981510571a2f27 (patch)
tree9600ed51f0b54f0df0b66d87639bb013281464f4 /configs/profile-openrc
parent4a658bb5d453d5601e92658c7b2f2a89d72bab8d (diff)
[openrc isos] use refind-efi as UEFI Boot Manager
The standard systemd ISOs use systemd-boot as its UEFI Boot Manager, however, we don't want that in an OpenRC ISO. rEFInd is the perfect replacement for this, the (not-yet launched) resulting ISOs boot in the basic text of this boot manager. Tested with QEMU using Tianocore's OVMF (without Secure Boot). Note that the refind.conf file includes files under entry/, which is not sctrictly necessary since it can be merged everything into that file, however, I preferred to maintain the systemd-boot filenames (although in the future this might change) Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'configs/profile-openrc')
-rwxr-xr-xconfigs/profile-openrc/build.sh30
-rw-r--r--configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-cd.conf6
-rw-r--r--configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-usb.conf6
-rw-r--r--configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v1-x86_64.conf3
-rw-r--r--configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v2-x86_64.conf3
-rw-r--r--configs/profile-openrc/efiboot/EFI/boot/refind.conf9
-rw-r--r--configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-cd.conf4
-rw-r--r--configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-usb.conf4
-rw-r--r--configs/profile-openrc/efiboot/loader/entries/uefi-shell-v1-x86_64.conf2
-rw-r--r--configs/profile-openrc/efiboot/loader/entries/uefi-shell-v2-x86_64.conf2
-rw-r--r--configs/profile-openrc/efiboot/loader/loader.conf2
11 files changed, 46 insertions, 25 deletions
diff --git a/configs/profile-openrc/build.sh b/configs/profile-openrc/build.sh
index c0a735b..f183569 100755
--- a/configs/profile-openrc/build.sh
+++ b/configs/profile-openrc/build.sh
@@ -84,7 +84,7 @@ make_packages() {
# Needed packages for x86_64 EFI boot
make_packages_efi() {
- setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "efitools" install
+ setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "efitools refind-efi" install
}
# Copy mkinitcpio parabolaiso hooks and build initramfs (airootfs)
@@ -169,14 +169,18 @@ make_efi() {
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/iso/EFI/boot/bootx64.efi
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/iso/EFI/boot/
- mkdir -p ${work_dir}/iso/loader/entries
- cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/
- cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/loader/entries/
- cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/loader/entries/
+ cp ${work_dir}/x86_64/airootfs/usr/share/refind/refind_x64.efi ${work_dir}/iso/EFI/boot/loader.efi
+ mkdir -p ${work_dir}/iso/EFI/boot/drivers_x64/
+ cp ${work_dir}/x86_64/airootfs/usr/share/refind/drivers_x64/*.efi ${work_dir}/iso/EFI/boot/drivers_x64/
+
+ mkdir -p ${work_dir}/iso/EFI/boot/entries
+ cp ${script_path}/efiboot/EFI/boot/refind.conf ${work_dir}/iso/EFI/boot/
+ cp ${script_path}/efiboot/EFI/boot/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/EFI/boot/entries/
+ cp ${script_path}/efiboot/EFI/boot/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/EFI/boot/entries/
sed "s|%PARABOLAISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g" \
- ${script_path}/efiboot/loader/entries/parabolaiso-x86_64-usb.conf > ${work_dir}/iso/loader/entries/parabolaiso-x86_64.conf
+ ${script_path}/efiboot/EFI/boot/entries/parabolaiso-x86_64-usb.conf > ${work_dir}/iso/EFI/boot/entries/parabolaiso-x86_64.conf
# EFI Shell 2.0 for UEFI 2.3+
curl -o ${work_dir}/iso/EFI/shellx64_v2.efi https://raw.githubusercontent.com/tianocore/edk2/edk2-stable201811/ShellBinPkg/UefiShell/X64/Shell.efi
@@ -208,14 +212,18 @@ make_efiboot() {
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/efiboot/EFI/boot/
- mkdir -p ${work_dir}/efiboot/loader/entries
- cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/
- cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/loader/entries/
- cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/loader/entries/
+ cp ${work_dir}/x86_64/airootfs/usr/share/refind/refind_x64.efi ${work_dir}/efiboot/EFI/boot/loader.efi
+ mkdir -p ${work_dir}/efiboot/EFI/boot/drivers_x64/
+ cp ${work_dir}/x86_64/airootfs/usr/share/refind/drivers_x64/*.efi ${work_dir}/efiboot/EFI/boot/drivers_x64/
+
+ mkdir -p ${work_dir}/efiboot/EFI/boot/entries
+ cp ${script_path}/efiboot/EFI/boot/refind.conf ${work_dir}/efiboot/EFI/boot/
+ cp ${script_path}/efiboot/EFI/boot/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/EFI/boot/entries/
+ cp ${script_path}/efiboot/EFI/boot/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/EFI/boot/entries/
sed "s|%PARABOLAISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g" \
- ${script_path}/efiboot/loader/entries/parabolaiso-x86_64-cd.conf > ${work_dir}/efiboot/loader/entries/parabolaiso-x86_64.conf
+ ${script_path}/efiboot/EFI/boot/entries/parabolaiso-x86_64-cd.conf > ${work_dir}/efiboot/EFI/boot/entries/parabolaiso-x86_64.conf
cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/
cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
diff --git a/configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-cd.conf b/configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-cd.conf
new file mode 100644
index 0000000..912a8a7
--- /dev/null
+++ b/configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-cd.conf
@@ -0,0 +1,6 @@
+menuentry "Parabola GNU/Linux-libre parabolaiso x86_64 UEFI CD" {
+ volume %PARABOLAISO_LABEL%
+ loader /EFI/parabolaiso/vmlinuz.efi
+ initrd /EFI/parabolaiso/parabolaiso.img
+ options "parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%"
+}
diff --git a/configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-usb.conf b/configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-usb.conf
new file mode 100644
index 0000000..45d8e70
--- /dev/null
+++ b/configs/profile-openrc/efiboot/EFI/boot/entries/parabolaiso-x86_64-usb.conf
@@ -0,0 +1,6 @@
+menuentry "Parabola GNU/Linux-libre parabolaiso x86_64 UEFI USB" {
+ volume %PARABOLAISO_LABEL%
+ loader /%INSTALL_DIR%/parabolaiso/vmlinuz.efi
+ initrd /%INSTALL_DIR%/parabolaiso/parabolaiso.img
+ options "parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%"
+}
diff --git a/configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v1-x86_64.conf b/configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v1-x86_64.conf
new file mode 100644
index 0000000..c36229f
--- /dev/null
+++ b/configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v1-x86_64.conf
@@ -0,0 +1,3 @@
+menuentry "UEFI Shell x86_64 v1" {
+ loader /EFI/shellx64_v1.efi
+}
diff --git a/configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v2-x86_64.conf b/configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v2-x86_64.conf
new file mode 100644
index 0000000..a83bd8b
--- /dev/null
+++ b/configs/profile-openrc/efiboot/EFI/boot/entries/uefi-shell-v2-x86_64.conf
@@ -0,0 +1,3 @@
+menuentry "UEFI Shell x86_64 v2" {
+ loader /EFI/shellx64_v2.efi
+}
diff --git a/configs/profile-openrc/efiboot/EFI/boot/refind.conf b/configs/profile-openrc/efiboot/EFI/boot/refind.conf
new file mode 100644
index 0000000..a99734b
--- /dev/null
+++ b/configs/profile-openrc/efiboot/EFI/boot/refind.conf
@@ -0,0 +1,9 @@
+timeout 3
+textonly
+dont_scan_dirs /EFI/parabolaiso
+
+include entries/parabolaiso-x86_64.conf
+include entries/uefi-shell-v1-x86_64.conf
+include entries/uefi-shell-v2-x86_64.conf
+
+default_selection "Parabola GNU/Linux-libre"
diff --git a/configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-cd.conf b/configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-cd.conf
deleted file mode 100644
index 057e14f..0000000
--- a/configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-cd.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-title Parabola GNU/Linux-libre parabolaiso x86_64 UEFI CD
-linux /EFI/parabolaiso/vmlinuz.efi
-initrd /EFI/parabolaiso/parabolaiso.img
-options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%
diff --git a/configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-usb.conf b/configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-usb.conf
deleted file mode 100644
index 3863799..0000000
--- a/configs/profile-openrc/efiboot/loader/entries/parabolaiso-x86_64-usb.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-title Parabola GNU/Linux-libre parabolaiso x86_64 UEFI USB
-linux /%INSTALL_DIR%/boot/x86_64/vmlinuz
-initrd /%INSTALL_DIR%/boot/x86_64/parabolaiso.img
-options parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%
diff --git a/configs/profile-openrc/efiboot/loader/entries/uefi-shell-v1-x86_64.conf b/configs/profile-openrc/efiboot/loader/entries/uefi-shell-v1-x86_64.conf
deleted file mode 100644
index 9597ff2..0000000
--- a/configs/profile-openrc/efiboot/loader/entries/uefi-shell-v1-x86_64.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-title UEFI Shell x86_64 v1
-efi /EFI/shellx64_v1.efi
diff --git a/configs/profile-openrc/efiboot/loader/entries/uefi-shell-v2-x86_64.conf b/configs/profile-openrc/efiboot/loader/entries/uefi-shell-v2-x86_64.conf
deleted file mode 100644
index 0dde77a..0000000
--- a/configs/profile-openrc/efiboot/loader/entries/uefi-shell-v2-x86_64.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-title UEFI Shell x86_64 v2
-efi /EFI/shellx64_v2.efi
diff --git a/configs/profile-openrc/efiboot/loader/loader.conf b/configs/profile-openrc/efiboot/loader/loader.conf
deleted file mode 100644
index ba02c50..0000000
--- a/configs/profile-openrc/efiboot/loader/loader.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-timeout 3
-default parabolaiso-x86_64