-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If we install `raspberrypi-kernel = 1:1.20230317-1` we need to patch ssh host key regeneration, otherwise it will take AGES during first boot on anything other than a Pi4, due to some issue with `/dev/hwrng` in that kernel. See also raspberrypi/linux#5390
- Loading branch information
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/usr/lib/raspberrypi-sys-mods/firstboot 2022-09-15 13:46:12.000000000 +0100 | ||
+++ b/usr/lib/raspberrypi-sys-mods/firstboot 2023-03-28 12:31:05.529858256 +0100 | ||
@@ -63,7 +63,7 @@ | ||
fix_partuuid() { | ||
mount -o remount,rw "$ROOT_PART_DEV" | ||
mount -o remount,rw "$BOOT_PART_DEV" | ||
- DISKID="$(tr -dc 'a-f0-9' < /dev/hwrng | dd bs=1 count=8 2>/dev/null)" | ||
+ DISKID="$(tr -dc 'a-f0-9' < /dev/urandom | dd bs=1 count=8 2>/dev/null)" | ||
fdisk "$ROOT_DEV" > /dev/null <<EOF | ||
x | ||
i |
11 changes: 11 additions & 0 deletions
11
scripts/files/regenerate_ssh_host_keys/regenerate_ssh_host_keys.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/usr/lib/raspberrypi-sys-mods/regenerate_ssh_host_keys 2022-09-01 16:22:09.000000000 +0100 | ||
+++ b/usr/lib/raspberrypi-sys-mods/regenerate_ssh_host_keys 2023-03-28 12:26:26.822217883 +0100 | ||
@@ -1,8 +1,5 @@ | ||
#!/bin/sh -e | ||
|
||
-if [ -c /dev/hwrng ]; then | ||
- dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 status=none | ||
-fi | ||
rm -f /etc/ssh/ssh_host_*_key* | ||
ssh-keygen -A > /dev/null | ||
systemctl -q disable regenerate_ssh_host_keys |