Compare commits

..

161 commits

Author SHA1 Message Date
73c071b55c Removed os-release function 2024-12-22 11:00:05 +03:30
nl6720
a92371f940
Add changelog for 82 2024-11-27 11:27:47 +02:00
nl6720
0995113189
Remove DownloadUser from pacman.conf
`DownloadUser = alpm` does not appear to be suitable for mkarchiso use
since there is no guarantee that `alpm` user has access to the working
directory.

Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/232
Fixes: 691c57fc2e ("Update pacman.conf for pacman 7")
2024-11-22 12:29:13 +02:00
David Runge
d62e49b624
Add changelog entry for v81
Signed-off-by: David Runge <dvzrv@archlinux.org>
2024-10-28 17:11:47 +01:00
David Runge
a0af54f3a2
configs: Adapt enabled systemd services to changes in cloud-init 24.3
Adapt enabled services in both baseline and releng profiles to cope with
changes in cloud-init 24.3.

Related-to: https://gitlab.archlinux.org/archlinux/packaging/packages/cloud-init/-/issues/3
Related-to: https://github.com/canonical/cloud-init/pull/5489
Fixes: https://gitlab.archlinux.org/archlinux/archiso/-/issues/236
Signed-off-by: David Runge <dvzrv@archlinux.org>
2024-10-28 16:13:30 +01:00
David Runge
9fb735bf65 Merge branch 'fix/netcat-mess' into 'master'
Remove gnu-netcat from releng profile

Closes #234

See merge request archlinux/archiso!395
2024-10-27 08:52:29 +00:00
David Runge
ac80d83ebf
Remove gnu-netcat from releng profile
After adding openbsd-netcat to the list of dependencies for cloud-init,
we have to remove gnu-netcat from the releng profile, as both netcat
implementations conflict with one another.

Related-to: https://gitlab.archlinux.org/archlinux/packaging/packages/cloud-init/-/issues/3
Fixes: https://gitlab.archlinux.org/archlinux/archiso/-/issues/234
Signed-off-by: David Runge <dvzrv@archlinux.org>
2024-10-26 21:01:05 +02:00
nl6720
0aa64126a4
Add changelog for 80 2024-09-24 18:08:06 +03:00
nl6720
691c57fc2e
Update pacman.conf for pacman 7
Add new options from
https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/blob/main/pacman.conf
2024-09-22 10:41:18 +03:00
nl6720
a0f7584e01
Merge remote-tracking branch 'origin/merge-requests/392'
By Tobias Powalowski
* origin/merge-requests/392:
  Update CHANGELOG.rst reflect remove of reiserfsprogs
  Remove reiserfsprogs (EOL)

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/392
2024-09-22 10:40:18 +03:00
Tobias Powalowski
3d694b2e46 Update CHANGELOG.rst reflect remove of reiserfsprogs 2024-09-05 09:03:22 +00:00
Tobias Powalowski
989c41f291 Remove reiserfsprogs (EOL) 2024-09-05 07:13:12 +00:00
nl6720
bc9a91fe73
mkarchiso: support compressing the bootstrap tarball with xz
Despite usually preferring it, I somehow forgot about xz in
3b3984b484 ("mkarchiso: implement configurable bootstrap tarball compression")
2024-08-26 12:03:52 +03:00
nl6720
bf1c7ff041
configs/baseline/profiledef.sh: do not use mkfs.erofs extended options "fragments" and "dedupe"
These options are not compatible with multi-threaded compression and
actually increase the image file size.

With this change, the baseline profile's EROFS image file size is
reduced from 488 MiB to 398 MiB.
On my system, the compression time is reduced from about 2m6.274s to
1m59.410s when using erofs-utils built without multi-threaded
compression and to 0m27.883s when using erofs-utils built with
multi-threaded compression.
2024-08-26 11:53:29 +03:00
nl6720
6cd79e6505
mkarchiso: use an empty UUID for EROFS
The UUID is never used for anything, since the file system resides in a
file. Instead of generating a reproducible UUID for it, use
`00000000-0000-0000-0000-000000000000` instead.
2024-08-21 09:08:08 +03:00
nl6720
654e834f8c
mkarchiso: make bootstrap tarball extension part of the image_name
This shows the correct image file name in `_show_config` and simplifies
actions with the `image_name` in other functions.
2024-07-27 15:13:59 +03:00
nl6720
fa3aba32c8
Add changelog for 79 2024-07-24 10:55:48 +03:00
nl6720
88102d8b44
mkarchiso: remove unneeded workarounds in _mkairootfs_ext4+squashfs
* Do not run `tune2fs` on the image. The file system is not mounted, so
the default values for "Maximum mount count" (`tune2fs` option `-c`) and
"Check interval" (`tune2fs` option `-i`) are fine as is. With this change
the ext4 image is reproducible.
* Remove `E2FSPROGS_FAKE_TIME`. e2fsprogs 1.47.1 supports
`SOURCE_DATE_EPOCH` so setting this e2fsprogs specific variable is not needed
anymore.
See https://github.com/tytso/e2fsprogs/issues/131 for details.
2024-06-05 11:44:41 +03:00
nl6720
57589df1d6
Merge remote-tracking branch 'origin/merge-requests/386'
By Dariusz Pelowski
* origin/merge-requests/386:
  .automated_script.sh: add proper HTTP status checking

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/386
2024-06-05 11:43:18 +03:00
Dariusz Pelowski
75e57093e6 .automated_script.sh: add proper HTTP status checking
When a download attempt fails with an HTTP error, the body of the failed
request will be written to the output file with a 0 exit status, causing the
execution of an error message as a script.

This issue is resolved by adding the --fail option to curl.

Co-authored-by: David Runge <dvzrv@archlinux.org>
2024-06-05 11:18:45 +03:00
nl6720
4b709bcd5f
Add changelog for 78 2024-05-23 10:58:18 +03:00
David Runge
2a5e4e3aa0 Merge branch 'remove-deps' into 'master'
configs/releng/packages.x86_64: Remove wezterm-terminfo

See merge request archlinux/archiso!384
2024-05-23 07:45:58 +00:00
David Runge
3c6cff25bb
configs/releng/packages.x86_64: Remove wezterm-terminfo
The wezterm-terminfo package is replaced by the ncurses package.

Signed-off-by: David Runge <dvzrv@archlinux.org>
2024-05-22 22:48:58 +02:00
nl6720
c0a4c39f21
mkarchiso: use FAT32 as early as possible
mkfs.fat selects FAT32 for file systems of at least 512 MiB size, but a
FAT32 file system can already be created at 36 MiB size (assuming 512
byte logical sector size).
2024-05-18 13:53:27 +03:00
nl6720
8d07ca3541
configs/releng/airootfs/etc/mkinitcpio.conf.d/archiso.conf: use xz -9e
Use higher compression for the initramfs.

Now that mkinitcpio moves the compressed kernel modules and firmware
files to the early uncompressed initramfs, we can compress the main
initramfs image slightly more without it increasing the built time too
much. This will increase the memory required for decompression from
9 MiB to 65 MiB (assuming the kernel's decompressor works the same as
the xz tool), but that should not be an issue for any system targeting
Arch.

This reduces the initramfs size by ~250 KiB, which will save ~500 KiB
for the whole ISO.
2024-05-18 12:06:03 +03:00
nl6720
ead84ee9c0
mkarchiso: do not pad the ISO when it is not necessary
If the ISO exceeds the max size of a CD (900 MiB), the 300 KiB padding
needed for CDs can be removed.
2024-05-18 11:32:09 +03:00
nl6720
1ae3ff6ff6
mkarchiso: increase the additional free space added to efiboot.img
Less than 1 MiB (but rounded up to one) is needed to account for file and
directory entries, especially when using FAT32. Otherwise the ISO build could stop with:

    Disk full

The rest of the increase is to allow more space for adding custom files
after the fact, i.e. when repacking the ISO. E.g. for the purposes of
adding a signed boot loader for Secure Boot or similar. See
https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot#ISO_repacking
2024-05-13 09:30:14 +03:00
nl6720
2febfabd6c
scripts/run_archiso.sh: use 4 MiB OVMF files
Use `OVMF_CODE.4m.fd` and `OVMF_VARS.4m.fd` instead of the old 2 MiB
`OVMF_CODE.fd` and `OVMF_VARS.fd`.
2024-05-09 17:53:09 +03:00
nl6720
e567a2ab26
mkarchiso: do not place the pkglist.x86_64.txt file inside the bootstrap tarball's root.x86_64 directory
Keep it inside the archive, but separate from the `root.x86_64` directory
to avoid polluting it.
2024-05-09 17:30:03 +03:00
nl6720
969b91f700
mkarchiso: fix check for microcode update files in initramfs images
The existence of a ``early_cpio`` file is not enough since mkinitcpio can
and will place other files in the early uncompressed CPIO even when the
microcode hook is not used.

Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/231
2024-05-04 15:24:12 +03:00
nl6720
34426df652
Add changelog for 77 2024-04-21 09:36:53 +03:00
nl6720
024cf1b710
configs/releng/profiledef.sh: change UEFI boot loader from GRUB to systemd-boot
While using GRUB as the UEFI boot loader has reduced the size of the ISO,
it has brought nothing but pain otherwise:

* We cannot use `gfxterm` since it is not visible on some hardware.
* GRUB has a a strange and nonsensical limitation where the EFI binary
  can be built with either support for shim or custom Secure Boot key
  support, but not both. This means you cannot repack the ISO to use
  shim + MOK since we currently use `--disable-shim-lock` to provide
  support for setups with custom keys.
* GRUB's EFI binary needs to be built with `grub-mkstandalone` instead
  of there being a ready made EFI binary in the package. This requires
  having grub installed on the host system which affects reproducibility.

This increases the size of the ISO since systemd-boot cannot boot files
from other volumes, i.e. the kernel and initramfs is duplicated in the
EFI system partition (the second partition made from `efiboot.img`).

Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/227
2024-04-19 14:26:24 +03:00
nl6720
43e4d9ce36
configs/: replace archisodevice boot parameter with archisosearchuuid
`archisosearchuuid=` first searches for a matching UUID. If that fails,
then it mounts and looks for a `/boot/${archisosearchuuid}.uuid` file in
all detected block devices (in whatever order `blkid` lists them).

This implements "file system transposition" without relaying on boot
loader specific features and does not tie us to GRUB anymore.

Related to https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio-archiso/-/merge_requests/48
Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/217
2024-04-19 13:45:04 +03:00
nl6720
2facc4630c
configs/releng/: use mkinitcpio's microcode hook instead of external microcode images
This simplifies boot loader configuration, but custom PXE setups will
be forced to update theirs.

Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/226
2024-04-19 10:53:42 +03:00
nl6720
924a97aeb1
configs/releng/profiledef.sh: use zstd compression for bootstrap image
The zstd tool has now been around for a while, so the availability of
it should not be a concern anymore.

Unlike gzip which was used until now, zstd offers higher compression
while still being faster (and multi-threaded).
The `--auto-threads=logical` option is used just so that there is some
difference between the releng and baseline profiles.

