Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions script/make-raspbian.bash
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ main()
fi
sudo touch "$QEMU_ROOT"/boot/ssh && sync && sleep 1

# Create userconf.txt for headless setup (Bookworm requirement)
# This pre-configures the 'pi' user with a password to bypass the first-boot wizard.
# The password hash is produced with SHA-512 ("openssl passwd -6").
PASSWD_HASH=$(openssl passwd -6 "${PI_PASSWORD?PI_PASSWORD environment variable is not set}")
echo "pi:${PASSWD_HASH}" | sudo tee "$QEMU_ROOT/boot/userconf.txt" >/dev/null

# Shrink .img
if [[ ! -f /usr/bin/pishrink.sh ]]; then
sudo wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh -O /usr/bin/pishrink.sh && sudo chmod a+x /usr/bin/pishrink.sh
Expand Down
2 changes: 1 addition & 1 deletion script/make-reference-release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ main()
# Build raspbian
# ==========================================================================
mkdir -p "$OUTPUT_ROOT"
OUTPUT_ROOT="$OUTPUT_ROOT" ./script/make-raspbian.bash
OUTPUT_ROOT="$OUTPUT_ROOT" PI_PASSWORD="raspberry" ./script/make-raspbian.bash
Comment thread
jwhui marked this conversation as resolved.

# ==========================================================================
# Package docs
Expand Down
Loading