summaryrefslogtreecommitdiff
path: root/lx-trainer-vm/dd-multi.sh
AgeCommit message (Collapse)Author
2018-09-06dd-multi: workaround mount/umount issueJohn Ogness
It seems that calling umount directly after mount can lead to a busy error. With strace on umount the problem goes away. It must be a very small window. Someone should debug the umount syscall on this. It is reproducable with: ./dd-multi.sh lx-trainer.img /dev/sdx (i.e. regular training image and no layers) Implement a workaround for this for now. From the comments... If there were no layer files added, umount might return a busy error since we just mounted. (Possibly a kernel bug.) By accessing the filesytem before unmounting it, the mount/umount problem seems to go away. Use "ls" to access the filesystem. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-05-04dd-multi.sh: unpack layers in parallelJohn Ogness
Start the untar processes in parallel. This will take advantage of file caching and should max out the USB bandwidth. This is important because some trainings (like Yocto) have huge layers. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-05-04dd-multi.sh: check if /home is empty before copyingJohn Ogness
/home shouldn't be empty, but check just in case. Getting an error in the middle of the script is very annoying. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-05-04dd-multi.sh: check for layers before beginningJohn Ogness
It is very annoying if the script aborts in the middle because of something like missing files. Check for them in the beginnning. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-04-20dd-multi.sh: unpack the tarballs directlyJohn Ogness
Tarballs are copied to the USB drives and then unpacked in a chroot. However, this means the data will travel across the bus three times! For large layers this is craziness. Since --numeric-owner is used anyway, just unpack the tarballs directly. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-04-05dd-multi: update/cleanup for gpt supportJohn Ogness
- require gpt images and expect partition layout and sizes from lx-trainer-vm.xml - cleanup output - use dd instead of cat (to allow progress status) - use parted instead of fdisk (necessary to fix gpt table) - remove unnecessary partprobe's Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-03-20dd-multi.sh: loop partprobe until successJohn Ogness
When partitioning many devices, it is possible that partprobe returns with a "EBUSY" error. Loop until partprobe succeeds. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-02-23dd-multi.sh: wait for new partitionsJohn Ogness
There is a latency between when partprobe is called and when udev actually creates the device nodes. Wait for the desired device nodes to appear before continuing. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-02-20dd-multi.sh: add support for layer tarballs in subdirsJohn Ogness
Use 'basename' to isolate the layer tarball filename in case they are specified in a directory other than the current working directory. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2018-02-19dd-multi.sh: change partitioning procedureJohn Ogness
Initially write 10MB of 0's instead of 1MB to make sure any tables at the beginning are really gone. Rather than calling 'partprobe' with no arguments, explicitly pass the list of devices to re-read. 'fdisk' is used to create the 2nd (/home) partition. Do not do that in the background but instead synchronously for each device. Add a 'sync' afterwards to hopefully create a barrier before rescanning the devices. This is should address a problem where 'partprobe' is run too early and the kernel does not find the 2nd partition of the last device. Signed-off-by: John Ogness <john.ogness@linutronix.de>
2017-12-19dd-multi.sh: add layer supportJohn Ogness
Layers can now be specified using: --layer=tarball Signed-off-by: John Ogness <john.ogness@linutronix.de>
2017-09-18update scripts and READMEJohn Ogness
- removed extra dd-variation scripts - updated script for general usage (src/dest as arguments) - adjusted script to support modifying new image - moves /home/* from part1 to part2 - adds /home entry to /etc/fstab - moved manut's update-home.sh to "extra" directory (may still be in use? until a general replacement exists) Signed-off-by: John Ogness <john.ogness@linutronix.de>