Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso
AgeCommit message (Collapse)Author
2024-04-01mkarchiso: fix requirement validation logic for uefi-ia32.systemd-boot.eltoritonl6720
`uefi-ia32.systemd-boot.eltorito` has the same requirements as `uefi-ia32.systemd-boot.esp`, not the same as `uefi-x64.systemd-boot.esp`. Fixes: 5e72546e89024a9e8095c75be6ca86312f5c376a ("mkarchiso: add uefi-ia32.systemd-boot.esp and uefi-ia32.systemd-boot.eltorito boot modes")
2024-04-01mkarchiso: copy Memtest86+ for uefi-x64.systemd-boot.* boot modesnl6720
If the Memtest86+ EFI binary exists, copy it to the EFI system partition (`efiboot.img`) and also to ISO 9660. Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/228
2024-03-30mkarchiso: implement configurable bootstrap tarball compressionnl6720
profiledef.sh gains a new option `bootstrap_tarball_compression` which is a bash array containing the compression program and its arguments. Related to https://gitlab.archlinux.org/archlinux/archiso/-/issues/130.
2024-03-26mkarchiso: skip including external microcode images if the initramfs file ↵nl6720
contains early_cpio The early uncompressed CPIO archive containing microcode update files can be part of the initramfs file. To avoid wasting space, first check if the initramfs file contains `early_cpio` and only copy external microcode initramfs images if it does not.
2024-03-24mkarchiso: move /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid to ↵nl6720
/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
2024-02-20Revert "mkarchiso: unset LANGUAGE"nl6720
Starting with glibc 2.39, LC_ALL=C.UTF-8 overrides LANGUAGE, just like LC_ALL=C. See https://sourceware.org/bugzilla/show_bug.cgi?id=16621 for details. This reverts commit 6ac22309530f3aa07a2b638ccde419a3a509f50c.
2024-01-18mkarchiso: update memtest86+ license file locationnl6720
The licenses package does not ship `/usr/share/licenses/common/GPL2/license.txt` anymore, which results in: /usr/share/licenses/common/GPL2/license.txt': No such file or directory Use its replacement, `/usr/share/licenses/spdx/GPL-2.0-only.txt` instead. Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/225
2023-12-21mkarchiso: place prepared systemd-boot configuration in work directorynl6720
Keep the prepared `.conf` files in `work_dir` to avoid having to run them through `sed` twice. This makes sure the FAT image size calculation is more correct and also simplifies copying the files m to both ISO 9660 and the FAT image since the the whole `loader` directory can copied instead of copying individual files.
2023-12-21mkarchiso: add missing replacement for ARCHISO_UUID in ↵nl6720
/loader/entries/*.conf on ISO 9660 Fixes: 094afd169a0ff871eb7a6b37d68a9b9bcb7195e4 ("mkarchiso: support %ARCHISO_UUID% variable in boot loader configuration")
2023-09-28mkarchiso: always create /boot/grub/grubenv and /boot/grub/loopback.cfgnl6720
Even if GRUB is not used as a boot loader for the ISO, create a `/boot/grub/grubenv` file in the ISO 9660 file system. If a `loopback.cfg` file exists in the profile's `grub` directory, copy it to `/boot/grub/loopback.cfg` on the ISO. This ensures the funtionality will not be lost if the used boot loaders are changed.
2023-09-24mkarchiso: add uefi-ia32.systemd-boot.esp and ↵nl6720
uefi-ia32.systemd-boot.eltorito boot modes The systemd 254.2-1 package ships with IA32 systemd-boot, so it is possible to use for booting on IA32 UEFI. Perhaps they will be useful in the future. At least for now, the baseline and releng profiles are not changed to use them. When the issues and headaches caused with GRUB reach a critical point, then we will switch.
2023-06-15Fix optional shellcheck warningsnl6720
Additionally fix a few code style issues found with shfmt.
2023-06-15mkarchiso: prevent interference from xorriso startup filesnl6720
Options set in xorriso startup files (~/.xorrisorc) could interfere with the xorriso command run by mkarchiso. For example, if ~root/.xorrisorc contains -dummy on, then the ISO file will be empty. Pass -no_rc as the first option to xorriso to prevent interference and unintended behavior. Fixes #153.
2023-06-01mkarchiso: run _cms_sign_artifact only oncenl6720
Since `_build_buildmode_netboot` runs `_build_iso_base` which runs `_prepare_airootfs_image`, the call to `_cms_sign_artifact` in `_build_buildmode_netboot` can be removed. Fixes #197
2023-05-17mkarchiso: add a -r option to delete the working directorynl6720
`-r` will instruct to delete the working directory at the end of a `mkarchiso` run. If the specified directory already exists, then it will not be deleted and instead produce a warning. Implements #211
2023-05-17Update mkarchiso2hexed
2023-05-17mkarchiso: read SOURCE_DATE_EPOCH from file earlynl6720
When restarting an interrupted build, SOURCE_DATE_EPOCH needs to be available before `profiledef.sh` is read, since it may reference it. Fixes 7c6f266ec94e3eff23466ed8d0c45e4bee0ddae4
2023-05-17mkarchiso: support %ARCHISO_UUID% variable in boot loader configurationnl6720
It will be replaced with the ISO's modification date in UTC, i.e. its "UUID". This allows to replace `archisolabel=%ARCHISO_LABEL%` with `archisodevice=UUID=%ARCHISO_UUID%` in boot loader configurations. Related to #202
2023-05-17mkarchiso: Fix the cp command arguments to retain mkarchiso's behavior prior ↵shivanandvp
to the GNU Coreutils update. Fixes Issue #214
2023-05-14Subdirectories from grub/ are copied to the ISOAntonio V
2023-02-24Move SYSLINUX directory from /syslinux/ to /boot/syslinux/nl6720
This allows to reduce the number of top-level directories by one and matches with the GRUB directory move. Most boot loader related things will now be in the /boot/ directory. Fixes #207
2023-02-24Move the .uuid file to /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuidnl6720
To prevent the file from being accidentally missed when someone copies the ISO's contents, let's not place it in a directory that starts with a dot. Since all GRUB related files are in /boot/grub/, put it there too. Instead of using a more unique UUID for the file name, use `YYYY-mm-dd-HH-MM-SS-00.uuid` which matches the ISO's modification date in UTC,i.e. its "UUID". If multiple ISOs would be generated in the exact same second, the ISO 9660 modification date (i.e. its "UUID") would be the same, so there would be not way to distinguish between the volumes anyway. This also makes the file look less suspicious to the casual glance.
2023-02-24mkarchiso: write grubenv in _make_common_bootmode_grub_cfgnl6720
Add all variables that we replace with values in configuration files. Keep `${isofs_dir}/${install_dir}/grubenv` with fewer variables for backwards compatibility. It will be removed in the future.
2023-02-22Move grub files from /EFI/BOOT/ to /boot/grub/ on ISO 9660nl6720
Move the location of GRUB files so that there is boot-platform (BIOS vs EFI) neutral place for GRUB-specific files (e.g. configuration files, background images, etc.). The EFI binaries are obviosly staying in the default/fallback boot path `/EFI/BOOT/BOOT*.EFI`, otherwise there will be no UEFI booting. The /boot/grub/ directory will be used to store BIOS (i386-pc) GRUB bootsector images, if we get to that. It is also a requirement for implementing `loopback.cfg` support, since the file's path must be `/boot/grub/loopback.cfg`. Implements #206
2023-02-22Do not duplicate grub.cfg in efiboot.imgnl6720
Instruct the embeded grub.cfg to search for a volume with a `/.disk/%UUID_SEARCH_FILENAME%.uuid` file and load `/EFI/BOOT/grub.cfg` from it. This avoid duplicating GRUB configuration files in two places (ISO 9660 and FAT) and ensures there is no confusion about which is the _correct_ configuration file. Since nothing besides EFI binaries is copied to `efibootimg`, the `_make_common_bootmode_grub_copy_to_efibootimg` function is removed. Fixes #208
2023-02-22mkarchiso: add more details to the comment in grub-embed.cfgnl6720
Link to the upstream issue report.
2023-02-10mkarchiso: do not place memtest86+ in netboot artifactsnl6720
Move memtest86+ to `/boot/memtest86+/` on ISO 9660. That directory is not copied to netboot artifact output. Netboot boot menu https://ipxe.archlinux.org/releng/netboot/archlinux.ipxe does not have entries for memtest and archiso-manager removes these files (not the EFI one, though) before uploading the release files anyway.
2023-02-02Preload GRUB's NTFS, exFAT and UDF modulesnl6720
There are claims that some UEFI allegedly natively support NTFS. Preload the required GRUB modules to support booting from NTFS on such systems. Additionally preload the exFAT and UEF modules, because, why not?
2023-02-02mkarchiso: write a .uuid file to /.disk/ on ISO 9660 to allow GRUB to search ↵nl6720
for it Create a `/.disk/INSERT_UUID_HERE.uuid` file to implement something called "file system transposition". See https://www.mail-archive.com/grub-devel@gnu.org/msg34346.html for the proposal of it for grub-mkrescue. This will allow GRUB to search for the volume containing the file instead of hardcoding the ISO volume label or another file system or partition attribute in GRUB configuration. By only relying on the directory structure simplifies supporting medium preparation methods with manual partitioning such as https://wiki.archlinux.org/title/USB_flash_installation_medium#In_GNU/Linux_4
2022-12-22archiso/mkarchiso: write "uninitialized" to /etc/machine-idChristian Hesse
This is a new value introduced in systemd v247. It makes sure a new machine-id is generated, but is handled as first boot as well. See "First Boot Semantics" in machine-id(5) for details.
2022-12-10mkarchiso: check if the code signing files specified with option -c existnl6720
Look for the files in `*_validate_options` and error out early if they do not exist.
2022-12-06mkarchiso: open the ARCHISO_GNUPG_FD, ARCHISO_TLS_FD and ARCHISO_TLSCA_FD ↵nl6720
file descriptors only for reading Nothing should ever be written to these files, so let's make sure it cannot happen.
2022-12-06mkarchiso: do not try to use an non existent GPG public key filenl6720
The `bootstrap` build mode never calls `_export_gpg_publickey`, so even if the GPG key is passed with the `-g` option and thus the `gpg_key` variable is set, the `${work_dir}/pubkey.gpg` file will not exist. This has not caused any issue so far because the `ARCHISO_GNUPG_FD` file descriptor opens the file for both reading and writing, which means the file gets created if it does not exist. Assign the exported public key file name to a `gpg_publickey` variable in `_export_gpg_publickey` and check for it when the file is used. Since the exist status of the gpg command cannot be checked, look for the exported public key file instead.
2022-12-06mkarchiso: disable shellcheck warning when searching an arraynl6720
The warning about SC2076 does not apply here.
2022-12-03Add Memtest86+ to x86_64 UEFI GRUB boot menuJonathan Liu
Implements #203.
2022-10-13mkarchiso: do not sign .sig filesnl6720
Make sure existing sig files are deleted before creating new ones and make sure to not sign any sig files. This allows retrying failed mkarchiso runs without ending up with files such as vmlinuz.ipxe.sig.ipxe.sig. Fixes #198
2022-09-25Add the ability to generate rootfs signatures using openssl CMS module if ↵Anton Hvornum
``-c`` is given. (gitlab ci) Added a CA structure to the codesigning certificates. This to test the functionality of optional CA being in the signing message. (mkarchiso) Removed the ``sign_netboot_artifacts`` variable and instead we'll now rely on ``if [[ -v cert_list ]]; then``. Added ``ARCHISO_TLS_FD`` and ``ARCHISO_TLSCA_FD`` environment variables to override the certificates used. This is so that third party CA's can be used during building in a meaningful way without distrupting the CA trust that is shipped by default. _cms_sign_artifact() was added which signs the rootfs using OpenSSL CMS. The files will be saved as "${artifact}.cms.sig". That would be for instance "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs.cms.sig".
2022-08-26mkarchiso: touch clock-epoch for extra hint on date and timeChristian Hesse
This helps on systems with screwed or broken RTC.
2022-08-19mkarchiso: preload more GRUB modules and disable shim_lock verifiernl6720
--disable-shim-lock is required to support Secure Boot with custom signatures without using shim. Otherwise GRUB will trow an error when trying to boot a kernel: error: shim_lock protocol not found. error: you need to load the kernel first. The modules GRUB will use need to be preloaded otherwise the EFI binaries cannot be signed and used for Secure Boot. See https://bugs.archlinux.org/task/71382. GRUB will trow en error: error: verification requested but nobody cares These changes are done to support Secure Boot using custom keys (not shim) by simply extracting the boot loader (BOOTx64.EFI and BOOTIA32.EFI), kernel, UEFI shell, signing them and then repacking the ISO. For example. Extract the files: $ osirrox -indev archlinux-YYYY.MM.DD-x86_64.iso \ -extract_boot_images ./ \ -extract /EFI/BOOT/BOOTx64.EFI BOOTx64.EFI \ -extract /EFI/BOOT/BOOTIA32.EFI BOOTIA32.EFI \ -extract /shellx64.efi shellx64.efi \ -extract /shellia32.efi shellia32.efi \ -extract /arch/boot/x86_64/vmlinuz-linux vmlinuz-linux Make the files writable: $ chmod +w BOOTx64.EFI BOOTIA32.EFI shellx64.efi shellia32.efi vmlinuz-linux Sign the files: $ sbsign --key db.key --cert db.crt --output BOOTx64.EFI BOOTx64.EFI $ sbsign --key db.key --cert db.crt --output BOOTIA32.EFI BOOTIA32.EFI $ sbsign --key db.key --cert db.crt --output shellx64.efi shellx64.efi $ sbsign --key db.key --cert db.crt --output shellia32.efi shellia32.efi $ sbsign --key db.key --cert db.crt --output vmlinuz-linux vmlinuz-linux Copy the boot loader and UEFI shell to the EFI system partition image: $ mcopy -D oO -i eltorito_img2_uefi.img BOOTx64.EFI BOOTIA32.EFI ::/EFI/BOOT/ $ mcopy -D oO -i eltorito_img2_uefi.img shellx64.efi shellia32.efi ::/ Repack the ISO using the modified El Torito UEFI boot image and add the signed boot loader files, UEFI shell and kernel to ISO9660: $ xorriso -indev archlinux-YYYY.MM.DD-x86_64.iso \ -outdev archlinux-YYYY.MM.DD-x86_64-Secure_Boot.iso \ -boot_image any replay \ -append_partition 2 0xef eltorito_img2_uefi.img \ -map BOOTx64.EFI /EFI/BOOT/BOOTx64.EFI \ -map BOOTIA32.EFI /EFI/BOOT/BOOTIA32.EFI \ -map shellx64.efi /shellx64.efi \ -map shellia32.efi /shellia32.efi \ -map vmlinuz-linux /arch/boot/x86_64/vmlinuz-linux Boot the resulting archlinux-YYYY.MM.DD-x86_64-Secure_Boot.iso.
2022-08-17mkarchiso: copy all GRUB files to the ISOnl6720
Do not limit file copying to only grub.cfg and instead copy all GRUB configuration files and assets to both the ISO9660 and FAT image. This will allow for including custom images, fonts, etc. To easily match all non-configuration files (i.e. files without the .cfg extension), bash's extended glob feature will be enabled. Actions common to multiple _make_bootmode_uefi-*.grub are split off into dedicated functions: * _make_common_bootmode_grub_copy_to_efibootimg, * _make_common_bootmode_grub_copy_to_isofs, * _make_common_bootmode_grub_cfg. Use the same du command in all efiboot_imgsize variable assignments. Fixes #185.
2022-08-07mkarchiso: unset LANGUAGEnl6720
LC_ALL=C.UTF-8, unlike LC_ALL=C, does not override LANGUAGE. See https://sourceware.org/bugzilla/show_bug.cgi?id=16621 and https://savannah.gnu.org/bugs/?62815
2022-07-16Add efibootimg variable in place of full pathPellegrino Prevete
Update authors Update CHANGELOG
2022-06-24mkarchiso: work arround GRUB's cmdpath having incorect case on some firmwarenl6720
Fixes #183
2022-06-18mkarchiso: add SBAT metadata to grub-mkstandalone created EFI binariesnl6720
Even though archiso created ISOs do not support Secure Boot, having SBAT would allow users to more easily repack the files in the ISO to add a signed shim. Fixes #174
2022-06-18mkarchiso: improve commentsnl6720
* Fix typos and wording, * Remove impossible TODO.
2022-06-09Add *_uefi-x64.grub.* functions to mkarchisoplainlinen
2022-06-09mkarchiso: use C.UTF-8nl6720
The glibc 2.35-6 package ships with the C.UTF-8 locale included, so mkarchiso does not need to use a non-UTF-8 locale anymore. Implements #175.
2022-05-25Add support for GRUB ia32 UEFI in mkarchiso, update READMEs.Pellegrino Prevete
2022-01-21https://gitlab.archlinux.org/archlinux/archiso/-/issues/163weltio weltio
2022-01-08mkarchiso: Fix mmd-command checkhayao
valication_error variable is not changed when mmd and/or mcopy are missing.