Everyone using the official Arch Linux bootstrap tarball (previously
`archlinux-bootstrap-YYYY.MM.DD-x86_64.tar.gz` or
`archlinux-bootstrap-x86_64.tar.gz`) will need to update their scripts
and etc. to use `archlinux-bootstrap-YYYY.MM.DD-x86_64.tar.zst` or
`archlinux-bootstrap-x86_64.tar.zst` instead.

Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/130
2024-04-19 10:28:55 +03:00
nl6720
57ccf8ef57
mkarchiso: fix requirement validation logic for uefi-ia32.systemd-boot.eltorito
`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: 5e72546e89 ("mkarchiso: add uefi-ia32.systemd-boot.esp and uefi-ia32.systemd-boot.eltorito boot modes")
2024-04-01 19:55:12 +03:00
nl6720
d3c8f38ead
Add configs/releng/efiboot/loader/entries/03-archiso-x86_64-memtest86+.conf
Create a boot entry for Memtest86+.

Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/228
2024-04-01 19:29:32 +03:00
nl6720
4136bfe085
mkarchiso: copy Memtest86+ for uefi-x64.systemd-boot.* boot modes
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-04-01 19:29:26 +03:00
nl6720
7b1d6a7b14
Add changelog for 76 2024-03-30 23:29:25 +02:00
nl6720
4df7306924
configs/*/profiledef.sh: set bootstrap_tarball_compression
* bootstrap will use .tar.zst with `zstd -c -T0 --long -19`,
* releng will retain .tar.gz with `gzip -cn9` for now.

This will later be changed as part of https://gitlab.archlinux.org/archlinux/archiso/-/issues/130.
2024-03-30 23:27:55 +02:00
nl6720
3b3984b484
mkarchiso: implement configurable bootstrap tarball compression
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-30 23:27:55 +02:00
nl6720
3e9f0c03d6
.gitignore: add more ignored files
* more tarball matching,
* `network-config` used by cloud-init,
* anything starting with `codesigning`.
2024-03-30 22:38:41 +02:00
nl6720
dc090c1fae
mkarchiso: skip including external microcode images if the initramfs file 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-26 15:14:20 +02:00
nl6720
84843f5c27
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
2024-03-24 18:31:28 +02:00
nl6720
7dd615ea83
Revert "mkarchiso: unset LANGUAGE"
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 6ac2230953.
2024-02-20 14:02:10 +02:00
nl6720
2932a9def3
Makefile: build and install the mkarchiso(1) man page
rst2man from python-docutils is required to convert the man page from
reStructuredText.
2024-02-17 11:27:19 +02:00
nl6720
bedb75a8c3
Add man page for mkarchiso 2024-02-07 14:50:40 +02:00
nl6720
1f65b695d3
Add changelog for 75 2024-01-24 12:23:44 +02:00
nl6720
5d8fe01fe1
configs/releng/profiledef.sh: replace "CD" with "DVD" in iso_application
Starting with kernel 6.7, the releng ISO exceeds 900 MiB which is the
maximum size of a CD.
Adjust the description to say "DVD" instead.

Closes https://gitlab.archlinux.org/archlinux/archiso/-/issues/144
2024-01-20 16:35:14 +02:00
nl6720
5aac945f76
mkarchiso: update memtest86+ license file location
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
2024-01-18 15:26:59 +02:00
nl6720
e04a40d04b
configs/releng/packages.x86_64: explicitly add ldns
Currently the ldns package is pulled in as a dependency of openssh, but
that dependency may be gone in the future.
See https://gitlab.archlinux.org/archlinux/packaging/packages/openssh/-/issues/2

Explicitly include ldns to ensure the live environment will continue to
have `drill`.
2024-01-05 17:42:18 +02:00
nl6720
a3b7121afb
Add changelog for 74 and update AUTHORS.rst 2023-12-21 11:45:08 +02:00
nl6720
56417cead4
mkarchiso: place prepared systemd-boot configuration in work directory
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-21 11:08:14 +02:00
nl6720
ebceecbd84
mkarchiso: add missing replacement for ARCHISO_UUID in /loader/entries/*.conf on ISO 9660
Fixes: 094afd169a ("mkarchiso: support %ARCHISO_UUID% variable in boot loader configuration")
2023-12-21 10:03:47 +02:00
nl6720
cb61daf8ea
configs/*/airootfs/etc/systemd/network/: add RequiredForOnline=routable
By default systemd-networkd-wait-online.service considers a network
connection to be "online" when it has reached the "degraded" state
(see networkctl(1) for the definitions).
Since "degraded" does not ensure there's a routable address, let's
change the connection's requirement to "routable" instead.

This gives a better chance that the network really is online when
network-online.target is reached.
2023-12-09 12:40:59 +02:00
nl6720
c96c2bef48
Merge remote-tracking branch 'origin/merge-requests/355'
By John Lane
* origin/merge-requests/355:
  update changelog
  Allow download automated script using TFTP

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/355
2023-12-08 11:09:38 +02:00
John Lane
e11875e951 update changelog 2023-12-07 21:00:27 +00:00
John Lane
72c274924a Allow download automated script using TFTP 2023-12-07 21:00:27 +00:00
nl6720
977e0b0fd4
Merge remote-tracking branch 'origin/merge-requests/353'
By Anton Hvornum
* origin/merge-requests/353:
  Ensured the correct CA key and CA certificate is used during signing process. It's been working based on default assumptions from the openssl configuration, but it's worth being explicit when doing these operations. Also removed a redundant -sha256

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/353
2023-12-07 15:53:27 +02:00
Anton Hvornum
28becbfc03 Ensured the correct CA key and CA certificate is used during signing process. It's been working based on default assumptions from the openssl configuration, but it's worth being explicit when doing these operations. Also removed a redundant -sha256 2023-12-07 12:00:47 +01:00
nl6720
60a38f0890
.gitlab/ci/build_archiso.sh: do not use "default" as the gpg Key-Type
GnuPG changed their default from RSA to ECC, so Key-Length not
a thing it supports. Instead it asks for the Key-Curve.

Avoid using the default and hardcode ed25519 (which is the current
GnuPG default).
2023-12-07 10:39:20 +02:00
nl6720
1eb7fc3c8a
Merge remote-tracking branch 'origin/merge-requests/351'
By kojq su
* origin/merge-requests/351:
  add bcachefs-tools

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/351
2023-12-01 09:49:00 +02:00
kojq su
7b843d6f27 add bcachefs-tools 2023-12-01 09:47:54 +02:00
nl6720
e880172984
Add changelog for 73 2023-09-29 13:34:21 +03:00
nl6720
4b489cd8bc
Add configs/baseline/airootfs/etc/localtime
Make sure the ISO can be booted successfully without triggering questions from systemd-firstboot.

Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/205
Fixes: 6e1be91961 ("archiso/mkarchiso: write "uninitialized" to /etc/machine-id")
2023-09-29 13:00:56 +03:00
nl6720
a75d7e5f7e
mkarchiso: always create /boot/grub/grubenv and /boot/grub/loopback.cfg
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-28 10:53:45 +03:00
nl6720
4280af7474
Add configs/*/grub/loopback.cfg
See https://www.supergrubdisk.org/wiki/Loopback.cfg for details.

Only `${iso_path}` is guaranteed, so we need to search for the volume,
on which the ISO file resides, ourselves.

Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/165
2023-09-28 10:09:10 +03:00
nl6720
0cd0cc0c3b
configs/*/grub/grub.cfg: do not hardcode the architecture and platform
Construct a human readable platform identifier from GRUB's built-in
variables and use it in menu item descriptions.

Only add the menu entries for the additional tools (UEFI shell,
Memtest86+) if the files exist.

Modify baseline's `grub.cfg` to closer match releng.
2023-09-28 10:08:36 +03:00
nl6720
8fb5246de6
configs/releng/grub/grub.cfg: play init tune at the end
Move the `play` command to the end of the file so it plays after the
menu entries are shown and ready.
2023-09-28 10:08:36 +03:00
nl6720
0a3a57a88b
configs/*/grub/grub.cfg: rearrange module loading
* Do not manually load modules that will get loaded by invoking a command.
* Explicitly load serial modules.
* Move `insmod all_video` after the font is loaded.
2023-09-28 10:08:36 +03:00
nl6720
5e72546e89
mkarchiso: add uefi-ia32.systemd-boot.esp and 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-09-24 12:06:02 +03:00
nl6720
519a5c004d
configs/releng/packages.x86_64: add bolt
bolt can be used to list and authorize Thunderbolt and USB4 devices.

Inspired by https://bbs.archlinux.org/viewtopic.php?id=288731 where a
user needed to install the package in the live environment.
2023-09-24 11:31:23 +03:00
nl6720
a4bbbfde42
Add changelog for 72 2023-08-29 22:27:03 +02:00
David Runge
6c5ab3d388
Use pcsclite for communicating with OpenPGP smartcards
As opgpcard uses pcsclite and gnupg is able to use it as well, switch
away from using gnupg's internal ccid driver.
2023-08-29 20:13:32 +02:00
David Runge
81d62d4c5d
Add sequoia-sq and openpgp-card-tools to releng profile 2023-08-29 15:04:25 +02:00
nl6720
174f818581
/etc/ssh/sshd_config.d/10-archiso.conf: keep only the modified options
The only changes we make to the default are to enable root login via a
password.

While `PasswordAuthentication yes` is the default, let's set it
explicitly to avoid potential issues in the future.
2023-08-26 10:54:26 +03:00
nl6720
d501e235bb
Move custom sshd_config to /etc/ssh/sshd_config.d/
openssh 9.4p1-2 changed /etc/ssh/sshd_config to add support for
drop-in files in /etc/ssh/sshd_config.d/.

Using drop-in files avoids needing to keep up with changes to the
default /etc/ssh/sshd_config.
2023-08-26 10:54:26 +03:00
nl6720
9bb29f3980
configs/releng/packages.x86_64: add tpm2-tools
The tools are useful for clearing, creating and reading keys and etc.
on the TPM.
2023-08-26 10:11:53 +03:00
David Runge
ddda63ba09
Remove qemu-headless from list of dependencies in GitLab CI
Remove qemu-headless since it is no longer needed to build the project
and is also no longer provided by qemu-base.
2023-08-21 15:55:06 +02:00
nl6720
2e6db24f23
Set IPv6PrivacyExtensions=yes in global systemd-netorkd configuration
Since systemd 245, IPv6PrivacyExtensions can be set not just per
connection, but also globally for all connection with a configuration
file in /etc/systemd/network.conf.d/.
2023-08-11 11:40:14 +03:00
nl6720
0b8704fe4b
configs/releng/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount: use tmpfs with noswap option
Since tmpfs has a `noswap` option, use it instead of ramfs. Unlike
ramfs, tmpfs has a limit to its size.

This reverts commit 09b0428128 ("configs/releng/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount: use ramfs").
2023-08-05 16:00:28 +03:00
nl6720
8ddd08f51d
.gitlab/ci/build_archiso.sh: create a valid code signing certificate
Make sure the certificate has a extendedKeyUsage section with
codeSigning per the iPXE requirements.

Fixes #195
2023-08-02 16:06:49 +03:00
nl6720
279d3c0971
.gitlab/ci/build_archiso.sh: improve CI codesigning certificate
Adjust subject name to more closely match what's used in create_ephemeral_pgp_key.

Reduce the certificate validity to two days. These are just temporary
certificates, they will not be used anywhere.

Fixes #196
2023-08-02 16:04:35 +03:00
nl6720
17a71ade2e
configs/*/airootfs/etc/mkinitcpio.conf.d/archiso.conf: remove comments and unused options
Set only the custom values for HOOKS and COMPRESSION.
2023-06-21 16:20:16 +03:00
nl6720
eb5720331b
configs/: move custom mkinitcpio.conf files to /etc/mkinitcpio.conf.d/
This allows to retain a pristine /etc/mkinitcpio.conf in the rootfs.
2023-06-21 16:20:16 +03:00
nl6720
28a3a54c5f
Fix optional shellcheck warnings
Additionally fix a few code style issues found with shfmt.
2023-06-15 15:12:28 +03:00
nl6720
40dbfcfaf0
.shellcheckrc: enable optional checks
* Suggest explicitly using -n in `[ $var ]`. https://www.shellcheck.net/wiki/SC2243 & https://www.shellcheck.net/wiki/SC2244
* Suggest 'command -v' instead of 'which'. https://www.shellcheck.net/wiki/SC2230
* Suggest quoting variables without metacharacters. https://www.shellcheck.net/wiki/SC2248
* Require [[ and warn about [ in Bash/Ksh. https://www.shellcheck.net/wiki/SC2292
2023-06-15 15:12:28 +03:00
nl6720
bf79d7be9e
mkarchiso: prevent interference from xorriso startup files
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-15 14:19:34 +03:00
nl6720
1d1f9a0fc8
mkarchiso: run _cms_sign_artifact only once
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-06-01 09:58:22 +03:00
nl6720
c50ffaf48b
Add changelog for 71 and update AUTHORS.rst 2023-05-28 10:48:08 +03:00
nl6720
1637dc3590
Update configs/{baseline,releng}/pacman.conf
Update pacman.conf to match the one shipped with pacman 6.0.2-7.

The community repository is gone. See
https://archlinux.org/news/git-migration-completed/
2023-05-25 16:35:56 +03:00
nl6720
dee0da6eb2
Merge remote-tracking branch 'origin/merge-requests/330'
By Sorin Pânca
* origin/merge-requests/330:
  Add support for mDNS.

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/330
2023-05-25 16:34:35 +03:00
Sorin Pânca
32b32bd615 Add support for mDNS. 2023-05-22 15:58:50 +03:00
nl6720
b5e7f5afc5
mkarchiso: add a -r option to delete the working directory
`-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-17 21:46:19 +03:00
nl6720
b9cec1e08b
Merge remote-tracking branch 'origin/merge-requests/327'
By 2hexed
* origin/merge-requests/327:
  Update mkarchiso
  Fixed a little typo in install_dir's description

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/327
2023-05-17 21:25:15 +03:00
2hexed
dc72a84dae Update mkarchiso 2023-05-17 14:43:15 +00:00
nl6720
7f1632334b
CHANGELOG.rst: remove stray git conflict marker
Fixes 8cc0e9e5b0
2023-05-17 17:36:59 +03:00
nl6720
493aa90fd2
configs/releng/packages.x86_64: add more terminfo packages
Add foot-terminfo and wezterm-terminfo packages to allow using their
terminfo entries for installations via SSH.
2023-05-17 16:12:01 +03:00
nl6720
db292a59ab
README.profile.rst: document %ARCHISO_UUID% and %ARCHISO_SEARCH_FILENAME%
While their values are not affected by `profiledef.sh` variables, there
is no other place to document these *identifiers*.
2023-05-17 15:23:45 +03:00
nl6720
8cc0e9e5b0
mkarchiso: read SOURCE_DATE_EPOCH from file early
When restarting an interrupted build, SOURCE_DATE_EPOCH needs to be
available before `profiledef.sh` is read, since it may reference it.

Fixes 7c6f266ec9
2023-05-17 15:23:44 +03:00
nl6720
ce8fdedbf7
Use UUIDs in all boot loader configuration files
Relying on the volume UUID instead of its LABEL avoids collisions of
multiple ISOs created in the same month.

Fixes #202
2023-05-17 15:23:18 +03:00
nl6720
094afd169a
mkarchiso: support %ARCHISO_UUID% variable in boot loader configuration
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-17 15:23:18 +03:00
nl6720
b468327442
Merge remote-tracking branch 'origin/merge-requests/325'
By shivanandvp
* origin/merge-requests/325:
  mkarchiso: Fix the cp command arguments to retain mkarchiso's behavior prior to the GNU Coreutils update. Fixes Issue #214

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/325
2023-05-17 15:11:26 +03:00
shivanandvp
14b2e44d90
mkarchiso: Fix the cp command arguments to retain mkarchiso's behavior prior to the GNU Coreutils update. Fixes Issue #214 2023-05-17 04:08:33 -05:00
nl6720
db2b78fd30
Merge remote-tracking branch 'origin/merge-requests/322'
By Antonio V
* origin/merge-requests/322:
  Fixed subdirectories copy from grub/ to the ISO
  Subdirectories from grub/ are copied to the ISO

Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/215

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/322
2023-05-17 11:11:33 +03:00
David Runge
44471540dc Merge branch 'd3vil0per-master-patch-56859' into 'master'
Added classes for Memtest86+ and UEFI Shell menuentries

See merge request archlinux/archiso!323
2023-05-16 21:59:25 +00:00
Antonio V
2b2f212845 Added classes for Memtest86+ and UEFI Shell menuentries 2023-05-14 15:20:07 +00:00
Antonio V
42f645edc3 Fixed subdirectories copy from grub/ to the ISO 2023-05-14 15:17:35 +00:00
Antonio V
751f6ed9ba Added classes for Memtest86+ and UEFI Shell menuentries 2023-05-14 15:10:02 +00:00
Antonio V
63c77dc2d1 Subdirectories from grub/ are copied to the ISO 2023-05-14 14:59:53 +00:00
nl6720
798562bbfd
Merge remote-tracking branch 'origin/merge-requests/235'
By Zig Globulin
* origin/merge-requests/235:
  wait for networkd online before curl invocation

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/235
2023-05-13 16:22:24 +03:00
nl6720
20fc8030a3
configs/baseline/profiledef.sh: compress more
* Use LZMA extreme compression level,
* enable experimental compressed fragments feature to create a smaller image,
* enable experimental data deduplication.

This decreases the baseline profile's `airootfs.erofs` size by about ~16 MiB.
2023-03-17 19:35:59 +02:00
Zig Globulin
f60525103d wait for networkd online before curl invocation
1) wait for network-online.target before invoking curl
   as there's no synchronization with network setup for this script
2) don't hide curl errors - it may be easier to debug the issues
3) add log and comments
2023-03-02 16:29:17 +02:00
nl6720
5c36c85bd5
Add changelog for 70 2023-02-27 20:29:03 +01:00
David Runge
29f4b0071b
Add changelog entry for terminal_output fix 2023-02-27 20:03:01 +01:00
David Runge
8535d695ff
Use console as grub's terminal_output
configs/{baseline,releng}/grub/grub.cfg:
Use `console` as grub's `terminal_output`, as with `gfxterm` only a blank screen is shown on some hardware.

