summaryrefslogtreecommitdiff
path: root/lx-trainer-vm/README
blob: 54ac9ffdaa9b72b1a29ffa463de2113557e4475d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
lx-trainer
==========
v2018-05-07
John Ogness <john.ogness@linutronix.de>


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...