Commit Graph

28 Commits

Author SHA1 Message Date
Esther
6408e062b2 Add the files common to all PTS repositories and update the readme 2024-07-22 18:44:44 +02:00
Esther
d0525141ce Ignore DS_Store 2024-07-22 18:28:12 +02:00
Cyril Brulebois
8159cfc032 Run zerofree to make images smaller.
This is not a definitive survey, but things are looking much better!

    +--------------------------------+------+------+
    | Image type                     | Old  | New  |
    +--------------------------------+------+------+
    | PiRogue-OS-12-Pi3_and_Pi4      | 491M | 255M |
    | PiRogue-OS-12-Pi5-Experimental | 594M | 313M |
    +--------------------------------+------+------+
2024-07-22 09:29:56 +02:00
Cyril Brulebois
97469570c5 Use up-to-date raspi_4_bookworm builds. 2024-07-22 09:12:27 +02:00
Cyril Brulebois
15bed78f6a Add raspi-build script for reference.
That script is deployed in a VM maintained by DEBAMAX, initially building
and publishing raspi_4_bookworm.img.xz(.sha256) every Monday below:

  https://pirogue.apt.debamax.com/raspi-images/
2024-07-22 09:10:44 +02:00
Cyril Brulebois
a17edd3f18 Document open problems for the experimental Pi 5 image. 2024-07-21 09:05:21 +02:00
Cyril Brulebois
3e76b0f2d8 Add log messages for lengthy operations. 2024-07-20 21:18:37 +02:00
Cyril Brulebois
3586a185d6 Add xz fallback if pixz isn't available. 2024-07-20 20:56:40 +02:00
Cyril Brulebois
773c67d6ba Add script to build images and a list of files to publish.
Given a RASPBERRYPI_IMG_URL, this automates downloading the image and
its checksum, validating it, then modifying it to generate two images:
 - PiRogue-OS-12-Pi3_and_Pi4
 - PiRogue-OS-12-Pi5-Experimental

Those are then compressed, checksums are generated, and the resulting
4 files are listed in a MANIFEST.txt file at the top-level, making it
trivial to publish the relevant files.

