Commit Graph

20 Commits

Author SHA1 Message Date
Cyril Brulebois
09021ce22c Use pirogue-3rd-party-pi5 directory when building Pi 5 images. 2024-08-22 14:39:07 +02:00
Cyril Brulebois
3e629d21be Stop configuring the Raspberry OS repository.
With the merge of the pi-5-support branch in the debian-12 repository,
we're now including everything we need from the Raspberry OS repository,
via the pirogue-3rd-party part of our PPA.

This should give us peace of mind regarding further package updates.

Link: https://github.com/PiRogueToolSuite/pirogue-images/issues/2
Link: ef742a961f
2024-08-19 03:24:31 +02:00
Cyril Brulebois
18b57694d8 Merge branch 'pirogue-archive-keyring'
Conflicts:
	raspberrypi/recipes/pi3-pi4.sh
2024-08-15 12:56:45 +02:00
Cyril Brulebois
33b9236a86 Switch to using pirogue.gpg
This adds support for multiple keys (see pirogue-archive-keyring's
introduction).

Link: https://github.com/PiRogueToolSuite/deb-packages/pull/33
Link: https://github.com/PiRogueToolSuite/debian-12/pull/7
2024-08-11 04:28:08 +02:00
Cyril Brulebois
c1be115a2f Avoid 3 known debconf prompts during deployment.
Even if those prompts and the associated answers are already documented
in “Beginner guide - How to setup a PiRogue”, it's a bit annoying to
have to go through them every time a new PiRogue is set up.

Let's pick the right answers (moving away from the default every time),
and mark those questions as seen (i.e. asked and answered):

 - Save current IPv4 rules?                           Yes → No
 - Save current IPv6 rules?                           Yes → No
 - Should non-superusers be able to capture packets?  No → Yes

Link: https://github.com/PiRogueToolSuite/pirogue-images/issues/3
2024-07-28 21:28:10 +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
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
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