pi-gen: stuck at generating ssh keys
I hope you can help me. I am trying to build a custom image for a voice assistant. I want to start with a “lite” image and go from there. So, I thought that I would JUST build the “lite” image and make sure it all works like I want and then expand from there.
My problem is, on first boot, it goes through the boot cycle and show the screen “resizing image…” but when it switched to the “generating ssh keys”, it gets stuck. I have a very basic config file as I will expand from this once this works.
My config file
IMG_NAME="ovos-dev"
STAGE_LIST="stage0 stage1 stage2"
ENABLE_SSH=1
and I removed the “EXPORT_NOOBS” file from “stage2” but left the “EXPORT_IMAGE” file
I’m not sure what I am doing or not doing to let the pi reboot on first boot
Any help would be much appreciated
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (1 by maintainers)
Commits related to this issue
- Workaround for https://github.com/RPi-Distro/pi-gen/issues/682 — committed to simpleairquality/SimpleAQ-Device by theGOTOguy a year ago
- Remove workaround for RPi-Distro/pi-gen#682 #40. — committed to simpleairquality/SimpleAQ-Device by theGOTOguy a year ago
Worked first time (what did I do wrong lol)
3 files in total. Place them under
stage2/01-sys-tweaksAppend the following…
I have confirmed that the new kernel fixes this issue. It works with the pi-gen arm64 branch. Closing this, thank you for all your help
Want to mention https://github.com/RPi-Distro/raspberrypi-sys-mods/pull/71 here. So, will be fixed in newer releases.
Feel free to put the patch in wherever works for you. I edited my answer to keep the patches close to where rasperry-pi-sys-mods are installed to keep in the spirit of this repo but in practice you’d probably want the patches somewhere that’s easy to disable. That said one of the final steps of stage2 is probably the correct place. The LITE image is built off the contents of stage2 AND raspberry-pi-sys-mods isn’t installed until early in stage2. If we do the fix any later it won’t make it in to the lite image. Any earlier and the files won’t be there to patch.
Glad the fix worked for you too. Just remember that at some point in the near future this problem will be fixed and these patches won’t be necessary. I’ll try and remember to put a note here once I see a fix released.
It wouldn’t be wise to disable those functions completely. I’m working on a patch to use /dev/urandom instead. I’ll share it once i’ve tested it.