Fixes #212
2023-02-27 19:31:45 +01:00
nl6720
cedb3d142c
configs/*/grub/grub.cfg: replace /dev/disk/by-uuid/ with UUID=
Use the shorter and more nicer looking `UUID=` *tags* instead of the
`/dev/disk/by-uuid/` paths.

This requires mkinitcpio-archiso v68.

Related to #202
2023-02-24 11:41:14 +02:00
nl6720
1da743cc4e
README.transfer.rst: update instructions
Convert the file to reStructuredText markup.
Fixes #39.

Rewrite the instructions where possible or otherwise update them.
E.g. fix the changed boot loader paths, etc.

The "Manual formatting (BIOS only)", previosly "PC-BIOS (ISOHYBRID-MBR)",
method is not tested and it is not clear if it still even works.
2023-02-24 11:28:43 +02:00
nl6720
04d439d1b7
Rename docs/README.transfer to docs/README.transfer.rst 2023-02-24 11:27:55 +02:00
nl6720
a0941539c0
Move SYSLINUX directory from /syslinux/ to /boot/syslinux/
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-24 10:33:37 +02:00
nl6720
c8474f8dbe
Move the .uuid file to /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid
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-24 10:22:41 +02:00
nl6720
d96a356995
mkarchiso: write grubenv in _make_common_bootmode_grub_cfg
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-24 10:22:36 +02:00
nl6720
f7502001b0
configs/*/grub/grub.cfg: reuse ARCHISO_HINT and ARCHISO_UUID passed from the embedded grub.cfg
The `grub.cfg` embedded in the GRUB binaries already sets `ARCHISO_HINT`
and `ARCHISO_UUID` in most cases. To avoid performing the same searches
multiple times, use the existing variables.
2023-02-22 18:28:28 +02:00
nl6720
b94d7c4ce5
Move grub files from /EFI/BOOT/ to /boot/grub/ on ISO 9660
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-22 18:28:27 +02:00
nl6720
f5ade898f9
Do not duplicate grub.cfg in efiboot.img
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-22 18:28:24 +02:00
nl6720
40e09767f0
mkarchiso: add more details to the comment in grub-embed.cfg
Link to the upstream issue report.
2023-02-22 18:27:45 +02:00
nl6720
7c6f266ec9
configs/*/profiledef.sh: honor SOURCE_DATE_EPOCH
Ensure the **correct** date is used in `iso_label` and `iso_version`.
2023-02-22 18:03:13 +02:00
nl6720
28d2bc11e3
mkarchiso: do not place memtest86+ in netboot artifacts
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-10 08:29:37 +02:00
nl6720
0f34e4429a
configs/*/airootfs/etc/ssh/sshd_config: update to match 9.2p1-1
Update /etc/ssh/sshd_config to match changes made in
42aa04744e
and 7166713c55

The only modification remains `PermitRootLogin yes`.
2023-02-07 17:38:11 +02:00
nl6720
5587e031f3
Preload GRUB's NTFS, exFAT and UDF modules
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-02 11:49:16 +02:00
nl6720
3f95d391ef
configs/*/grub/grub.cfg: search for a .uuid file in /.disk/ and use the volume it's on
Search for `/.disk/%UUID_SEARCH_FILENAME%.uuid` and pass the UUID of the
volume it's on as `archisodevice`. mkarchiso will replace
`%UUID_SEARCH_FILENAME%` with a hardcoded value generated using
`SOURCE_DATE_EPOCH` durring ISO build.

This allows to prepare an UEFI bootable installation medium by simply
copying the directory structure without having to touch `grub.cfg`.

Relying on the volume UUID instead of its LABEL also avoids collisions
of multiple ISOs created in the same month.

Fixes #202
2023-02-02 11:49:16 +02:00
nl6720
8d7ad3c629
mkarchiso: write a .uuid file to /.disk/ on ISO 9660 to allow GRUB to search 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
2023-02-02 11:49:15 +02:00
nl6720
ab3d78860e
Update URLs
* Update mkinitcpio-archiso project link,
* Update code of conduct link,
* Update arch-releng mailing list link,
* Use HTTPS where possible,
* Replace dead link.
2023-01-29 11:11:38 +02:00
nl6720
cd621f5f4a
Add changelog for 69 2022-12-24 10:33:18 +02:00
nl6720
ff5c0498eb
Merge remote-tracking branch 'origin/merge-requests/304'
By Alexander Speshilov
* origin/merge-requests/304:
  fix typo in README.profile.rst

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/304
2022-12-24 10:31:29 +02:00
nl6720
995e0b7fb9
Merge remote-tracking branch 'origin/merge-requests/303'
By Christian Hesse
* origin/merge-requests/303:
  archiso/mkarchiso: write "uninitialized" to /etc/machine-id

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/303
2022-12-24 10:30:22 +02:00
Alexander Speshilov
cca3eee833 fix typo in README.profile.rst 2022-12-22 20:58:49 +00:00
Christian Hesse
6e1be91961 archiso/mkarchiso: write "uninitialized" to /etc/machine-id
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-22 16:41:07 +01:00
nl6720
55a1b132a0
configs/baseline/profiledef.sh: use LZMA compression for the EROFS image
Now that xz 5.4 is out and erofs-utils is built with LZMA support, it is
possible to compress the EROFS image with LZMA for higher compression.
`mkfs.erofs` trows a few warnings about using experimental features, but
they should not be an issue.

Nothing changes for the releng profile, for now at least.
2022-12-17 20:11:09 +02:00
nl6720
dedfe0364c
configs/releng/syslinux/archiso_pxe-linux.cfg: replace checksum and verify with cms_verify=y
Specify `cms_verify=y` in SYSLINUX/PXELINUX configuration to use OpenSSL
CMS based method for verifying the root file system image against the
code signing certificates in the initramfs.

`checksum` and `verify` are removed since they essentially serve the same
purpose and performing all the checks just needlessly delays boot.
Additionally, the removal of `verify` allows to build the ISO without gpg,
i.e. without using `mkarchiso`'s `-g` and `-G` options.

Fixes #200
2022-12-10 12:22:41 +02:00
nl6720
2da65f64ad
mkarchiso: check if the code signing files specified with option -c exist
Look for the files in `*_validate_options` and error out early if they do
not exist.
2022-12-10 12:08:50 +02:00
nl6720
2c3420204e
mkarchiso: open the ARCHISO_GNUPG_FD, ARCHISO_TLS_FD and ARCHISO_TLSCA_FD file descriptors only for reading
Nothing should ever be written to these files, so let's make sure it cannot happen.
2022-12-06 13:12:53 +02:00
nl6720
d31f38843a
mkarchiso: do not try to use an non existent GPG public key file
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-06 12:55:13 +02:00
nl6720
4ee6fdc1ea
mkarchiso: disable shellcheck warning when searching an array
The warning about SC2076 does not apply here.
2022-12-06 12:27:35 +02:00
nl6720
76815b1219
Merge remote-tracking branch 'origin/merge-requests/298'
By Jonathan Liu
* origin/merge-requests/298:
  Add Memtest86+ to x86_64 UEFI GRUB boot menu

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/298
2022-12-06 12:22:18 +02:00
Jonathan Liu
9d391c0925 Add Memtest86+ to x86_64 UEFI GRUB boot menu
Implements #203.
2022-12-03 20:56:18 +11:00
nl6720
477294955a
configs/releng/airootfs/root/.zlogin: use grep -a to ensure /proc/cmdline is treated as text
This protects against the case where /proc/cmdline contains garbage triggering grep to think it is a binary.
See e.g. https://bugs.archlinux.org/task/76468 for an example.
2022-11-12 11:35:36 +02:00
nl6720
ee4e4a96d2
Add changelog for 68 2022-10-30 10:39:45 +02:00
nl6720
e0e4d200c1
configs/releng/airootfs/etc/mkinitcpio.conf: replace the deprecated archiso_kms hook with kms
The archiso_kms hook was moved from mkinitcpio-archiso to the mkinitcpio project.

See 7bfe4861ea and dec17db532
2022-10-25 12:18:56 +03:00
nl6720
2f9cfdf42f
configs/: remove "Copy to RAM" boot entries since it is automatic now
The default is now copytoram=auto which enables copying to RAM when the rootfs image size is less than 4 GiB and free RAM exceeds the rootfs image size + 2 GiB.

See https://gitlab.archlinux.org/mkinitcpio/mkinitcpio-archiso/-/issues/13 and https://gitlab.archlinux.org/mkinitcpio/mkinitcpio-archiso/-/merge_requests/26.

Implements #177.
2022-10-22 17:31:46 +03:00
nl6720
11971619a6
mkarchiso: do not sign .sig files
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-10-13 13:37:14 +03:00
nl6720
f4f0a3a5ec
configs/: Do not explicitly enable qemu-guest-agent.service
qemu-guest-agent.service will be started by the /usr/lib/udev/rules.d/99-qemu-guest-agent.rules udev rule.

Fixes #199
2022-10-06 15:56:18 +03:00
David Runge
fbc72247b8
Add changelog for version 67
CHANGELOG.rst:
Add changelog for version 67.
2022-09-25 19:59:58 +02:00
David Runge
3e962dbeda
Update PGP key ID for David Runge
README.rst:
Change referenced PGP key ID from `C7E7849466FE2358343588377258734B41C31549` to
`991F6E3F0765CF6295888586139B09DA5BF0D338`, as the latter is now in used. The keys are cross-signed and both available
via Arch Linux's WKD.
2022-09-25 19:59:05 +02:00
Anton Hvornum
326cfed7cc
Add the ability to generate rootfs signatures using openssl CMS module if `-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-09-25 19:54:41 +02:00
David Runge
5f135b4342
Add changelog entry for ordering pacman-init after time-sync.target
CHANGELOG.rst:
Add changelog entry for ordering pacman-init after time-sync.target
2022-09-25 15:43:41 +02:00
David Runge
3f55c95613
Order pacman-init.service after time-sync.target
configs/releng/airootfs/etc/systemd/system/pacman-init.service:
Order pacman-init.service after time-sync.target, so that time on the host is synchronized before initializing pacman.
2022-09-25 15:39:28 +02:00
David Runge
69b22dc41f
Enable systemd-timesyncd and systemd-time-wait-sync
configs/releng/airootfs/etc/systemd/system/{dbus-org.freedesktop.timesync1},sysinit.target.wants/systemd-timesyncd}.service:
Enable systemd-timesyncd which aliases to dbus-org.freedesktop.timesync1 to ensure time gets synced on the host.

configs/releng/airootfs/etc/systemd/system/sysinit.target.wants/systemd-time-wait-sync.service:
Enable systemd-time-wait-sync to ensure time is finished syncing when time-sync.target is finished.
2022-09-25 15:36:18 +02:00
nl6720
8afa2b65d5
Merge remote-tracking branch 'origin/merge-requests/286'
By Tobias Powalowski
* origin/merge-requests/286:
  remove ipw2100-fw and ipw2200-fw, cleanup of [core]

https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/thread/UKXPJEJZPU5PFKAPSATNL2DSWFGNEUCK/

See merge request https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/286
2022-09-22 12:16:24 +03:00
Tobias Powalowski
4d64a58a90 remove ipw2100-fw and ipw2200-fw, cleanup of [core] 2022-09-22 11:01:03 +02:00
nl6720
ced3d3ffa3
Order pacman-init.service before archlinux-keyring-wkd-sync.service
archlinux-keyring-wkd-sync.service needs an initialized pacman keyring to work.

Add BindsTo=etc-pacman.d-gnupg.mount to stop pacman-init.service if the mount unit suddenly enters inactive state.
2022-09-01 09:41:00 +03:00
76 changed files with 1822 additions and 1338 deletions

View file

@ -16,6 +16,10 @@ charset = utf-8
indent_style = space
indent_size = 4
max_line_length = 120
# for shfmt
switch_case_indent = true
binary_next_line = true
[*.{yml,yaml}]
end_of_line = lf
@ -32,3 +36,6 @@ trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2
[Makefile]
indent_style = tab

6
.gitignore vendored
View file

@ -1,7 +1,9 @@
*~
archiso-*.tar.gz*
*.tar
*.tar.*
work/
out/
codesigning*
*.iso
*.img
*.cer
@ -10,3 +12,5 @@ out/
*.pem
user-data
meta-data
network-config
man/version.rst

View file

@ -1,71 +0,0 @@
---
#
# SPDX-License-Identifier: GPL-3.0-or-later
stages:
- check
- build
check:
before_script:
# NOTE: Install latest archlinux-keyring before upgrading system. In the
# future this should not be needed anymore when we can guarantee a valid
# keyring for longer:
# https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/issues/4
- pacman -Sy --needed --noconfirm archlinux-keyring
- pacman --noconfirm -Syu --needed make shellcheck
script:
- make check
stage: check
interruptible: true
.build:
artifacts:
reports:
metrics: output/metrics.txt
before_script:
- pacman -Sy --needed --noconfirm archlinux-keyring
- pacman -Syu --needed --noconfirm arch-install-scripts bash dosfstools e2fsprogs erofs-utils gnupg grub jq libarchive libisoburn mtools openssl qemu-headless squashfs-tools zsync
script:
- ./.gitlab/ci/build_archiso.sh ${BUILD_SCRIPT_ARGS}
stage: build
tags:
- vm
build_short:
extends: .build
parallel:
matrix:
- BUILD_SCRIPT_ARGS: baseline bootstrap
- BUILD_SCRIPT_ARGS: releng bootstrap
only:
refs:
- master
- merge_requests
changes:
- archiso/*
- configs/**/*
- Makefile
- .gitlab-ci.yml
- .gitlab/ci/*
interruptible: true
build_long:
extends: .build
parallel:
matrix:
- BUILD_SCRIPT_ARGS: baseline iso
- BUILD_SCRIPT_ARGS: baseline netboot
- BUILD_SCRIPT_ARGS: releng iso
- BUILD_SCRIPT_ARGS: releng netboot
only:
refs:
- master
- merge_requests
changes:
- archiso/*
- configs/**/*
- Makefile
- .gitlab-ci.yml
- .gitlab/ci/*
interruptible: true

View file

@ -1,273 +0,0 @@
#!/usr/bin/env bash
#
# This script is run within a virtual environment to build the available archiso profiles and their available build
# modes and create checksum files for the resulting images.
# The script needs to be run as root and assumes $PWD to be the root of the repository.
#
# Dependencies:
# * all archiso dependencies
# * coreutils
# * gnupg
# * openssl
# * zsync
#
# $1: profile
# $2: buildmode
set -euo pipefail
shopt -s extglob
readonly orig_pwd="${PWD}"
readonly output="${orig_pwd}/output"
readonly tmpdir_base="${orig_pwd}/tmp"
readonly profile="${1}"
readonly buildmode="${2}"
readonly install_dir="arch"
tmpdir=""
tmpdir="$(mktemp --dry-run --directory --tmpdir="${tmpdir_base}")"
gnupg_homedir=""
codesigning_dir=""
codesigning_cert=""
codesigning_key=""
pgp_key_id=""
print_section_start() {
# gitlab collapsible sections start: https://docs.gitlab.com/ee/ci/jobs/#custom-collapsible-sections
local _section _title
_section="${1}"
_title="${2}"
printf "\e[0Ksection_start:%(%s)T:%s\r\e[0K%s\n" '-1' "${_section}" "${_title}"
}
print_section_end() {
# gitlab collapsible sections end: https://docs.gitlab.com/ee/ci/jobs/#custom-collapsible-sections
local _section
_section="${1}"
printf "\e[0Ksection_end:%(%s)T:%s\r\e[0K\n" '-1' "${_section}"
}
cleanup() {
# clean up temporary directories
print_section_start "cleanup" "Cleaning up temporary directory"
if [ -n "${tmpdir_base:-}" ]; then
rm -fr "${tmpdir_base}"
fi
print_section_end "cleanup"
}
create_checksums() {
# create checksums for files
# $@: files
local _file_path _file_name _current_pwd
_current_pwd="${PWD}"
print_section_start "checksums" "Creating checksums"
for _file_path in "$@"; do
cd "$(dirname "${_file_path}")"
_file_name="$(basename "${_file_path}")"
b2sum "${_file_name}" > "${_file_name}.b2"
md5sum "${_file_name}" > "${_file_name}.md5"
sha1sum "${_file_name}" > "${_file_name}.sha1"
sha256sum "${_file_name}" > "${_file_name}.sha256"
sha512sum "${_file_name}" > "${_file_name}.sha512"
ls -lah "${_file_name}."{b2,md5,sha{1,256,512}}
cat "${_file_name}."{b2,md5,sha{1,256,512}}
done
cd "${_current_pwd}"
print_section_end "checksums"
}
create_zsync_delta() {
# create zsync control files for files
# $@: files
local _file
print_section_start "zsync_delta" "Creating zsync delta"
for _file in "$@"; do
if [[ "${buildmode}" == "bootstrap" ]]; then
# zsyncmake fails on 'too long between blocks' with default block size on bootstrap image
zsyncmake -v -b 512 -C -u "${_file##*/}" -o "${_file}".zsync "${_file}"
else
zsyncmake -v -C -u "${_file##*/}" -o "${_file}".zsync "${_file}"
fi
done
print_section_end "zsync_delta"
}
create_metrics() {
local _metrics="${output}/metrics.txt"
# create metrics
print_section_start "metrics" "Creating metrics"
{
# create metrics based on buildmode
case "${buildmode}" in
iso)
printf 'image_size_mebibytes{image="%s"} %s\n' \
"${profile}" \
"$(du -m -- "${output}/"*.iso | cut -f1)"
printf 'package_count{image="%s"} %s\n' \
"${profile}" \
"$(sort -u -- "${tmpdir}/iso/"*/pkglist.*.txt | wc -l)"
if [[ -e "${tmpdir}/efiboot.img" ]]; then
printf 'eltorito_efi_image_size_mebibytes{image="%s"} %s\n' \
"${profile}" \
"$(du -m -- "${tmpdir}/efiboot.img" | cut -f1)"
fi
# shellcheck disable=SC2046
# shellcheck disable=SC2183
printf 'initramfs_size_mebibytes{image="%s",initramfs="%s"} %s\n' \
$(du -m -- "${tmpdir}/iso/"*/boot/**/initramfs*.img | \
awk -v profile="${profile}" \
'function basename(file) {
sub(".*/", "", file)
return file
}
{ print profile, basename($2), $1 }'
)
;;
netboot)
printf 'netboot_size_mebibytes{image="%s"} %s\n' \
"${profile}" \
"$(du -m -- "${output}/${install_dir}/" | tail -n1 | cut -f1)"
printf 'netboot_package_count{image="%s"} %s\n' \
"${profile}" \
"$(sort -u -- "${tmpdir}/iso/"*/pkglist.*.txt | wc -l)"
;;
bootstrap)
printf 'bootstrap_size_mebibytes{image="%s"} %s\n' \
"${profile}" \
"$(du -m -- "${output}/"*.tar*(.gz|.xz|.zst) | cut -f1)"
printf 'bootstrap_package_count{image="%s"} %s\n' \
"${profile}" \
"$(sort -u -- "${tmpdir}/"*/bootstrap/root.*/pkglist.*.txt | wc -l)"
;;
esac
} > "${_metrics}"
ls -lah "${_metrics}"
cat "${_metrics}"
print_section_end "metrics"
}
create_ephemeral_pgp_key() {
# create an ephemeral PGP key for signing the rootfs image
print_section_start "ephemeral_pgp_key" "Creating ephemeral PGP key"
gnupg_homedir="$tmpdir/.gnupg"
mkdir -p "${gnupg_homedir}"
chmod 700 "${gnupg_homedir}"
cat << __EOF__ > "${gnupg_homedir}"/gpg.conf
quiet
batch
no-tty
no-permission-warning
export-options no-export-attributes,export-clean
list-options no-show-keyring
armor
no-emit-version
__EOF__
gpg --homedir "${gnupg_homedir}" --gen-key <<EOF
%echo Generating ephemeral Arch Linux release engineering key pair...
Key-Type: default
Key-Length: 3072
Key-Usage: sign
Name-Real: Arch Linux Release Engineering
Name-Comment: Ephemeral Signing Key
Name-Email: arch-releng@lists.archlinux.org
Expire-Date: 0
%no-protection
%commit
%echo Done
EOF
pgp_key_id="$(
gpg --homedir "${gnupg_homedir}" \
--list-secret-keys \
--with-colons \
| awk -F':' '{if($1 ~ /sec/){ print $5 }}'
)"
pgp_sender="Arch Linux Release Engineering (Ephemeral Signing Key) <arch-releng@lists.archlinux.org>"
print_section_end "ephemeral_pgp_key"
}
create_ephemeral_codesigning_key() {
# create ephemeral certificates used for codesigning
print_section_start "ephemeral_codesigning_key" "Creating ephemeral codesigning key"
codesigning_dir="${tmpdir}/.codesigning/"
local codesigning_conf="${codesigning_dir}/openssl.cnf"
local codesigning_subj="/C=DE/ST=Berlin/L=Berlin/O=Arch Linux/OU=Release Engineering/CN=archlinux.org"
codesigning_cert="${codesigning_dir}/codesign.crt"
codesigning_key="${codesigning_dir}/codesign.key"
mkdir -p "${codesigning_dir}"
cp -- /etc/ssl/openssl.cnf "${codesigning_conf}"
printf "\n[codesigning]\nkeyUsage=digitalSignature\nextendedKeyUsage=codeSigning\n" >> "${codesigning_conf}"
openssl req \
-newkey rsa:4096 \
-keyout "${codesigning_key}" \
-nodes \
-sha256 \
-x509 \
-days 365 \
-out "${codesigning_cert}" \
-config "${codesigning_conf}" \
-subj "${codesigning_subj}" \
-extensions codesigning
print_section_end "ephemeral_codesigning_key"
}
run_mkarchiso() {
# run mkarchiso
create_ephemeral_pgp_key
create_ephemeral_codesigning_key
print_section_start "mkarchiso" "Running mkarchiso"
mkdir -p "${output}/" "${tmpdir}/"
GNUPGHOME="${gnupg_homedir}" ./archiso/mkarchiso \
-D "${install_dir}" \
-c "${codesigning_cert} ${codesigning_key}" \
-g "${pgp_key_id}" \
-G "${pgp_sender}" \
-o "${output}/" \
-w "${tmpdir}/" \
-m "${buildmode}" \
-v "configs/${profile}"
print_section_end "mkarchiso"
if [[ "${buildmode}" =~ "iso" ]]; then
create_zsync_delta "${output}/"*.iso
create_checksums "${output}/"*.iso
fi
if [[ "${buildmode}" == "bootstrap" ]]; then
create_zsync_delta "${output}/"*.tar*(.gz|.xz|.zst)
create_checksums "${output}/"*.tar*(.gz|.xz|.zst)
fi
create_metrics
print_section_start "ownership" "Setting ownership on output"
if [[ -n "${SUDO_UID:-}" ]] && [[ -n "${SUDO_GID:-}" ]]; then
chown -Rv "${SUDO_UID}:${SUDO_GID}" -- "${output}"
fi
print_section_end "ownership"
}
trap cleanup EXIT
run_mkarchiso

