Build your own distro part two

Discover the different methods available for creating your own customised distro and have everything working your way in no time

Fetching the Ubuntu MinimalCD ISO file

Start with part one to find out how to use Remastersys and SUSE Studio.

Ubuntu minimal installation

Canonical provides a minimal Ubuntu install CD. It’s smaller than the regular installation ISO and it installs a minimal version of the distribution. At its most basic, it gives the user a command line, network connectivity and not much else. From this bare-bones beginning, it’s possible to selectively add components while leaving out most of the cruft that tends to come with a standard distribution.

We’re going to work from within a virtual machine for safety and convenience. In our case, we’re going to use Oracle VirtualBox but any of the major virtualisers will work. Once we have it set up the way we want it, we can use Remastersys to turn it into an ISO that can be distributed. We can then transfer this ISO from within the VM to an FTP server.

Fetching the Ubuntu MinimalCD ISO file
Fetching the Ubuntu MinimalCD ISO file

Example deployment: Minimal Openbox Desktop

Fetch the installation media from http://tinyurl. com/ygawub and create a new virtual machine. 512MB is a sensible minimum when allocating memory, but more memory can also help greatly with speeding things up. An 8GB hard disk file should be adequate for most people’s requirements. It’s usually worth allocating as many CPU cores to the VM as you can.

Begin the customisation

Once you have booted the ISO from within the VM, begin by filling in the localisation details using the text mode interface. Next, the installer will attempt to find your network using DHCP. Following the network detection phase, fill in a hostname that will be used to identify this computer on the network. Once you’ve done this, select a mirror that is geographically close to your location.

The installer should now begin to download packages. Once the packages have come through the network, set up the username for the standard user. You should be able to use common sense to ask the question that comes next, regarding your time zone and default user and password.

When prompted, allow the installer to allocate the disk partitioning by selecting the ‘Guided – use entire disk’ option. Confirm that you want to write to the disk when prompted. The actual layout that you use now isn’t important as we will be producing an ISO that will carry out the installation of our custom distribution from scratch. Once the partitioning has completed, the installer will fetch the packages need for the base installation and begin installing them.

Customisation decisions

When the base installation is complete, you will be presented with the Software selection menu. At this point you have to make a decision. If you want to, you can select one or more of the provided templates. For example, you could select Kubuntu desktop option and have a fairly complete desktop system from the beginning. There are other options to establish a LAMP web server or a Mythbuntu media system, and many others. Most of the rest of this tutorial assumes that you don’t select any of these options so that we can customise completely from scratch.

More downloading and installation follows. Confirm that you want GRUB installed to the MBR when asked. This brings us to the end of the initial installation phase. Eject the ISO and reboot the VM when prompted.

First reboot

Upon booting the minimal installation for the first time, you should be prompted for your username and password. We can now start to customise the system. Install server and Openbox window manager (feel free to substitute another WM/DE if you prefer) by typing sudo apt-get install xorg openbox. When this has completed, type startx to test the GUI. Click on the backdrop to bring up a menu that will allow you to launch a terminal window.

Now you can begin customising the system. Make things as comfortable as you like, but remember that anything that is installed on this system will end up on the target system. sudo apt-get install firefox synaptic lxterminal mousepad lxdm will install and set up the Firefox web browser, Synaptic (GUI package manager), LXTerminal (more comprehensive terminal application), Mousepad (a GUI text editor) and LXDM (graphical login manager). That little lot will add about 30MB to the installation ISO that you will create, and about 100MB on the hard disk.

What you actually add is up to you. Apart from adding packages, you can add desktop customisations such as changing the backdrop. When you’ve got things just how you want them, create a distribution medium using Remastersys or a disk cloning tool such as Clonezilla.

Ubuntu Builder

Ubuntu Builder is a GUI application that allows you to take the contents of a standard Ubuntu installation ISO and modify it to create a new, customised ISO for redistribution. It’s a fairly simple application, however, and not designed for deep modifications of the type that some of the other methods allow.

Ubuntu Builder is a standalone application that runs on your desktop, and it even runs on distributions other than Ubuntu. It works by modifying a standard Ubuntu installation ISO, downloading and inserting or removing packages for you.

Step 01 The installation

Start by ading the Ubuntu Desktop PPA by typing sudo add-apt-repository ppa:f- muriana/ubuntu-builder into a terminal. Now run sudo apt-get update followed by sudo apt-get upgrade to update the package lists on the system. Use sudo apt-get install ubuntu-builder to carry out the installation.

Step 02 Launch Ubuntu Builder

You can now launch Ubuntu Builder by typing sudo ubuntu-builder in the Terminal or by clicking on its launcher icon in the launcher menu. At this point you should be able to see the basic root interface.

Step 03 Fetch ISO

You can fetch the current ISO by clicking on the ‘Get Ubuntu’ button in the main interface. However, it’s worth mentioning that we actually found manually fetching the latest standard install ISO from the Ubuntu website to be more reliable.

Step 04 Select and unpack the ISO

Point Ubuntu Builder to the standard installation ISO by clicking on the ‘Select ISO’ button. This should invoke the unpack procedure in a Terminal window, enabling us to modify the contents of the ISO. Wait for this process to finish.

Step 05 Add the MATE repository

Click on the ‘Edit sources.list’ button. This opens a text editor. Cut and paste the appropriate repository line (beginning with deb) from the MATE installation guide (

Step 06 Select MATE as the desktop environment

Click on the Select DE/WM button. In the menu, select MATE as the desktop. This should invoke a Terminal screen while the packages are replaced. Allow this process to finish.

Step 07 Create the remixed ISO

Click on the ‘Build’ button at the top of the main window. This will open a Terminal window that displays the progress of the ISO build process. This might take a long time (an hour or more) depending on the speed of your machine.

Step 08 Install the ISO

Use the installation disk in the same way that you would normally install Ubuntu… and that’s all it takes! You’re now ready to start using your new, customised distribution. Enjoy!