We were building Meilix from build scripts from webapp which was taking 20 minutes approx. So to reduce that time we had an idea of using a pre built ISO as it requires fewer resources and less time as compared to the building the ISO from build script and makes modifications in it which would take less time after testing it took approx 8 minutes. The following steps were followed to edit Meilix ISO.
We require following packages for unpacking and repacking the ISO.
Let’s start by unpacking the ISO. For that, we first mount the ISO.
Now we extract the content of the ISO into a directory extract-cd and extract the squash file system and move it to edit folder to prepare chroot.
Now we can chroot and do the editing we require to do in the ISO.
After doing the changes in chroot. For doing changes we can make a separate script to be executed inside the chroot.
After completing all the changes we required in the ISO the important part comes that is repacking the ISO with the applied changes.
Regenerate the manifest.
Now we compress the file system we have just edited.
For higher compression we can increase the block size or use xz but that will increase the cost of compression time so we didn’t choose it for Meilix as we required a faster method.
Now we are going to calculate the MD5 sums again for the changes and replace them with the older MD5 sums.
Last step is to go in the edit directory and generate the ISO.
This covers all the steps need to make changes in Meilix without rebuilding ISO.