At least for the time being, no clean-up is performed. That means the
original image can be used to run ./toaster again if a new development
iteration is required.
2024-07-20 20:42:30 +02:00
Cyril Brulebois
132ce6a1a5 Deploy and clean rpi-resizerootfs hook and script.
Another way could be to install the Raspberry Pi kernel first, compare
the contents of the initramfses for the Debian and the Raspberry Pi
kernels, and fix the missing files in the latter. Duplicating hook and
script seems a little more straightforward.
2024-07-20 18:38:39 +02:00
Cyril Brulebois
b9a2b88370 Import rpi-resizerootfs hook and script from image-specs.
As of commit ff7fdbf07c727ba1d2277dc7f274bd234f2e2bfa in the image-specs
repository (https://salsa.debian.org/raspi-team/image-specs).
2024-07-20 18:38:24 +02:00
Cyril Brulebois
d586813d5f Preconfigure raspi-firmware to avoid cma=64M on the kernel cmdline. 2024-07-20 18:37:05 +02:00
Cyril Brulebois
e14d454156 Install required packages for the Pi 5.
We need a specific linux-image package to boot the Pi 5 at all, plus a
newer version of firmware-brcm80211 to ensure the wlan0 interface shows
up.
2024-07-20 18:37:02 +02:00
Cyril Brulebois
d4d78daf3d Add Raspberry Pi signing key.
Copied from /etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg
(Raspberry Pi OS Lite, 2024-07-04-raspios-bookworm-arm64-lite.img).
2024-07-20 18:36:45 +02:00
Cyril Brulebois
d9fb46386f Boostrap a Pi 5 recipe.
For the time being, let's keep both Pi 3/Pi 4 and Pi 5 recipes separate,
making it easy to modify the latter freely. Later on, it will probably
make sense to have a common section.
2024-07-20 14:36:03 +02:00
Cyril Brulebois
a6f8c1fdf5 Split into blocks for readability. 2024-07-20 14:35:44 +02:00
Cyril Brulebois
f14ea9817c Adjust SSH management.
Let's *disable* ssh.service to make sure it doesn't start too soon, and
modify the rpi-generate-ssh-host-keys.service unit (that triggers the
generation during the first boot) to enable+start ssh.service when
everything is ready.

See: https://salsa.debian.org/raspi-team/image-specs/-/issues/72
2024-07-20 14:06:47 +02:00
Cyril Brulebois
a9332126bb Work around longstanding bug regarding SSH host keys.
The original image leads to repeated failures to start for sshd.service
since there are no host keys initially. Make sure the unit in charge of
getting those keys generated runs before sshd.

The following block gets repeated otherwise:

    systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
    sshd[795]: sshd: no hostkeys available -- exiting.
    systemd[1]: ssh.service: Control process exited, code=exited, status=1/FAILURE
    systemd[1]: ssh.service: Failed with result 'exit-code'.
    systemd[1]: Failed to start ssh.service - OpenBSD Secure Shell server.
    systemd[1]: ssh.service: Scheduled restart job, restart counter is at 1.
    systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server.
2024-07-20 14:06:47 +02:00
Cyril Brulebois
36c1c2649c Stop enabling ssh manually.
That's not required, it's already enabled in Debian images.
2024-07-20 14:06:47 +02:00
Cyril Brulebois
5e5836d378 Use adduser instead of useradd/usermod.
It's a matter of habit more than an absolute technical requirement.
Quoting the useradd manpage:

    useradd is a low level utility for adding users. On Debian,
    administrators should usually use adduser(8) instead.
2024-07-20 14:06:47 +02:00
Cyril Brulebois
b9bf65b4a1 Drop ssh configuration.
The default SSH configuration is Debian 12 is as follows:

    #PermitRootLogin prohibit-password
    #PermitEmptyPasswords no

(The default values are commented out, ready to be tweaked by local
admins.)
2024-07-20 14:06:47 +02:00
Cyril Brulebois
7282fa4fa1 Align /etc/hosts entries.
No functional changes.
2024-07-20 14:06:47 +02:00
Cyril Brulebois
1c9b6b2bef Assign pirogue.local and pirogue to 127.0.1.1
It's pretty standard to have 127.0.0.1 match localhost while the actual
machine's name (FQDN and hostname) matches 127.0.1.1 instead.

We would be happy to be told if something similar exists for IPv6!
2024-07-20 14:06:47 +02:00
Cyril Brulebois
0dd2b1a2c9 Deduplicate /etc/hosts pirogue entries. 2024-07-20 14:06:47 +02:00
Cyril Brulebois
9ede6bb93f Turn the original hook into a toaster recipe. 2024-07-20 14:06:45 +02:00
Cyril Brulebois
c5254d41b4 Import original pirogue-os hook.
This needs to be run within the target system (within a chroot).
2024-07-20 07:40:26 +02:00
Cyril Brulebois
2bb88da3e5 Import toaster 0.1
This is a tiny shell wrapper developer by DEBAMAX for a customer, making
it possible to tweak amd64 and arm64 system images: they are duplicated
first, their partitions are mounted, and the contents can be modified at
will.

This makes it possible to move fast, as the original images don't need
to be built again to test modifications. For the PiRogue Tool Suite
project, that means we can focus on modifying Debian-provided images
instead of building them from scratch.

At the moment, support for partition tables is pretty basic, the second
partition is the root filesystem, the first partition might be mounted
on /boot/firmware (arm64 images for Raspberry Pi) or on /boot/efi (amd64
images for 64-bit PCs).

If we end up using this tool for Cloud images, at least that part will
require some modifications.
2024-07-20 07:35:58 +02:00
Cyril Brulebois
958084c469 Initial commit. 2024-07-20 07:22:44 +02:00