Commit graph

1433 commits

Author SHA1 Message Date
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
nl6720
674f004170
Add changelog for 66 2022-08-28 15:19:52 +03:00