As I mentioned, sdm can do this, and makes it pretty easy.I have spend a day of flashing and tweaking, and reflashing again trying to sort this out.
No need to spend a whole day on it, when 15-30 minutes is more than sufficient (unless you're on a Pi0w

Code:
# install sdmcurl -L https://raw.githubusercontent.com/gitbls/sdm/master/EZsdmInstaller | bash# Do minimal customizationsudo sdm --customize --regen-ssh-host-keys --reboot 10 --plugin L10n:"keymap=us|locale=en_US.UTF-8|timezone=Americas/Los_Angeles" /path/to/yyyy-mm-dd-raspios-something.img# Burn the disk# rootfs is not expanded but after the burn expand it by 8192MiB and add a 4MiB ext4 partitionsudo sdm --burn /dev/sdX --hostname myhostname --burn-plugin parted:"rootexpand=8192|addpartition=4096,ext4" /path/to/yyyy-mm-dd-raspios-something.img
Read more: viewtopic.php?t=375987
Statistics: Posted by bls — Thu Jan 02, 2025 6:51 pm