Remastering script for Ubuntu

Ubuntu is a Debian derivative that has, produced many other derivatives. PinguyOS, which seeks to further facilitate and complete Ubuntu for newcomers, an Ubuntu derivative that comes with more software, codecs, and browser plugins, as well as a comprehensive configuration tool.

To create PinguyOS [1], the developer wrote the Pinguy Builder [3] remaster script. This is a variation of the Remastersys [2] tool for creating customized Live CDs/DVDs from an existing system for Debian and its derivatives. In addition to Pinguy Builder and Remastersys, several other scripts are available for creating customized distro images [4].

Remastering for Home Use

Some distro-building tools are compiled from the repositories by a build script. Scripts like Pinguy Builder or Remastersys, however, open an existing ISO image, as the name Remaster indicates, and reassemble the image after making the desired changes. The results of these scripts are thus basically only suitable for home use and at best for a circle of friends; they are not useful for further distribution. The Ubuntu Imager script [5] aims to do the same thing as Pinguy Builder. Although it offers more options, you also need more basic knowledge because it runs in a terminal and requires informed decisions from the user.

Pinguy Builder is easy and offers graphical user guidance, although you can run it in the terminal if desired. A typical usage scenario might look like this: A user has lovingly configured a personalized Ubuntu system, retroactively installing the necessary software, setting up the Conky system monitor, and tweaking many things. Now, the user wants to preserve this setup to be able to install it again in the future or to save someone else the configuration work. Pinguy Builder offers two different approaches for solving this problem. If the resulting image is for home use only, the system is converted into an ISO image. If the results will be distributed among friends, the contents of the home directory and all other personal information is removed, so it's not included in the image.

Intuitive Interface

Two flavors of Pinguy Builder are available from SourceForge [6]. Version 3.x is for Ubuntu 14.04 and 14.10 or their derivatives, and version 4.x is suitable for Ubuntu 15.04 or newer. We used Ubuntu 15.10 in our lab, after first updating the version. Then, we downloaded the brand new version of Pinguy Builder, Beta 4.3.3. As of Ubuntu 15.04, you also need to install the xresprobe package [7]. Make sure that any previously installed versions of Remastersys are uninstalled.

After changing to the download folder in your home directory, install the downloaded DEB package with sudo dpkg-I pinguybuilder_4. 3 3_all_beta.deb . In our latest test version, there were complaints about 60 missing packages. Because DPKG does not install any dependencies, you need to install these packages by typing sudo apt -f install (Figure 1). But, you can also handle the installation in the Software Center GUI. After the installation completes, you can start Pinguy Builder from the menu or at the command line. If you want to test Pinguy Builder in a VirtualBox, you first need to create a fixed size disk, instead of a dynamic disk. I recommend at least 15GB for this purpose.

Figure 1: Pinguy Builder has a number of dependencies.

Backup or Dist?

Next, you need to enter your root password; you are also prompted to close all other windows and umount network shares before continuing (Figure 2). Then, a somewhat outdated-looking graphical user interface opens at the top, with three tabs named Actions , Settings , and Output . The first tab lists four options for using Pinguy Builder at the top. Backup is used to build a precise image of the system with all the settings and output. The Dist option does the same, but it excludes your personal data and user-scoped settings (Figure 3).

Figure 2: Close other windows before running the script.
Figure 3: Dist mode creates an image without any personal data.

The other two options – Distcdfs and Distiso – divide the process into two parts, which allows for further editing. The first part creates a filesystem, to which you can add more data or packages, and the second part builds the image based on it. The fifth button removes temporary files before building. You can add customized themes for the boot manager in the Live CD, the installed system, and the Plymouth boot screen in the lower part of the first tab.

A Question of Settings

In the second tab, you can change the predefined working directory, if necessary, and define a label and name for the final product. The working directory must reside in a Linux filesystem on the installed system. You can also change the options for SquashFS [8], if necessary, and you can exclude files or folders from the ISO. Next, you can choose one of the options to launch the operation. The two first options take around 30 minutes on state-of-the-art hardware, with the lion's share consumed by SquashFS assembling the ISO (Figure 4).

Figure 4: SquashFS takes about half an hour.

We reduced the size of the existing installation for the test by removing around 400MB of packages. The resulting image is stored in /home/PinguyBuilder/PinguyBuilder (Figure 5); you can now burn it to a CD or put it on a memory stick. The developer recommends testing in VirtualBox before further use. The maximum possible size of the ISO is 4GB, limited by the ISO9660 standard.

Figure 5: The ISO image appears in the PinguyBuilder.

Conclusions

All told Pinguy Builder, did the job in a satisfactory way. That said, it does lack documentation. The fact that you might need as much as 15GB free space should be displayed more prominently. Many users will want to test the procedure in VirtualBox. The 8GB virtual hard disk generated by default is definitely too small. The ISO image we created booted and ran without any problems.

Pinguy Builder is a very relaxed way to create an individual image of an installation built on Ubuntu or any Ubuntu derivative. Basic knowledge of the operations abstracted by the GUI is not necessary. We really liked the fact that you can quickly create a backup with all your personal information, or alternatively, a distribution without any personal data. The second part of the two-step process lets you personalize the installation (Figure 6). Note that Pinguy Builder does not work in Debian because several Ubuntu packages are not available in the Debian repositories.

Figure 6: The second part of the process lets you change the image in Pinguy Builder.