I've updated my 'isorespin.sh' script to include new functionality and simplified its invocation. Besides uploading files to the ISO I've included the ability to upload directories and conversely I've also added the ability to output both files and directories. The other key functionality I've added is the ability to run commands as part of building the ISO and the significance of this is explained in an example below.
The GUI menu is now simplified through adding a sub-menu for the more advanced options that may not be so frequently used. Also adding persistence no longer requires specifying a boot manager. Finally I recommend installing the script by copying it to '/usr/local/bin' as this makes it readily accessible.
Although more detailed documentation is covered by earlier posts as a reminder you can respin all recognized desktop 64-bit Ubuntu and Ubuntu flavoured ISOs (https://www.ubuntu.com/download/ubuntu-flavours), Linux Mint and LDME ISOs (https://www.linuxmint.com/download.php), Debian 'Live install' ISOs (https://www.debian.org/CD/live), KDE neon ISOs (https://neon.kde.org/download), elementary OS ISOs (https://elementary.io) and Kali ISOs (https://www.kali.org/downloads) and in doing so will automatically add a 32-bit bootloader as well as the 64-bit bootloader making it possible to boot the respun ISO on Intel Atom devices.
The basic requirements are unchanged in that you will need to use a Linux machine (or a Linux virtual machine on Windows) with packages like 'squashfs-tools' and 'xorriso' installed (the script will check what is required and notify you if anything is missing) together with 'zenity' if you want the GUI. You will also need at least 10GB of free space and a working internet connection if you want to update the kernel. And on that note the '-u' or '--update' flag will update an Ubuntu or Linux Mint ISO with the latest mainline kernel but when used with a Debian or LMDE ISO it will update the kernel with the Canonical DKMS patches for HDMI audio and RTL8723BS wifi. As a result the '-k' or '--kernel' option is only allowed for Ubuntu and Linux Mint ISOs and any of the Ubuntu Kernel Team kernel builds found at http://kernel.ubuntu.com/~kernel-ppa/mainline can be specified by using the directory/folder name without the trailing '/' (as in '--kernel v4.12-rc3'). Also if selecting the rEFInd bootmanager (http://www.rodsbooks.com/refind) and it is in the directory from where the script is run it won't be downloaded again from https://sourceforge.net/projects/refind/files but the local copy used instead regardless of its version. And once the ISO has been respun it can be written to a USB using the standard 'dd' command.
For anyone brave enough to try an installation of the respun ISO you may encounter the usual issues with installing a bootloader. First try installing with a working internet connection as this resolves many of the problems. However if is still doesn't work I've written an additional script 'linuxium-install-bootloader.sh' that you can try running or use the commands within the script as a guide to allow you to install manually. Note that running the script still requires an internet connection and the target Linux partition needs to be already mounted on '/target' with the target boot partition mounted on '/target/boot/efi'.
Currently even after respinning your ISO you may find that some wifi/bluetooth driver and userspace files are still required to get them working. Previously I've provided additional scripts and packages to support RTL8723BS and various Broadcom chipsets as well as the ALSA UCM files for some audio chipsets used by headphones. And whilst they can be included as files when respinning the ISO they still need to be run on booting the ISO as a 'LiveCD' to activate the additional functionality. This new version of the respin script includes the 'command' option to address this which and it takes its argument and runs it as a 'bash' command.
Simple commands are straight forward. However installing the UCM files by just uploading and running the script is slightly more complex. This is because the script requires the internet and therefore a valid host name and the script must be run in the same directory it resides in. Also any quotes used within command arguments need delimiting.
In more complex cases it is simpler to write a shell script to execute the commands required. An additional command can always be run to remove the 'wrapper' script if desired. See my separate post for an additional example of the power of this new functionality.
The new version of the script can be downloaded from 'isorespin.sh' (md5sum: bdd0c5e22f017a38abd81575c6ad02e9) and any issues or improvement suggestions are welcome.
If you find my work useful then please donate using the following link http://goo.gl/nXWSGf as everything helps with development costs.