How to build a "AUTO INSTALL" installation SD card


Hi All,

Does anyone know how to build a “AUTO INSTALL” installation SD card?
Which mean once I set device boot up from SD card, and insert SD card, then device will auto install by itself, and we don’t need to use mouse to click next button in external display.


Best regards,


it shouldn’t be difficult to do. I provided a bit of information on that thread: Building custom rootfs for sd card boot, which explains how the GUI works.

so you could create an image that does not start the GUI tool, but instead runs the low level flashing command directly.


Thanks Ndec, I’ll check it first.

Best regards,


Hi @ndec,

What do you mean “instead runs the low level flashing command”?
Should I modify the source code ‘flash’ or ‘mksdcard’?
Could you please tell me how should I modify it?


hi @Louise, the purpose of the GUI application is to call the ‘flash’ script after the user has selected the right image to flash from GUI.

If you want to create an SD card without GUI, you can directly call the ‘flash’ script on boot, and it will start flashing, this is what I meant. You shouldn’t need to make any change in the flash script of mkcard tool.


Hi @ndec,

So we need to build rootfs.img by ourselves to change the process to directly call the flash script?
Or we need to modify the and build it only?


Best regards,



the GUI is just here to let the user pick which release to install (we could have more than 1 OS on the SD card). Then the GUI just does the following :

QProcess burn;
burn.start(_root + "/flash -o /dev/mmcblk0");

So basically, it changes to the folder that contains the image to install and calls the ‘flash’ script that is in the SD root folder. The flash script is this file:

Which then does:

OUTPUT=$(basename $2)
SCRIPTPATH=$(dirname $(readlink -f "$0") )
sudo $SCRIPTPATH/mksdcard -p partitions.txt -i $PWD -o /dev/$OUTPUT -s $((`cat /sys/block/$OUTPUT/size`/2))

The flashing really is done in the last command.

You can skip the GUI completely and directly invoke the last command from any shell script, that you can start at boot automatically. It will do the flashing automatically at boot, like you wanted.

mksdcard script can be found in