Now with the introduction of Intel Apollo Lake based mini PCs a new issue has arisen where GRUB simply fails to boot unless the device is one of the few with a BIOS option to select Linux as the OS.
Whilst some Linux distros can work OOTB regardless of architecture and bootloader I found that for Ubuntu it wasn't that simple.
A size must be specified although there is some flexibility on how much is allocated.
The minimum size is 128MB which keeps the size of the ISO down but means that once a USB is created the persistence partition needs to be manually resized for normal usage.
Although intended to allow local binaries or shell scripts to be saved on the respun ISO there is no limitation on the actual type of file that can be added.
-s or --storage adds a specified amount of persistent storage to the respun ISO.
Unfortunately with the introduction of Intel Atom based mini PCs and tablets the issue of requiring a 32-bit bootloader to boot a 64-bit OS arose.
When creating a respun ISO with persistence the r EFInd boot manager will automatically be selected for booting the ISO although it will also need to be selected through the '-b' option if requiring the ISO to also install r EFInd.
When using the GUI the persistence partition size can be defined using the slider which limits the size between 128MB and 2048MB.
You will also need at least 10 GB of free space but this can be on external storage (e.g.
a USB) as it can be specified as a location different to where the script is run from.