lx-trainer ========== v2018-05-07 John Ogness lx-trainer-vm.xml ~~~~~~~~~~~~~~~~~ lx-trainer is our disk image for all trainings. To build the image, git devel/elbe-3.0 is needed. It is recommended to run elbe from nereus.lab.linutronix.de because the toolchain and eclipse software are readily available via http mirror. elbe generates the complete root filesystem on one partition (16GB in size). The generated image is fully functional and has enough space for most trainings as is. dd-multi.sh ~~~~~~~~~~~ The "dd-multi.sh" script will copy the generated training image in parallel to multiple devices. It will also: - create and format a 2nd partition filling the rest of the disk - move /home/* to the new partition - adjust /etc/fstab to mount the 2nd partition to /home - unpack any provided layer tarballs The script can be run like this: (Only an example! Verify destination devices *before* running!) sudo ./dd-multi.sh lx-trainer.img \ --layer=./stuff1.tar --layer=./stuff2.tar \ /dev/sde /dev/sdf /dev/sdg Layer tarballs are unpacked using --numeric-owner to avoid any accidental incorrect username/uid and group/gid mappings. For the trainer image, the "devel" user has a uid/gid of 1000/1000. So for files intended for devel's home it is recommend to create the layer tarball using: tar cvf mylayer.tar --owner=1000 --group=1000 --numeric-owner mydir make_lxtrainer_secureboot.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The "make_lxtrainer_secureboot.sh" script will convert the generated image to use secure boot. To save you time, this should be run on the generated image *before* it is copied to the devices. sudo ./make_lxtrainer_secureboot.sh lx-trainer.img However, you can also run it for a device that has already been prepared with the image. (Only an example! Verify destination devices *before* running!) sudo ./make_lxtrainer_secureboot.sh /dev/sde At some point this script will not be needed. But until then...