11
.shellcheckrc Normal file
View file

@ -0,0 +1,11 @@
# Suggest explicitly using -n in `[ $var ]`
enable=avoid-nullary-conditions
# Suggest 'command -v' instead of 'which'
enable=deprecate-which
# Suggest quoting variables without metacharacters
enable=quote-safe-variables
# Require [[ and warn about [ in Bash/Ksh
enable=require-double-brackets

View file

@ -2,37 +2,60 @@
Archiso Authors
===============
* 2hexed <2hexed@protonmail.com>
* Aaron Griffin <aaron@archlinux.org>
* Adam Purkrt <adam@purkrt.net>
* Alexander Epaneshnikov <aarnaarn2@gmail.com>
* Alexander Speshilov <speshuric@gmail.com>
* Anton Hvornum <anton@hvornum.se>
* Antonio V <crazysnob@live.it>
* Chandan Singh <cks071g2@gmail.com>
* Charles Vejnar <ce@vejnar.org>
* Christian Hesse <mail@eworm.de>
* Christopher Brannon <cmbrannon79@gmail.com>
* Dan McGee <dan@archlinux.org>
* Darren Ng <un1gfn@gmail.com>
* David Runge <dvzrv@archlinux.org>
* David Thurstenson <thurstylark@gmail.com>
* Dieter Plaetinck <dieter@plaetinck.be>
* Eli Schwartz <eschwartz@archlinux.org>
* Eric Toombs <567-ewtoombs@users.noreply.gitlab.archlinux.org>
* Florian Pritz <bluewind@xinu.at>
* Francois Dupoux <fdupoux@users.sourceforge.net>
* Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
* Gerhard Brauer <gerbra@archlinux.de>
* Giancarlo Razzolini <grazzolini@archlinux.org>
* Howard Hicks <deimosian@gmail.com>
* James Sitegen <jamesm.sitegen@gmail.com>
* John Lane <archlinux@jelmail.com>
* Jonathan Liu <net147@gmail.com>
* Jonathon Fernyhough <jonathon@m2x.dev>
* Justin Kromlinger <hashworks@archlinux.org>
* Keshav Amburay <the.ridikulus.rat@gmail.com>
* Kristian Klausen <kristian@klausen.dk>
* Loui Chang <louipc.ist@gmail.com>
* Lukas Fleischer <archlinux@cryptocrack.de>
* Martin Damian Fernandez <martin.damian.fernandez@gmail.com>
* Michael Gilchrist <michaelgilch@gmail.com>
* Michael Vorburger <mike@vorburger.ch>
* Pellegrino Prevete <pellegrinoprevete@gmail.com>
* Pierre Schmitz <pierre@archlinux.de>
* Sean Enck <enckse@voidedtech.com>
* Simo Leone <simo@archlinux.org>
* Simon Wilper <sxw@chronowerks.de>
* Sorin Pânca <sorin.panca@gmail.com>
* Steffen Bönigk <boenki@gmx.de>
* Sven-Hendrik Haase <svenstaro@gmail.com>
* Thomas Bächler <thomas@archlinux.org>
* Tobias Powalowski <tpowa@archlinux.org>
* Tom Yan <tom.ty89@gmail.com>
* Yu Li-Yu <afg984@gmail.com>
* Zig Globulin <zig@zigsystem.com>
* hayao <hayao@fascode.net>
* kojq su <3145-kojqsu@users.noreply.gitlab.archlinux.org>
* mono wock <aaronleemorrison@protonmail.com>
* nl6720 <nl6720@gmail.com>
* Øyvind Heggstad <heggstad@gmail.com>
* plain linen <bcdedit@hotmail.com>
* Pellegrino Prevete <pellegrinoprevete@gmail.com>
* shivanandvp <shivanandvp.oss@gmail.com>
* weltio weltio <weltio@web.de>
* Øyvind Heggstad <heggstad@gmail.com>

View file

