All raspi-config
does is editing a few configuration files, which you can also edit with a script. Check the sed
manual to see how such edits can be efficiently done.
If you have a lot of changes to apply in this way, I would consider setting up a clean RPi image the way you want, diff
its complete filesystem* against a vanilla image, and then apply the changes with patch
when you need to set up a new installation.
Finally, take a look at tools such as etckeeper
- those are specifically designed to manipulate configuration changes and are able to track subtle changes a simple diff
would miss, such as permissions. Note that contrary to its name, etckeeper
is not restricted to /etc
, e.g. running etckeeper -d /boot init; etckeeper -d /boot commit
will make a backup of the files in /boot
.
(*) Apparently it isn't obvious, so to clear all misunderstandings, I mean you should run something like diff -r /etc /mnt/vanilla_root/etc > etc.diff
and diff -r /boot /mnt/vanilla_boot > boot.diff
, not diff my.img vanilla.img
.
/usr/bin
, if that helps. If you want to disable it starting up with a fresh images, delete/etc/init.d/apply_noobs_os_config
and the link in/etc/rc2.d
.