Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2024-03-24 18:22:46 +0200
committernl6720 <nl6720@gmail.com>2024-03-24 18:31:28 +0200
commit84843f5c2751012990fd273f757d8bcc260e2c8e (patch)
treef86e12f395fa5fc312493a8878c7b9f433bc6412
parent7dd615ea8301b6554450b0589a7fc3895076839b (diff)
mkarchiso: move /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid to /boot/YYYY-mm-dd-HH-MM-SS-00.uuid
Once mkinitcpio-archiso implements searching for the file in early userspace, this file's use will not be limited to just GRUB. Related to https://gitlab.archlinux.org/archlinux/archiso/-/issues/217
-rw-r--r--CHANGELOG.rst4
-rwxr-xr-xarchiso/mkarchiso24
2 files changed, 14 insertions, 14 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 493a990..c316aed 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -13,6 +13,10 @@ Added
Changed
-------
+- Move ``/boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid`` to ``/boot/YYYY-mm-dd-HH-MM-SS-00.uuid`` and always create the file.
+ Once mkinitcpio-archiso implements searching for the file in early userspace, this file's use will not be limited to
+ just GRUB.
+
Deprecated
----------
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index a156687..80d4a79 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -34,6 +34,7 @@ pacman_conf=""
packages=""
bootstrap_packages=""
pacstrap_dir=""
+search_filename=""
declare -i rm_work_dir=0
buildmodes=()
bootmodes=()
@@ -439,6 +440,7 @@ _make_boot_on_iso9660() {
fi
fi
done
+
_msg_info "Done!"
}
@@ -562,16 +564,10 @@ _make_common_bootmode_grub_copy_to_isofs() {
# Prepare GRUB configuration files
_make_common_bootmode_grub_cfg() {
- local _cfg search_filename
+ local _cfg
install -d -- "${work_dir}/grub"
- # Create a /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid file on ISO 9660. GRUB will search for it to find the ISO
- # volume. This is similar to what grub-mkrescue does, except it places the file in /.disk/, but we opt to use a
- # directory that does not start with a dot to avoid it being accidentally missed when copying the ISO's contents.
- : >"${work_dir}/grub/${iso_uuid}.uuid"
- search_filename="/boot/grub/${iso_uuid}.uuid"
-
# Fill GRUB configuration files
for _cfg in "${profile}/grub/"*'.cfg'; do
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
@@ -639,15 +635,8 @@ EOF
# Create GRUB specific configuration files when GRUB is not used as a boot loader
_make_common_grubenv_and_loopbackcfg() {
- local search_filename
install -d -m 0755 -- "${isofs_dir}/boot/grub"
- # Create a /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid file on ISO 9660. GRUB will search for it to find the ISO
- # volume. This is similar to what grub-mkrescue does, except it places the file in /.disk/, but we opt to use a
- # directory that does not start with a dot to avoid it being accidentally missed when copying the ISO's contents.
- search_filename="/boot/grub/${iso_uuid}.uuid"
- : >"${isofs_dir}/${search_filename}"
-
# Write grubenv
printf '%.1024s' \
"$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\nARCHISO_LABEL=%s\nINSTALL_DIR=%s\nARCH=%s\nARCHISO_SEARCH_FILENAME=%s\n%s' \
@@ -1850,6 +1839,13 @@ _make_version() {
printf '%.1024s' "$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\n%s' \
"${iso_name}" "${iso_version}" "$(printf '%0.1s' "#"{1..1024})")" \
>"${isofs_dir}/${install_dir}/grubenv"
+
+ # Create a /boot/YYYY-mm-dd-HH-MM-SS-00.uuid file on ISO 9660. GRUB will search for it to find the ISO
+ # volume. This is similar to what grub-mkrescue does, except it places the file in /.disk/, but we opt to use a
+ # directory that does not start with a dot to avoid it being accidentally missed when copying the ISO's contents.
+ search_filename="/boot/${iso_uuid}.uuid"
+ install -d -m 755 -- "${isofs_dir}/boot"
+ : >"${isofs_dir}${search_filename}"
fi
# Append IMAGE_ID & IMAGE_VERSION to os-release