@ -11,9 +11,359 @@ Added
Changed
-------
Deprecated
----------
Fixed
-----
Removed
-------
[82] - 2024-11-27
=================
Fixed
-----
- Commented out ``DownloadUser`` in ``pacman.conf`` so that the working directory is not restricted to paths to which
the ``alpm`` user has access to.
[81] - 2024-10-28
=================
Fixed
-----
- Change enabled services in baseline and releng profile to adapt to changes in ``cloud-init`` ≥ 24.3 (renamed
``cloud-init.service`` to ``cloud-init-network.service``, introduced new ``cloud-init-main.service``).
Removed
-------
- Removed gnu-netcat from releng profile, as cloud-init requires openbsd-netcat and the two netcat versions can not be
installed side-by-side.
[80] - 2024-09-26
=================
Added
-----
- Support compressing the bootstrap tarball with ``xz``.
Changed
-------
- Use an empty UUID for the EROFS image file since the file system will never be referenced by it.
- Do not use ``mkfs.erofs`` extended options ``fragments`` and ``dedupe`` in the baseline profile. This reduces the EROFS
image size and compression time.
- Update profile ``pacman.conf`` to include the new options added to ``/etc/pacman.conf`` in pacman 7.0.0.r3.g7736133-1.
Fixed
-----
- Show the correct image file name, including the extension, when building a bootstrap image.
Removed
-------
- Removed reiserfsprogs from packages (EOL)
[79] - 2024-07-25
=================
Fixed
-----
- When downloading an automation script fail with non-zero status code instead of returning an HTML document when the
remote HTTP server fails to deliver the document.
Removed
-------
- Remove unneeded workaround for e2fsprogs < 1.47.1.
[78] - 2024-05-23
=================
Changed
-------
- Moved the ``pkglist.x86_64.txt`` file outside the bootstrap tarball's ``root.x86_64`` directly to avoid polluting the
root file system.
- Use 4 MiB OVMF files in ``run_archiso`` instead of the old 2 MiB ones.
- Increase the additional free space of the EFI partition size from 1 MiB to 8 MiB to account for file system overhead
when using FAT32 (needs less than 1 MiB) and to give more space for adding custom files when repacking an ISO (e.g.
when preparing it for Secure Boot).
- Remove 300 KiB padding needed for CDs if the ISO exceeds the maximum size of a CD.
- Use ``xz -9e`` as the releng profile's initramfs compression. Now that mkinitcpio does not decompress the loadable
kernel modules and firmware files anymore and moves them to the early uncompressed initramfs, we can compress the main
initramfs image with a higher compression without it having much impact on the ISO build time.
- Format the EFI system partition image as FAT32 if the size allows it (i.e. if it is at least 36 MiB).
Fixed
-----
- Look for microcode update files in the initramfs images when checking if external microcode images are needed. The
existence of a ``early_cpio`` file is not enough since mkinitcpio can and will place other files in the early
uncompressed CPIO even when the ``microcode`` hook is not used.
Removed
-------
- Remove the wezterm-terminfo package from the releng profile as the relevant file is now provided by the ncurses
package instead.
[77] - 2024-04-21
=================
Added
-----
- Copy Memtest86+ EFI binary to the EFI system partition and ISO 9660 for ``uefi-x86.systemd-boot`` boot modes.
Additionally, create a boot entry with it for the releng profile.
Changed
-------
- Change releng profile's bootstrap tarball compression from gzip to zstd. zstd provides higher and faster compression.
- Use mkinitcpio's ``microcode`` hook instead of external microcode images to simplify boot loader configuration.
Custom PXE setups will need to update their boot loader configuration.
- Replace ``archisodevice`` boot parameter with ``archisosearchuuid`` in all boot loader configuration. This allows to
have "file system transposition" without relaying on GRUB-specific features.
- Replace GRUB with systemd-boot as the UEFI boot loader for the releng profile. While this increases the ISO size, it
avoids all GRUB-specific annoyances and oddities.
Fixed
-----
- Fix requirement validation logic for the ``uefi-ia32.systemd-boot.eltorito`` boot mode. It incorrectly applied the
same requirements as ``uefi-x64.systemd-boot.esp``.
[76] - 2024-03-30
=================
Added
-----
- Add a man page for ``mkarchiso``.
- Implement configurable bootstrap tarball compression. It is configured in ``profiledef.sh`` using a bash array called
``bootstrap_tarball_compression``. baseline tarball now uses zstd compression while releng remains with gzip for now.
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.
- Skip including external microcode images in build artifacts if the initramfs file contains ``early_cpio`` (indicating
an early uncompressed CPIO archive which should have the microcode update files).
Removed
-------
- Remove workaround for glibc < 2.39. ``LC_ALL=C.UTF-8`` now overrides ``LANGUAGE``, just like ``LC_ALL=C``.
[75] - 2024-01-24
=================
Added
-----
- Explicitly add ldns to releng (as opposed to it only being pulled in as a dependency of another package) to ensure
``drill`` remains available.
Changed
-------
- Update the releng ISO description to "Arch Linux Live/Rescue DVD" since the ISO size now exceeds the maximum size of
a CD (900 MiB).
Fixed
-----
- Update the location where ``mkarchiso`` looks for the memtest86+ license file.
[74] - 2023-12-21
=================
Added
-----
- Add bcachefs-tools to releng for access to bcachefs userspace tools.
- Add tftp as a valid protocol for downloading automated boot script.
Changed
-------
- Set ``RequiredForOnline=routable`` in systemd-networkd configuration files to improve the chances that the network
really is *online* when ``network-online.target`` is reached.
Fixed
-----
- Add missing replacement for the UUID variable in systemd-boot configuration files on ISO 9660.
[73] - 2023-09-29
=================
Added
-----
- Add bolt to releng for authorizing and otherwise managing Thunderbolt and USB4 devices.
- Add ``uefi-ia32.systemd-boot.esp`` and ``uefi-ia32.systemd-boot.eltorito`` boot modes that use systemd-boot for IA32
UEFI. The boot modes of baseline and releng are not changed.
- Add GRUB configuration file ``/boot/grub/loopback.cfg`` to the releng and baseline profiles. It sets the necessary
boot parameters required for booting the ISO image as a file on a file system.
Fixed
-----
- Add ``/etc/localtime`` to the baseline profile to ensure the ISO can be booted successfully without triggering
questions from systemd-firstboot.
[72] - 2023-08-29
=================
Added
-----
- Add tpm2-tools to releng to allow clearing, creating and reading keys on the TPM.
- Add sequoia-sq and openpgp-card-tools as additional tooling for working with OpenPGP certificates and smartcards.
Changed
-------
- Moved custom ``mkinitcpio.conf`` files to ``/etc/mkinitcpio.conf.d/archiso.conf``.
- Mount ``/etc/pacman.d/gnupg`` on tmpfs with option ``noswap`` instead of using ramfs. This ensures there is a limit to
the file system size.
- Enable systemd-networkd's support for IPv6 Privacy Extensions globally instead of per-connection.
- Moved custom ``sshd_config`` files to ``/ssh/sshd_config.d/10-archiso.conf``
- Use pcsclite for interfacing with smartcards, since both gnupg and opgpcard support it.
Fixed
-----
- Sign the root file system image only once.
- Make sure xorriso does not read its configuration files to prevent interference and unintended behavior.
[71] - 2023-05-28
=================
Added
-----
- Added classes for Memtest86+ and UEFI Shell menuentries.
- Add foot-terminfo and wezterm-terminfo packages to releng to support terminal emulators using them. E.g. when
installing via SSH.
- Add a new ``-r`` option to ``mkarchiso`` that deletes the working directly after the build.
- Add support for mDNS announce and resolve.
Changed
-------
- Increase EROFS compression for the baseline profile by using an extreme LZMA compression level and enabling the
experimental compressed fragments and data deduplication features.
- Identify the ISO volume via a UUID instead of a file system label in all boot loader configuration files.
- Update ``pacman.conf`` to match the one shipped with pacman 6.0.2-7 which removes the community repository.
Fixed
-----
- Wait for ``network-online.target`` to become active before trying to download the script passed via the ``script=``
boot parameter.
- Subdirectories from ``grub/`` are copied to the ISO.
- Modify the commandline options to a ``cp`` command in ``mkarchiso`` so that the entire script does not exit with
failure when a custom ``.bashrc`` file is supplied with the archiso configuration. This fix was needed after
**GNU Coreutils** recently changed the behaviour of the ``-n`` (or ``--no-clobber``) commandline option to the ``cp``
command.
- Ensure ``SOURCE_DATE_EPOCH`` is read from the ``build_date`` file before ``profiledef.sh`` is sourced to ensure the
variable has a correct value when used inside ``profiledef.sh``.
[70] - 2023-02-27
=================
Added
-----
- Support *file system transposition* to simplify boot medium preparation for UEFI boot via extracting the ISO image
contents to a drive. ``grub.cfg`` does not hardcode the ISO volume label anymore, instead GRUB will search for volume
with a ``/boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid`` file on it.
- Preload GRUB's NTFS modules for UEFI that allegedly have native NTFS support. GRUB's exFAT and UDF modules are also
preloaded in case someone finds them useful.
Changed
-------
- Identify the ISO volume via a UUID instead of a file system label to avoid collisions of multiple ISOs created in the
same month.
- Honor ``SOURCE_DATE_EPOCH`` in the ``date`` command used by ``profiledef.sh`` of the shipped profiles.
- Do not duplicate ``grub.cfg`` in both ISO 9660 and the EFI system partition / El Torito image. GRUB will search for
the ISO volume and load the ``grub.cfg`` from there.
- Moved GRUB files on ISO 9660 from ``/EFI/BOOT/`` to a boot-platform neutral place ``/boot/grub/``. This does not apply
to the EFI binaries that remain in the default/fallback boot path.
- Move ``grubenv`` to ``/boot/grub/grubenv`` on ISO 9660 so that it is together with the rest of GRUB-specific files.
Additionally write more variables in it. The previous ``/${install_dir}/grubenv`` (``/arch/grubenv`` for releng)
is deprecated and a future archiso release will not create this file anymore.
- Moved syslinux directory from ``/syslinux/`` to ``/boot/syslinux/`` to keep most boot loader files in ``/boot/``.
- Update ``README.transfer`` documentation and convert it to reStructuredText.
- Use ``console`` as grub's ``terminal_output``, as ``gfxterm`` leads to a blank screen on some hardware.
Removed
-------
- Do not place memtest86+ in netboot artifacts.
[69] - 2022-12-24
=================
Added
-----
- Add Memtest86+ to x86_64 UEFI GRUB boot menu.
Changed
-------
- Check if the GPG public key file was successfully placed in the work directory before trying to use it.
- Open the file descriptors for code signing certificates and GPG public key as read only. Nothing from the within the
``pacstrap`` invoked chroot should ever be allowed to write outside of it.
- Error out early if any of the code signing certificate files passed with option ``-c`` do not exist.
- Use LZMA compressed EROFS image for the baseline profile. Now that xz 5.4 is out and erofs-utils is built with LZMA
support, using a higher compression is possible.
- Add ``/etc/machine-id`` with special value ``uninitialized``. The final id is generated at boot time, and systemd's
first-boot mechanim (see ``First Boot Semantics`` in ``machine-id(5)``) applies. No functional change unless that
``ConditionFirstBoot=yes`` is true and passive unit ``first-boot-complete.target`` activates for ordering.
[68] - 2022-10-30
=================
Changed
-------
- Do not explicitly enable ``qemu-guest-agent.service`` as it will be started by a udev rule.
- Remove existing signature (``.sig``) files and do not sign them when signing netboot artifacts. This is mostly
applicable when re-running ``mkarchiso`` after a failure.
- Replace ``archiso_kms`` with ``kms`` in ``mkinitcpio.conf``. The hook is available in mkinitcpio since version 32.
[67] - 2022-09-25
=================
Added
-----
- The ability to generate rootfs signatures using openssl CMS module if ``-c`` is given.
Changed
-------
- Order ``pacman-init.service`` before ``archlinux-keyring-wkd-sync.service`` since
``archlinux-keyring-wkd-sync.service`` needs an initialized pacman keyring.
- Order ``pacman-init.service`` after ``time-sync.target`` since ``pacman-init.service`` may otherwise create local
signatures that are not valid on target systems after installation.
[66] - 2022-08-28
=================
@ -53,6 +403,8 @@ Removed
- Remove the custom pacman hook that ran ``locale-gen`` on glibc install from the releng profile. The used locale now
ships with the glibc package itself.
- Remove "Copy to RAM" boot entries since the ``archiso`` mkinitcpio hook enables it automatically when there is enough
free RAM.
[64] - 2022-05-30
=================
@ -191,7 +543,7 @@ Removed
-------
- Remove all files related to ``mkinitcpio`` integration, as they now live in
https://gitlab.archlinux.org/mkinitcpio/mkinitcpio-archiso
https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio-archiso
[57] - 2021-07-30
=================

View file

@ -4,11 +4,13 @@
PREFIX ?= /usr/local
BIN_DIR=$(DESTDIR)$(PREFIX)/bin
DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/archiso
MAN_DIR?=$(DESTDIR)$(PREFIX)/share/man
PROFILE_DIR=$(DESTDIR)$(PREFIX)/share/archiso
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
SCRIPT_FILES=$(wildcard archiso/*) $(wildcard scripts/*.sh) $(wildcard .gitlab/ci/*.sh) \
$(wildcard configs/*/profiledef.sh) $(wildcard configs/*/airootfs/usr/local/bin/*)
VERSION?=$(shell git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g;s/\.r0\.g.*//')
all:
@ -17,7 +19,7 @@ check: shellcheck
shellcheck:
shellcheck -s bash $(SCRIPT_FILES)
install: install-scripts install-profiles install-doc
install: install-scripts install-profiles install-doc install-man
install-scripts:
install -vDm 755 archiso/mkarchiso -t "$(BIN_DIR)/"
@ -30,4 +32,9 @@ install-profiles:
install-doc:
install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
.PHONY: check install install-doc install-profiles install-scripts shellcheck
install-man:
@printf '.. |version| replace:: %s\n' '$(VERSION)' > man/version.rst
install -d -m 755 $(MAN_DIR)/man1
rst2man man/mkarchiso.1.rst $(MAN_DIR)/man1/mkarchiso.1
.PHONY: check install install-doc install-man install-profiles install-scripts shellcheck

View file

@ -3,7 +3,7 @@ archiso
=======
The archiso project features scripts and configuration templates to build installation media (*.iso* images and
*.tar.gz* bootstrap images) as well as netboot artifacts for BIOS and UEFI based systems on the x86_64 architecture.
*.tar bootstrap images) as well as netboot artifacts for BIOS and UEFI based systems on the x86_64 architecture.
Currently creating the images is only supported on Arch Linux but may work on other operating systems as well.
Requirements
@ -36,6 +36,10 @@ For linting the shell scripts the following package is required:
* shellcheck
For generating the man pages:
* python-docutils
Profiles
========
@ -129,7 +133,7 @@ boot the iso image from GRUB with a version specific cow directory to mitigate o
.. code:: sh
loopback loop archlinux.iso
load_env -f (loop)/arch/grubenv
load_env -f (loop)/boot/grub/grubenv
linux (loop)/arch/boot/x86_64/vmlinuz-linux ... \
cow_directory=${NAME}/${VERSION} ...
initrd (loop)/arch/boot/x86_64/initramfs-linux-lts.img
@ -139,14 +143,14 @@ Contribute
Development of archiso takes place on Arch Linux' Gitlab: https://gitlab.archlinux.org/archlinux/archiso.
Please read our distribution-wide `Code of Conduct <https://wiki.archlinux.org/title/Code_of_conduct>`_ before
Please read our distribution-wide `Code of Conduct <https://terms.archlinux.org/docs/code-of-conduct/>`_ before
contributing, to understand what actions will and will not be tolerated.
Read our `contributing guide <CONTRIBUTING.rst>`_ to learn more about how to provide fixes or improvements for the code
base.
Discussion around archiso takes place on the `arch-releng mailing list
<https://lists.archlinux.org/listinfo/arch-releng>`_ and in `#archlinux-releng
<https://lists.archlinux.org/mailman3/lists/arch-releng.lists.archlinux.org/>`_ and in `#archlinux-releng
<ircs://irc.libera.chat/archlinux-releng>`_ on `Libera Chat <https://libera.chat/>`_.
All past and present authors of archiso are listed in `AUTHORS <AUTHORS.rst>`_.
@ -156,7 +160,7 @@ Releases
`Releases of archiso <https://gitlab.archlinux.org/archlinux/archiso/-/tags>`_ are created by their current maintainers
- `David Runge <https://gitlab.archlinux.org/dvzrv>`_ (``C7E7849466FE2358343588377258734B41C31549``)
- `David Runge <https://gitlab.archlinux.org/dvzrv>`_ (``991F6E3F0765CF6295888586139B09DA5BF0D338``)
- `nl6720 <https://gitlab.archlinux.org/nl6720>`_ (``BB8E6F1B81CF0BB301D74D1CBF425A01E68B38EF``)
Tags are signed using respective PGP keys.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
/usr/share/zoneinfo/UTC

View file

@ -1,67 +0,0 @@
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(piix ide_disk reiserfs)
MODULES=()
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=()
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect block filesystems)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev block filesystems)
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS=(base udev block mdadm encrypt filesystems)
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS=(base udev block lvm2 filesystems)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS=(base udev modconf archiso block filesystems)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
#COMPRESSION="zstd"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

View file

@ -0,0 +1 @@
HOOKS=(base udev modconf archiso block filesystems)

View file

@ -3,6 +3,6 @@
PRESETS=('archiso')
ALL_kver='/boot/vmlinuz-linux'
ALL_config='/etc/mkinitcpio.conf'
archiso_config='/etc/mkinitcpio.conf.d/archiso.conf'
archiso_image="/boot/initramfs-linux.img"

View file

@ -1,116 +0,0 @@
# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#KbdInteractiveAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the KbdInteractiveAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via KbdInteractiveAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and KbdInteractiveAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no # pam does that
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server

View file

