The last version was quick and dirty and as it could be expected, it has a few shortcomings. So much in fact that it's better to do it all over, it's faster than trying to fix it.
The second time I do something, I don't want to have to do it by hand a 3rd time, which is ... likely. So I make more efforts and instead of just writing things down, I simply write a set of scripts. Like in the old times of LFS :-D
The problem is that there are now 2 platforms to run (host and Pi), so 2 sets of scripts. A new challenge for me, I'll see how I'll handle that gracefully :-DHopefully the 2nd version will be better, faster, maybe even smaller...
I have now a set of bash scripts to safely automate the first parts, the easy ones. It runs on Linux and now uses a new trick to reduce the number of manipulations : simple data are changed or uploaded from the host computer by loop-mounting the image before it is written to Flash and booted.
The big issue is still the management of the debian/apt packages and so far this can only be done from the booted system. Similarly, the raspi-config part can't be automated yet, so more manual operations...
At least the set of scripts is modular and new steps can be added to provide more functionalities, on demand, for each project. Just "su" and run each script in order :-)