@ -0,0 +1,3 @@
# Allow root login using password authentication
PasswordAuthentication yes
PermitRootLogin yes

View file

@ -0,0 +1,2 @@
[Network]
IPv6PrivacyExtensions=yes

View file

@ -5,6 +5,9 @@
Name=en*
Name=eth*
[Link]
RequiredForOnline=routable
[Network]
DHCP=yes
IPv6PrivacyExtensions=yes
MulticastDNS=yes

View file

@ -0,0 +1,4 @@
# Default systemd-resolved configuration for archiso
[Resolve]
MulticastDNS=yes

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/cloud-init-main.service

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/cloud-init-network.service

View file

@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init.service

View file

@ -1 +0,0 @@
/usr/lib/systemd/system/qemu-guest-agent.service

View file

@ -1,4 +1,4 @@
title Arch Linux (x86_64, UEFI)
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%

View file

@ -1,4 +0,0 @@
title Arch Linux (x86_64, UEFI) Copy to RAM
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram

View file

@ -3,23 +3,46 @@ insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
insmod ntfs
insmod ntfscomp
insmod exfat
insmod udf
# Use graphics-mode output
insmod all_video
insmod font
if loadfont "${prefix}/fonts/unicode.pf2" ; then
insmod gfxterm
insmod all_video
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
terminal_output console
fi
# Enable serial console
insmod serial
insmod usbserial_common
insmod usbserial_ftdi
insmod usbserial_pl2303
insmod usbserial_usbdebug
if serial --unit=0 --speed=115200; then
terminal_input --append serial
terminal_output --append serial
fi
# Get a human readable platform identifier
if [ "${grub_platform}" == 'efi' ]; then
archiso_platform='UEFI'
if [ "${grub_cpu}" == 'x86_64' ]; then
archiso_platform="x64 ${archiso_platform}"
elif [ "${grub_cpu}" == 'i386' ]; then
archiso_platform="IA32 ${archiso_platform}"
else
archiso_platform="${grub_cpu} ${archiso_platform}"
fi
elif [ "${grub_platform}" == 'pc' ]; then
archiso_platform='BIOS'
else
archiso_platform="${grub_cpu} ${grub_platform}"
fi
# Set default menu entry
default=archlinux
timeout=15
@ -28,16 +51,46 @@ timeout_style=menu
# Menu entries
menuentry "Arch Linux (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
menuentry "Arch Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
set gfxpayload=keep
search --no-floppy --set=root --label %ARCHISO_LABEL%
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
menuentry "Arch Linux (x86_64, UEFI) Copy to RAM" --class arch --class gnu-linux --class gnu --class os --id 'archlinux-copy-to-ram' {
set gfxpayload=keep
search --no-floppy --set=root --label %ARCHISO_LABEL%
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest.efi
}
fi
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest
}
fi
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
menuentry 'UEFI Shell' {
chainloader /shellx64.efi
}
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
menuentry 'UEFI Shell' {
chainloader /shellia32.efi
}
fi
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
fwsetup
}
fi
menuentry 'System shutdown' --class shutdown --class poweroff {
echo 'System shutting down...'
halt
}
menuentry 'System restart' --class reboot --class restart {
echo 'System rebooting...'
reboot
}

View file

@ -0,0 +1,73 @@
# https://www.supergrubdisk.org/wiki/Loopback.cfg
# Search for the ISO volume
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
# Get a human readable platform identifier
if [ "${grub_platform}" == 'efi' ]; then
archiso_platform='UEFI'
if [ "${grub_cpu}" == 'x86_64' ]; then
archiso_platform="x64 ${archiso_platform}"
elif [ "${grub_cpu}" == 'i386' ]; then
archiso_platform="IA32 ${archiso_platform}"
else
archiso_platform="${grub_cpu} ${archiso_platform}"
fi
elif [ "${grub_platform}" == 'pc' ]; then
archiso_platform='BIOS'
else
archiso_platform="${grub_cpu} ${grub_platform}"
fi
# Set default menu entry
default=archlinux
timeout=15
timeout_style=menu
# Menu entries
menuentry "Arch Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest.efi
}
fi
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest
}
fi
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
menuentry 'UEFI Shell' {
chainloader /shellx64.efi
}
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
menuentry 'UEFI Shell' {
chainloader /shellia32.efi
}
fi
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
fwsetup
}
fi
menuentry 'System shutdown' --class shutdown --class poweroff {
echo 'System shutting down...'
halt
}
menuentry 'System restart' --class reboot --class restart {
echo 'System rebooting...'
reboot
}

View file

@ -36,6 +36,8 @@ Architecture = auto
#CheckSpace
#VerbosePkgLists
ParallelDownloads = 5
#DownloadUser = alpm
#DisableSandbox
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
@ -70,19 +72,16 @@ LocalFileSigLevel = Optional
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
#[testing]
#[core-testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#[extra-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
[extra]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,

View file

@ -2,10 +2,10 @@
# shellcheck disable=SC2034
iso_name="archlinux-baseline"
iso_label="ARCH_$(date +%Y%m)"
iso_label="ARCH_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
iso_publisher="Arch Linux <https://archlinux.org>"
iso_application="Arch Linux baseline"
iso_version="$(date +%Y.%m.%d)"
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
install_dir="arch"
buildmodes=('iso')
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
@ -14,7 +14,8 @@ bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
arch="x86_64"
pacman_conf="pacman.conf"
airootfs_image_type="erofs"
airootfs_image_tool_options=('-zlz4hc,12' -E ztailpacking)
airootfs_image_tool_options=('-zlzma,109' -E 'ztailpacking')
bootstrap_tarball_compression=(zstd -c -T0 --long -19)
file_permissions=(
["/etc/shadow"]="0:0:400"
)

View file

@ -2,10 +2,4 @@ LABEL arch
MENU LABEL Arch Linux (x86_64, BIOS)
LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
LABEL arch-ram
MENU LABEL Arch Linux (x86_64, BIOS) Copy to RAM
LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%

View file

@ -1,67 +0,0 @@
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(piix ide_disk reiserfs)
MODULES=()
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=()
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect block filesystems)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev block filesystems)
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS=(base udev block mdadm encrypt filesystems)
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS=(base udev block lvm2 filesystems)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS=(base udev modconf memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block filesystems keyboard)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
#COMPRESSION="zstd"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

View file

@ -0,0 +1,3 @@
HOOKS=(base udev microcode modconf kms memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs block filesystems keyboard)
COMPRESSION="xz"
COMPRESSION_OPTIONS=(-9e)

View file

@ -3,6 +3,6 @@
PRESETS=('archiso')
ALL_kver='/boot/vmlinuz-linux'
ALL_config='/etc/mkinitcpio.conf'
archiso_config='/etc/mkinitcpio.conf.d/archiso.conf'
archiso_image="/boot/initramfs-linux.img"

View file

@ -1,116 +0,0 @@
# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#KbdInteractiveAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the KbdInteractiveAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via KbdInteractiveAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and KbdInteractiveAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no # pam does that
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server

View file

@ -0,0 +1,3 @@
# Allow root login using password authentication
PasswordAuthentication yes
PermitRootLogin yes

View file

@ -0,0 +1,2 @@
[Network]
IPv6PrivacyExtensions=yes

View file

@ -5,9 +5,12 @@
Name=en*
Name=eth*
[Link]
RequiredForOnline=routable
[Network]
DHCP=yes
IPv6PrivacyExtensions=yes
MulticastDNS=yes
# systemd-networkd does not set per-interface-type default route metrics
# https://github.com/systemd/systemd/issues/17698

View file

@ -1,9 +1,12 @@
[Match]
Name=wl*
[Link]
RequiredForOnline=routable
[Network]
DHCP=yes
IPv6PrivacyExtensions=yes
MulticastDNS=yes
# systemd-networkd does not set per-interface-type default route metrics
# https://github.com/systemd/systemd/issues/17698

View file

@ -1,9 +1,11 @@
[Match]
Name=ww*
[Link]
RequiredForOnline=routable
[Network]
DHCP=yes
IPv6PrivacyExtensions=yes
# systemd-networkd does not set per-interface-type default route metrics
# https://github.com/systemd/systemd/issues/17698

View file

@ -0,0 +1,4 @@
# Default systemd-resolved configuration for archiso
[Resolve]
MulticastDNS=yes

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/cloud-init-main.service

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/cloud-init-network.service

View file

@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init.service

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-timesyncd.service

View file

@ -2,7 +2,7 @@
Description=Temporary /etc/pacman.d/gnupg directory
[Mount]
What=ramfs
What=tmpfs
Where=/etc/pacman.d/gnupg
Type=ramfs
Options=mode=0755
Type=tmpfs
Options=mode=0755,noswap

View file

@ -0,0 +1 @@
../pacman-init.service

View file

@ -1 +0,0 @@
/usr/lib/systemd/system/qemu-guest-agent.service

View file

@ -0,0 +1,15 @@
[Unit]
Description=Initializes Pacman keyring
Requires=etc-pacman.d-gnupg.mount
After=etc-pacman.d-gnupg.mount time-sync.target
BindsTo=etc-pacman.d-gnupg.mount
Before=archlinux-keyring-wkd-sync.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/pacman-key --init
ExecStart=/usr/bin/pacman-key --populate
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/pcscd.socket

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-time-wait-sync.service

View file

@ -0,0 +1 @@
/usr/lib/systemd/system/systemd-timesyncd.service

View file

@ -1,22 +1,29 @@
#!/usr/bin/env bash
script_cmdline ()
{
script_cmdline() {
local param
for param in $(< /proc/cmdline); do
for param in $(</proc/cmdline); do
case "${param}" in
script=*) echo "${param#*=}" ; return 0 ;;
script=*)
echo "${param#*=}"
return 0
;;
esac
done
}
automated_script ()
{
automated_script() {
local script rt
script="$(script_cmdline)"
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then
curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script >/dev/null
if [[ "${script}" =~ ^((http|https|ftp|tftp)://) ]]; then
# there's no synchronization for network availability before executing this script
printf '%s: waiting for network-online.target\n' "$0"
until systemctl --quiet is-active network-online.target; do
sleep 1
done
printf '%s: downloading %s\n' "$0" "${script}"
curl "${script}" --location --retry-connrefused --retry 10 --fail -s -o /tmp/startup_script
rt=$?
else
cp "${script}" /tmp/startup_script
@ -24,6 +31,9 @@ automated_script ()
fi
if [[ ${rt} -eq 0 ]]; then
chmod +x /tmp/startup_script
printf '%s: executing automated script\n' "$0"
# note that script is executed when other services (like pacman-init) may be still in progress, please
# synchronize to "systemctl is-system-running --wait" when your script depends on other services
/tmp/startup_script
fi
fi

View file

@ -0,0 +1,4 @@
disable-ccid
disable-pinpad
pcsc-driver /usr/lib/libpcsclite.so
pcsc-shared

View file

@ -1,5 +1,5 @@
# fix for screen readers
if grep -Fq 'accessibility=' /proc/cmdline &> /dev/null; then
if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then
setopt SINGLE_LINE_ZLE
fi

View file

@ -4,21 +4,22 @@
get_cmdline() {
local param
for param in $(< /proc/cmdline); do
for param in $(</proc/cmdline); do
case "${param}" in
$1=*) echo "${param##*=}";
return 0
;;
"${1}="*)
echo "${param##*=}"
return 0
;;
esac
done
}
mirror=$(get_cmdline mirror)
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
[[ $mirror ]] || exit 0
mirror="$(get_cmdline mirror)"
[[ "$mirror" == 'auto' ]] && mirror="$(get_cmdline archiso_http_srv)"
[[ -n "$mirror" ]] || exit 0
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
cat >/etc/pacman.d/mirrorlist << EOF
cat >/etc/pacman.d/mirrorlist <<EOF
#
# Arch Linux repository mirrorlist
# Generated by archiso

View file

@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
usage() {
cat <<- _EOF_
cat <<-_EOF_
live cd sound helper script.
Usage: livecdsound [OPTION]
OPTIONS
@ -14,14 +14,13 @@ usage() {
_EOF_
}
bugout () {
bugout() {
printf "/usr/local/bin/livecdsound: programming error"
stat_fail
}
echo_card_indices()
{
if [ -f /proc/asound/cards ] ; then
echo_card_indices() {
if [[ -f /proc/asound/cards ]]; then
sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards
fi
}
@ -33,8 +32,8 @@ echo_card_indices()
# $1 <card id>
# $2 <control>
# $3 <level>
unmute_and_set_level(){
{ [ "$3" ] &&[ "$2" ] && [ "$1" ] ; } || bugout
unmute_and_set_level() {
[[ -n "$3" && -n "$2" && -n "$1" ]] || bugout
systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3"
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute
return 0
@ -42,9 +41,8 @@ unmute_and_set_level(){
# $1 <card id>
# $2 <control>
mute_and_zero_level()
{
{ [ "$1" ] && [ "$2" ] ; } || bugout
mute_and_zero_level() {
[[ -n "$1" && -n "$2" ]] || bugout
systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1"
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute
return 0
@ -53,17 +51,15 @@ mute_and_zero_level()
# $1 <card ID>
# $2 <control>
# $3 "on" | "off"
switch_control()
{
{ [ "$3" ] && [ "$1" ] ; } || bugout
switch_control() {
[[ -n "$3" && -n "$1" ]] || bugout
systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3"
systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3"
return 0
}
# $1 <card ID>
sanify_levels_on_card()
{
sanify_levels_on_card() {
unmute_and_set_level "$1" "Front" "80%"
unmute_and_set_level "$1" "Master" "80%"
unmute_and_set_level "$1" "Master Mono" "80%"
@ -134,94 +130,89 @@ sanify_levels_on_card()
}
# $1 <card ID> | "all"
sanify_levels()
{
sanify_levels() {
local ttsdml_returnstatus=0
local card
case "$1" in
all)
for card in $(echo_card_indices) ; do
sanify_levels_on_card "$card" || ttsdml_returnstatus=1
done
;;
*)
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
;;
all)
for card in $(echo_card_indices); do
sanify_levels_on_card "$card" || ttsdml_returnstatus=1
done
;;
*)
sanify_levels_on_card "$1" || ttsdml_returnstatus=1
;;
esac
return $ttsdml_returnstatus
return "$ttsdml_returnstatus"
}
# List all cards that *should* be usable for PCM audio. In my experience,
# the console speaker (handled by the pcsp driver) isn't a suitable playback
# device, so we'll exclude it.
list_non_pcsp_cards()
{
list_non_pcsp_cards() {
for card in $(echo_card_indices); do
local cardfile="/proc/asound/card${card}/id"
if [ -r "$cardfile" ] && [ -f "$cardfile" ] && \
[ "$(cat "$cardfile")" != pcsp ]; then
if [[ -r "$cardfile" && -f "$cardfile" && "$(cat "$cardfile")" != pcsp ]]; then
echo "$card"
fi
done
}
# Properly initialize the sound card so that we have audio at boot.
unmute_all_cards()
{
unmute_all_cards() {
sanify_levels all
}
is_numeric() {
local str=$1
local str="$1"
[[ "$str" =~ ^[0-9]+$ ]]
}
set_default_card() {
local card=$1
sed -e "s/%card%/$card/g" < /usr/local/share/livecd-sound/asound.conf.in \
> /etc/asound.conf
local card="$1"
sed -e "s/%card%/$card/g" </usr/local/share/livecd-sound/asound.conf.in \
>/etc/asound.conf
}
play_on_card() {
local card=$1 file=$2
local card="$1" file="$2"
aplay -q "-Dplughw:$card,0" "$file"
}
# If there are multiple usable sound cards, prompt the user to choose one,
# using auditory feedback.
pick_a_card()
{
pick_a_card() {
set -f
usable_cards="$(list_non_pcsp_cards)"
num_usable_cards="$(wc -w <<< "$usable_cards")"
num_usable_cards="$(wc -w <<<"$usable_cards")"
if [ "$num_usable_cards" -eq 1 ]; then
if (( num_usable_cards == 1 )); then
systemd-cat -t "livecdsound" printf "Only one sound card is detected\n"
exit 0
fi
systemd-cat -t "livecdsound" printf "multiple sound cards detected\n"
for card in $usable_cards; do
for card in "${usable_cards[@]}"; do
if ! is_numeric "$card"; then
continue
fi
play_on_card "$card" /usr/share/livecd-sounds/pick-a-card.wav&
play_on_card "$card" /usr/share/livecd-sounds/pick-a-card.wav &
done
wait
sleep 1
for card in $usable_cards; do
for card in "${usable_cards[@]}"; do
if ! is_numeric "$card"; then
continue
fi
play_on_card "$card" /usr/share/livecd-sounds/beep.wav
if read -r -t 10; then
systemd-cat -t "livecdsound" printf "Selecting %s sound card as default\n" "$card"
set_default_card "$card"
break
fi
done
fi
play_on_card "$card" /usr/share/livecd-sounds/beep.wav
if read -r -t 10; then
systemd-cat -t "livecdsound" printf "Selecting %s sound card as default\n" "$card"
set_default_card "$card"
break
fi
done
}
if [[ $# -eq 0 ]]; then
if (( $# == 0 )); then
echo "error: No argument passed."
exit 1
fi

View file

@ -1,7 +1,5 @@
title Arch Linux install medium (x86_64, UEFI)
sort-key 01
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/intel-ucode.img
initrd /%INSTALL_DIR%/boot/amd-ucode.img
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%

View file

@ -1,7 +1,5 @@
title Arch Linux install medium (x86_64, UEFI) with speech
sort-key 02
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/intel-ucode.img
initrd /%INSTALL_DIR%/boot/amd-ucode.img
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% accessibility=on
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on

View file

@ -0,0 +1,3 @@
title Memtest86+
sort-key 03
efi /boot/memtest86+/memtest.efi

View file

@ -1,7 +0,0 @@
title Arch Linux install medium (x86_64, UEFI, Copy to RAM)
sort-key 03
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/intel-ucode.img
initrd /%INSTALL_DIR%/boot/amd-ucode.img
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram

View file

@ -1,7 +0,0 @@
title Arch Linux install medium (x86_64, UEFI, Copy to RAM) with speech
sort-key 04
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/intel-ucode.img
initrd /%INSTALL_DIR%/boot/amd-ucode.img
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram accessibility=on

View file

@ -3,58 +3,86 @@ insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
insmod ntfs
insmod ntfscomp
insmod exfat
insmod udf
# Use graphics-mode output
insmod all_video
insmod font
if loadfont "${prefix}/fonts/unicode.pf2" ; then
insmod gfxterm
insmod all_video
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
terminal_output console
fi
# Enable serial console
insmod serial
insmod usbserial_common
insmod usbserial_ftdi
insmod usbserial_pl2303
insmod usbserial_usbdebug
if serial --unit=0 --speed=115200; then
terminal_input --append serial
terminal_output --append serial
fi
# Get a human readable platform identifier
if [ "${grub_platform}" == 'efi' ]; then
archiso_platform='UEFI'
if [ "${grub_cpu}" == 'x86_64' ]; then
archiso_platform="x64 ${archiso_platform}"
elif [ "${grub_cpu}" == 'i386' ]; then
archiso_platform="IA32 ${archiso_platform}"
else
archiso_platform="${grub_cpu} ${archiso_platform}"
fi
elif [ "${grub_platform}" == 'pc' ]; then
archiso_platform='BIOS'
else
archiso_platform="${grub_cpu} ${grub_platform}"
fi
# Set default menu entry
default=archlinux
timeout=15
timeout_style=menu
# GRUB init tune for accessibility
play 600 988 1 1319 4
# Menu entries
menuentry "Arch Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
menuentry "Arch Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
set gfxpayload=keep
search --no-floppy --set=root --label %ARCHISO_LABEL%
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
menuentry "Arch Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
menuentry "Arch Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
set gfxpayload=keep
search --no-floppy --set=root --label %ARCHISO_LABEL%
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% accessibility=on
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
if [ "${grub_platform}" == "efi" ]; then
if [ "${grub_cpu}" == "x86_64" ]; then
menuentry "UEFI Shell" {
insmod chain
search --no-floppy --set=root --label %ARCHISO_LABEL%
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest.efi
}
fi
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest
}
fi
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellx64.efi
}
elif [ "${grub_cpu}" == "i386" ]; then
menuentry "UEFI Shell" {
insmod chain
search --no-floppy --set=root --label %ARCHISO_LABEL%
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellia32.efi
}
fi
@ -64,12 +92,16 @@ if [ "${grub_platform}" == "efi" ]; then
}
fi
menuentry "System shutdown" --class shutdown --class poweroff {
echo "System shutting down..."
menuentry 'System shutdown' --class shutdown --class poweroff {
echo 'System shutting down...'
halt
}
menuentry "System restart" --class reboot --class restart {
echo "System rebooting..."
menuentry 'System restart' --class reboot --class restart {
echo 'System rebooting...'
reboot
}
# GRUB init tune for accessibility
play 600 988 1 1319 4

View file

@ -0,0 +1,80 @@
# https://www.supergrubdisk.org/wiki/Loopback.cfg
# Search for the ISO volume
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
# Get a human readable platform identifier
if [ "${grub_platform}" == 'efi' ]; then
archiso_platform='UEFI'
if [ "${grub_cpu}" == 'x86_64' ]; then
archiso_platform="x64 ${archiso_platform}"
elif [ "${grub_cpu}" == 'i386' ]; then
archiso_platform="IA32 ${archiso_platform}"
else
archiso_platform="${grub_cpu} ${archiso_platform}"
fi
elif [ "${grub_platform}" == 'pc' ]; then
archiso_platform='BIOS'
else
archiso_platform="${grub_cpu} ${grub_platform}"
fi
# Set default menu entry
default=archlinux
timeout=15
timeout_style=menu
# Menu entries
menuentry "Arch Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
menuentry "Arch Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest.efi
}
fi
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest
}
fi
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellx64.efi
}
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellia32.efi
}
fi
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
fwsetup
}
fi
menuentry 'System shutdown' --class shutdown --class poweroff {
echo 'System shutting down...'
halt
}
menuentry 'System restart' --class reboot --class restart {
echo 'System rebooting...'
reboot
}

View file

@ -4,7 +4,9 @@ arch-install-scripts
archinstall
b43-fwcutter
base
bcachefs-tools
bind
bolt
brltty
broadcom-wl
btrfs-progs
@ -28,8 +30,8 @@ ethtool
exfatprogs
f2fs-tools
fatresize
foot-terminfo
fsarchiver
gnu-netcat
gpart
gpm
gptfdisk
@ -38,13 +40,12 @@ grub
hdparm
hyperv
intel-ucode
ipw2100-fw
ipw2200-fw
irssi
iw
iwd
jfsutils
kitty-terminfo
ldns
less
lftp
libfido2
@ -62,6 +63,7 @@ man-pages
mc
mdadm
memtest86+
memtest86+-efi
mkinitcpio
mkinitcpio-archiso
mkinitcpio-nfs-utils
@ -78,6 +80,7 @@ nvme-cli
open-iscsi
open-vm-tools
openconnect
openpgp-card-tools
openssh
openvpn
partclone
@ -90,12 +93,12 @@ pv
qemu-guest-agent
refind
reflector
reiserfsprogs
rp-pppoe
rsync
rxvt-unicode-terminfo
screen
sdparm
sequoia-sq
sg3_utils
smartmontools
sof-firmware
@ -107,6 +110,7 @@ tcpdump
terminus-font
testdisk
tmux
tpm2-tools
tpm2-tss
udftools
usb_modeswitch

View file

@ -36,6 +36,8 @@ Architecture = auto
#CheckSpace
#VerbosePkgLists
ParallelDownloads = 5
#DownloadUser = alpm
#DisableSandbox
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
@ -70,19 +72,16 @@ LocalFileSigLevel = Optional
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
#[testing]
#[core-testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#[extra-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
[extra]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,

View file

@ -2,23 +2,25 @@
# shellcheck disable=SC2034
iso_name="archlinux"
iso_label="ARCH_$(date +%Y%m)"
iso_label="ARCH_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
iso_publisher="Arch Linux <https://archlinux.org>"
iso_application="Arch Linux Live/Rescue CD"
iso_version="$(date +%Y.%m.%d)"
iso_application="Arch Linux Live/Rescue DVD"
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
install_dir="arch"
buildmodes=('iso')
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
'uefi-ia32.grub.esp' 'uefi-x64.grub.esp'
'uefi-ia32.grub.eltorito' 'uefi-x64.grub.eltorito')
'uefi-ia32.systemd-boot.esp' 'uefi-x64.systemd-boot.esp'
'uefi-ia32.systemd-boot.eltorito' 'uefi-x64.systemd-boot.eltorito')
arch="x86_64"
pacman_conf="pacman.conf"
airootfs_image_type="squashfs"
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
file_permissions=(
["/etc/shadow"]="0:0:400"
["/root"]="0:0:750"
["/root/.automated_script.sh"]="0:0:755"
["/root/.gnupg"]="0:0:700"
["/usr/local/bin/choose-mirror"]="0:0:755"
["/usr/local/bin/Installation_guide"]="0:0:755"
["/usr/local/bin/livecd-sound"]="0:0:755"

View file

@ -12,7 +12,7 @@ MENU CMDLINEROW 14
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
# Refer to https://wiki.syslinux.org/wiki/index.php/Comboot/menu.c32
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std

View file

@ -5,8 +5,8 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, NBD)
LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
INITRD ::/%INSTALL_DIR%/boot/intel-ucode.img,::/%INSTALL_DIR%/boot/amd-ucode.img,::/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} checksum verify
INITRD ::/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% archiso_nbd_srv=${pxeserver} cms_verify=y
SYSAPPEND 3
LABEL arch64_nfs
@ -16,8 +16,8 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, NFS)
LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
INITRD ::/%INSTALL_DIR%/boot/intel-ucode.img,::/%INSTALL_DIR%/boot/amd-ucode.img,::/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt checksum verify
INITRD ::/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt cms_verify=y
SYSAPPEND 3
LABEL arch64_http
@ -27,6 +27,6 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, HTTP)
LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
INITRD ::/%INSTALL_DIR%/boot/intel-ucode.img,::/%INSTALL_DIR%/boot/amd-ucode.img,::/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ checksum verify
INITRD ::/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ cms_verify=y
SYSAPPEND 3

View file

@ -5,8 +5,8 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, BIOS)
LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
INITRD /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%
# Accessibility boot option
LABEL arch64speech
@ -16,16 +16,5 @@ It allows you to install Arch Linux or perform system maintenance with speech fe
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, BIOS) with ^speech
LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% accessibility=on
# Copy to RAM boot option
LABEL arch64ram
TEXT HELP
Boot the Arch Linux install medium on BIOS with Copy-to-RAM option
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, BIOS, Copy to RAM)
LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram
INITRD /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on

View file

@ -7,12 +7,12 @@ MENU LABEL Boot existing OS
COM32 chain.c32
APPEND hd0 0
# http://www.memtest.org/
# https://www.memtest.org/
LABEL memtest
MENU LABEL Run Memtest86+ (RAM test)
LINUX /%INSTALL_DIR%/boot/memtest
LINUX /boot/memtest86+/memtest
# http://hdt-project.org/
# https://wiki.syslinux.org/wiki/index.php/Hdt_(Hardware_Detection_Tool)
LABEL hdt
MENU LABEL Hardware Information (HDT)
COM32 hdt.c32

View file

@ -48,10 +48,12 @@ The image file is constructed from some of the variables in ``profiledef.sh``: `
- ``bios.syslinux.eltorito``: Syslinux for x86 BIOS booting from an optical disc
- ``uefi-ia32.grub.esp``: GRUB for IA32 UEFI booting from a disk
- ``uefi-ia32.grub.eltorito``: GRUB for IA32 UEFI booting from an optical disc
- ``uefi-x64.grub.esp``: GRUB for x86_64 UEFI booting from a disk
- ``uefi-x64.grub.eltorito``: GRUB for x86_64 UEFI booting from an optical disc
- ``uefi-x64.systemd-boot.esp``: systemd-boot for x86_64 UEFI booting from a disk
- ``uefi-x64.systemd-boot.eltorito``: systemd-boot for x86_64 UEFI booting from an optical disc
- ``uefi-x64.grub.esp``: GRUB for x64 UEFI booting from a disk
- ``uefi-x64.grub.eltorito``: GRUB for x64 UEFI booting from an optical disc
- ``uefi-ia32.systemd-boot.esp``: systemd-boot for IA32 UEFI booting from a disk
- ``uefi-ia32.systemd-boot.eltorito``: systemd-boot for IA32UEFI booting from an optical disc
- ``uefi-x64.systemd-boot.esp``: systemd-boot for x64 UEFI booting from a disk
- ``uefi-x64.systemd-boot.eltorito``: systemd-boot for x64 UEFI booting from an optical disc
Note that BIOS El Torito boot mode must always be listed before UEFI El Torito boot mode.
* ``arch``: The architecture (e.g. ``x86_64``) to build the image for. This is also used to resolve the name of the packages
file (e.g. ``packages.x86_64``)
@ -64,6 +66,8 @@ The image file is constructed from some of the variables in ``profiledef.sh``: `
- ``erofs``: Create an EROFS image for the airootfs work directory
* ``airootfs_image_tool_options``: An array of options to pass to the tool to create the airootfs image. ``mksquashfs`` and
``mkfs.erofs`` are supported. See ``mksquashfs --help`` or ``mkfs.erofs --help`` for all possible options
* ``bootstrap_tarball_compression``: An array containing the compression program and arguments passed to it for
compressing the bootstrap tarball (defaults to ``cat``). For example: ``bootstrap_tarball_compression=(zstd -c -T0 --long -19)``.
* ``file_permissions``: An associative array that lists files and/or directories who need specific ownership or
permissions. The array's keys contain the path and the value is a colon separated list of owner UID, owner GID and
access mode. E.g. ``file_permissions=(["/etc/shadow"]="0:0:400")``. When directories are listed with a trailing backslash (``/``) **all** files and directories contained within the listed directory will have the same owner UID, owner GID, and access mode applied recursively.
@ -137,9 +141,15 @@ The following *custom template identifiers* are understood and will be replaced
respective variables in ``profiledef.sh``:
* ``%ARCHISO_LABEL%``: Set this using the ``iso_label`` variable in ``profiledef.sh``.
* ``%INSTALL_DIR%``: Set this using the ``iso_label`` variable in ``profiledef.sh``.
* ``%INSTALL_DIR%``: Set this using the ``install_dir`` variable in ``profiledef.sh``.
* ``%ARCH%``: Set this using the ``arch`` variable in ``profiledef.sh``.
Additionally there are also *custom template identifiers* have harcoded values set by ``mkarchiso`` that cannot be
overridden:
* ``%ARCHISO_UUID%``: the ISO 9660 modification date in UTC, i.e. its "UUID",
* ``%ARCHISO_SEARCH_FILENAME%``: file path on ISO 9660 that can be used by GRUB to find the ISO volume
(**for GRUB ``.cfg`` files only**).
efiboot
-------

View file

@ -1,133 +0,0 @@
INDEX
-----
* Transfer ISO file to target medium (configs/releng)
* To -> CD / DVD / BD
* To -> USB-key / SD / HDD / SSD
* PC-BIOS (MBR)
* PC-BIOS (ISOHYBRID-MBR)
* PC-EFI (GPT) [x86_64 only]
* PC-EFI (ISOHYBRID-GPT) [x86_64 only]
*** Transfer ISO image to target medium (configs/releng)
ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
Where:
<YYYY> Year
<MM> Month
<DD> Day
** To -> CD / DVD / BD
Note: All ISO images are booteable on a PC-BIOS via "El Torito" in no-emulation mode,
All x86_64 ISO images are booteable on a PC-EFI via "El Torito" in no-emulation mode.
Nomeclature:
<B> scsibus number
<T> target number
<L> lun number
(Note: see cdrecord -scanbus, for these numbers)
1) Write it directly using your favorite recording program.
# cdrecord dev=<B>,<T>,<L> -dao archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
** To -> USB Flash Drive (USB-key) / Memory card (SD) /
Hard-Disk Drive (HDD) / Solid-State Drive (SSD)
Note: These steps are the general workflow, you can skip some of them,
using another filesystem if your bootloader supports it,
installing to another directory than "arch/" or using more than
one partition. Just ensure that main boot params options
(archisolabel= and archisobasedir=) are set correctly according to your setup.
Nomeclature:
<DEV-TARGET>: Device node of the drive where ISO contents should be copied
(example: /dev/sdx)
<DEV-TARGET-N>: Device node of the partition on <DEV-TARGET>
(example: /dev/sdx1)
<MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
(example: /mnt/sdx/1)
<ISO-SOURCE>: Path to the ISO file archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
(example: ~/archlinux-2017.03.01-x86_64.iso)
<FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE>
(example: ARCH_201703)
* PC-BIOS (MBR):
Note: Using here a MBR partition mode as example, but GPT should also works
if machine firmware is not broken.
Just ensure that partition is set with attribute "2: legacy BIOS bootable"
and use gptmbr.bin instead of mbr.bin for syslinux.
1) Create one partition entry in MBR and mark it as "active" (booteable).
Note: Type "b" for FAT32, "83" for EXTFS or "7" for NTFS.
# fdisk <DEV-TARGET>
2) Create a FAT32, EXTFS or NTFS filesystem on such partition and setup a label.
Note: COW is not supported on NTFS.
# mkfs.fat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
# mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N>
# mkfs.ntfs -L <FS-LABEL> <DEV-TARGET-N>
3) Mount target filesystem.
# mount <DEV-TARGET-N> <MNT-TARGET-N>
4) Extract ISO image on target filesystem.
# bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
5) Install syslinux bootloader on target filesystem.
# extlinux -i <MNT-TARGET-N>/arch/boot/syslinux
6) Unmount target filesystem.
# umount <MNT-TARGET-N>
7) Install syslinux MBR boot code on target drive.
# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=<DEV-TARGET>
* PC-BIOS (ISOHYBRID-MBR):
Note: This method is the most easily, quick and dirty, but is the most limited
if you want to use your target medium for other purposes.
If using this does not work, use PC-BIOS (MBR) method instead.
1) Dump ISO file to target medium.
# dd if=<ISO-SOURCE> of=<DEV-TARGET>
* PC-EFI (GPT) [x86_64 only]
Note: Using here a GPT partition mode as example, but MBR should also works
if machine firmware is not broken.
1) Create one partition entry in GPT (of type "ef00")
# gdisk <DEV-TARGET>
2) Create a FAT32 filesystem on such partition and setup a label.
# mkfs.fat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
3) Mount target filesystem.
# mount <DEV-TARGET-N> <MNT-TARGET-N>
4) Extract ISO image on target filesystem.
# bsdtar -x --exclude=isolinux/ --exclude=EFI/archiso/ --exclude=arch/boot/syslinux/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
5) Unmount target filesystem.
# umount <MNT-TARGET-N>
* PC-EFI (ISOHYBRID-GPT) [x86_64 only]
Note: This method is the most easily, quick and dirty, but is the most limited
if you want to use your target medium for other purposes.
If using this does not work, use PC-EFI (GPT) method instead.
1) Dump ISO file to target medium.
# dd if=<ISO-SOURCE> of=<DEV-TARGET>

165
docs/README.transfer.rst Normal file
View file

@ -0,0 +1,165 @@
==============================================
Transfer ISO to target medium (configs/releng)
==============================================
ISO images names consist of: ``archlinux-YYYY.MM.DD-x86_64.iso``.
Where: ``YYYY`` is the year, ``MM`` the month and ``DD`` the day.
.. contents::
Burn to an optical disc
=======================
.. note::
All ISO images are BIOS and UEFI bootable via "El Torito" in no-emulation mode.
Burn the ISO using your favorite disc burning program.
For example:
.. code:: sh
xorriso -as cdrecord -v -sao dev=/dev/sr0 archlinux-YYYY.MM.DD-x86_64.iso
Write to an USB flash drive / memory card / hard disk drive / solid state drive / etc.
======================================================================================
.. tip::
See https://wiki.archlinux.org/title/USB_flash_installation_medium for more detailed instructions.
Nomeclature:
``<DEV-TARGET>``
Device node of the drive where ISO contents should be copied (example: ``/dev/sdx``).
``<DEV-TARGET-N>``
Device node of the partition on ``<DEV-TARGET>`` (example: ``/dev/sdx1``).
``<FS-LABEL>``
Represents the file system label of the ``archlinux-YYYY.MM.DD-x86_64.iso`` (example: ``ARCH_201703``).
ISOHYBRID (BIOS and UEFI)
-------------------------
.. note::
This method is the most easily, quick and dirty, but is the most limited if you want to use your target medium
for other purposes. If using this does not work, use the `File system transposition (UEFI only)`_ method instead.
Directly write the ISO file to the target medium:
.. code:: sh
dd bs=4M if=archlinux-YYYY.MM.DD-x86_64.iso of=<DEV-TARGET> conv=fsync oflag=direct status=progress
File system transposition (UEFI only)
--------------------------------
This method extracts the contents of the ISO onto a prepared UEFI-bootable volume.
If your drive is already partitioned and formatted, skip to the "Mount the target file system" step.
.. note::
Using MBR with one FAT formatted active partition is the most compatible method.
1. Partition the drive with *fdisk*.
.. code:: sh
fdisk <DEV-TARGET>
1) Create a new MBR partition table with command ``o``.
.. warning::
This will destroy all data on the drive.
2) Create a new primary partition with command ``n`` and set its type code to ``0c`` with command ``t``.
3) Mark the partition as bootable with the ``a`` command.
4) Write the changes and exit with ``w``.
2. Format the newly created partition to FAT32
.. code:: sh
mkfs.fat -F 32 /dev/disk/by-id/<TARGET-DEVICE>-part1
3. Mount the target file system
.. code:: sh
mount <DEV-TARGET-N> /mnt
4. Extract the ISO image on the target file system.
.. code:: sh
bsdtar -x --exclude=boot/syslinux/ -f archlinux-YYYY.MM.DD-x86_64.iso -C /mnt
5. Unmount the target file system.
.. code:: sh
umount /mnt
Manual formatting (BIOS only)
-----------------------------
.. note::
These steps are the general workflow, you can skip some of them, using another file system if your boot loader
supports it, installing to another directory than ``arch/`` or using more than one partition. Just ensure that
main boot parameters (``archisolabel=`` and ``archisobasedir=``) are set correctly according to your setup.
Using here a MBR partition mode as example, but GPT should also work if the machine firmware is not broken. Just
ensure that partition is set with attribute ``2: legacy BIOS bootable`` and use ``gptmbr.bin`` instead of
``mbr.bin`` for syslinux.
1) Create one partition entry in MBR and mark it as "active" (bootable).
.. note::
Type ``b`` for FAT32, ``83`` for EXTFS or ``7`` for NTFS.
.. code:: sh
fdisk <DEV-TARGET>
2) Create a FAT32, EXTFS or NTFS file system on such partition and setup a label.
.. note::
COW is not supported on NTFS.
.. code:: sh
mkfs.fat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N>
mkfs.ntfs -L <FS-LABEL> <DEV-TARGET-N>
3) Mount the target file system.
.. code:: sh
mount <DEV-TARGET-N> /mnt
4) Extract the ISO image on the target file system.
.. code:: sh
bsdtar -x --exclude=boot/grub/ --exclude=EFI/ -f archlinux-YYYY.MM.DD-x86_64.iso -C /mnt
5) Install the syslinux boot loader on the target file system.
.. code:: sh
extlinux -i /mnt/boot/syslinux
6) Unmount the target file system.
.. code:: sh
umount /mnt
7) Install syslinux MBR boot code on the target drive.
.. code:: sh
dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=<DEV-TARGET>

80
man/mkarchiso.1.rst Normal file
View file

@ -0,0 +1,80 @@
=========
mkarchiso
=========
------------------------
Arch Linux ISO generator
------------------------
:Version: archiso |version|
:Manual section: 1
Synopsis
========
**mkarchiso** [options] *profile_directory*
Description
===========
**mkarchiso** creates an ISO, netboot artifacts and a bootstrap tarball and optionally signs them.
Options
=======
-A application | Set an application name for the ISO.
| Default: |iso_application|.
-C file | pacman configuration file.
| Default: |pacman_conf|.
-D install_dir | Set an install_dir. All files will be located here.
| Default: |install_dir|.
| NOTE: Max 8 characters, use only *a-z0-9*.
-L label | Set the ISO volume label.
| Default: |iso_label|.
-P publisher | Set the ISO publisher.
| Default: |iso_publisher|.
-c cert_and_key | Provide certificates for codesigning of netboot artifacts as well as the rootfs artifact.
| Multiple files are provided as quoted, space delimited list.
| The first file is considered as the signing certificate, the second as the key and the third as the optional certificate authority.
-g gpg_key | Set the PGP key ID to be used for signing the rootfs image. Passed to gpg as the value for **--default-key**.
-G mbox | Set the PGP signer (must include an email address). Passed to gpg as the value for **--sender**.
-h | Help message.
-m mode | Build mode(s) to use (valid modes are: *bootstrap*, *iso* and *netboot*). Multiple build modes are provided as quoted, space delimited list.
-o out_dir | Set the output directory.
| Default: |out_dir|.
-p packages | Package(s) to install.
| Multiple packages are provided as quoted, space delimited list.
-r | Delete the working directory at the end.
-v | Enable verbose output.
-w work_dir | Set the working directory.
| Default: |work_dir|.
Examples
========
Build the releng profile
------------------------
mkarchiso |profile_dir|/configs/releng
Bugs
====
https://gitlab.archlinux.org/archlinux/archiso/-/issues
Authors
=======
archiso is maintained by the Arch Linux community. Refer to the *AUTHORS* file for a full list of contributors.
Copyright
=========
Copyright 🄯 archiso contributors. GPL-3.0-or-later.
See also
========
* /usr/share/doc/archiso/README.profile.rst
.. include:: variables.rst

10
man/variables.rst Normal file
View file

@ -0,0 +1,10 @@
.. |iso_application| replace:: '*mkarchiso iso*'
.. |pacman_conf| replace:: */etc/pacman.conf*
.. |install_dir| replace:: *arch*
.. |iso_label| replace:: *MKARCHISO*
.. |iso_publisher| replace:: *mkarchiso*
.. |out_dir| replace:: *./out*
.. |work_dir| replace:: *./work*
.. |profile_dir| replace:: /usr/share/archiso
.. include:: version.rst

View file

@ -11,7 +11,6 @@
# - qemu
# - edk2-ovmf (when UEFI booting)
set -eu
print_help() {
@ -45,11 +44,11 @@ cleanup_working_dir() {
}
copy_ovmf_vars() {
if [[ ! -f '/usr/share/edk2-ovmf/x64/OVMF_VARS.fd' ]]; then
printf 'ERROR: %s\n' "OVMF_VARS.fd not found. Install edk2-ovmf."
if [[ ! -f '/usr/share/edk2/x64/OVMF_VARS.4m.fd' ]]; then
printf 'ERROR: %s\n' "OVMF_VARS.4m.fd not found. Install edk2-ovmf."
exit 1
fi
cp -av -- '/usr/share/edk2-ovmf/x64/OVMF_VARS.fd' "${working_dir}/"
cp -av -- '/usr/share/edk2/x64/OVMF_VARS.4m.fd' "${working_dir}/"
}
check_image() {
@ -68,13 +67,13 @@ run_image() {
copy_ovmf_vars
if [[ "${secure_boot}" == 'on' ]]; then
printf '%s\n' 'Using Secure Boot'
local ovmf_code='/usr/share/edk2-ovmf/x64/OVMF_CODE.secboot.fd'
local ovmf_code='/usr/share/edk2/x64/OVMF_CODE.secboot.4m.fd'
else
local ovmf_code='/usr/share/edk2-ovmf/x64/OVMF_CODE.fd'
local ovmf_code='/usr/share/edk2/x64/OVMF_CODE.4m.fd'
fi
qemu_options+=(
'-drive' "if=pflash,format=raw,unit=0,file=${ovmf_code},read-only=on"
'-drive' "if=pflash,format=raw,unit=1,file=${working_dir}/OVMF_VARS.fd"
'-drive' "if=pflash,format=raw,unit=1,file=${working_dir}/OVMF_VARS.4m.fd"
'-global' "driver=cfi.pflash01,property=secure,value=${secure_boot}"
)
fi