Creating custom Ubuntu images

Advanced Settings

Before you generate your custom image, Cubic gives you the option to make changes to some advanced settings. In the Package Manifest tab, you can determine which packages will be removed after a typical or minimal install (Figure 4). If chosen carefully, you may be able to create two distinct installation images using the delineation between Typical and Minimal to your advantage. For instance, if your organization has a mix of newer machines with plenty of storage and older machines with less, proper package selection here (or rather deselection) can streamline the post-installation process for both types of devices with a single image.

Figure 4: Specify the packages to be removed for typical and minimal installations.

Other options include modifying the ISO boot kernel (Figure 5), preseed files, and ISO boot configs.

Figure 5: In the ISO Boot Kernel tab, you can select the kernel that will be used to boot your custom ISO image.

Be careful with updating the kernel prior to generating the new image because this may cause installation errors. If you need to update in the terminal view, first simply mark the kernel in order to skip it for update [3] with:

sudo apt-mark hold <package-name>

Then update, followed by unmarking those same packages with:

sudo apt-mark unhold <package-name>

To avoid confusion if many packages are involved, use:

sudo apt-mark showhold

Once you have made all of your desired changes, press the Generate button to create your customized image along with an MD5 file for verification once generated (Figure 5).

After you've created your custom image, you have the option to delete your project files in the temp folder used to create your image (Figure 6). The final image may be written to a USB device for installation just like any other standard ISO image using Etcher, Rufus, or whichever image writer you prefer.

Figure 6: Success! If you don't want to save your project files, click the checkbox at the bottom to delete all project files.

Keeping Your Temp Files

Before choosing to delete your temp files, you might want to consider future uses for them. These files can come in handy if you need to create very similar but distinct images for different departments or different sets of devices. For example, one image may be used for network share devices, and a very similar but slightly different image may be used for web page hosting. All settings that are common to both device types can be applied globally with minor modifiers added for specific roles assigned to certain boxes. Therefore, specific distinct images may be created in quick succession. While this may not make sense for one or two devices, creating a customized image for dozens or hundreds of devices could end up saving an IT team hours or days, so think about future applications before clicking to delete project files.

Conclusion

If you have multiple devices running the same or very similar copies of Ubuntu, Cubic can save time on the back end with just a bit of thought put into a custom image on the front end. Granted, using Cubic is a balancing act between time spent creating the image versus time spent doing a post-install on your particular quantity of boxes. That equation will vary for different people in different organizations and environments.

Because I tend to break things at an alarming rate, I find myself setting up virtual machines and my home lab trash (it's my trash and I'm comfortable calling it that) with Ubuntu in the same way over and over again several times per year. For me, Cubic is worth the time and effort; Cubic provides everything I need for my particular use case in a 4-5GB image.

Try Cubic once to see how it can benefit you. If it's not worth the time in your current situation, perhaps one day it will be. Happy rolling!

The Author

Adam Dix is a mechanical engineer and Linux enthusiast posing as an English teacher after playing around a bit in sales and marketing. You can check out some of his Linux work at EdUBudgie Linux (https://www.edubudgie.com).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Custom Bootable ISO Images

    If you are looking to customize your Linux distribution, we show you three graphical front ends for creating bootable ISO images.

  • FOSSPicks

    This month Graham looks at Godot 4, PostRunner, LeanCreator, lurk, Cubic, SuperStarfighter, and more!

  • Tutorials – Minetest

    Minetest is much more than a clone of a certain popular proprietary game. It offers infinite customization that allows you to create blocks, objects, fun educational exercises, and even games within the game, dishing up features well beyond those of any other closed source alternative.

  • Command-Line Tools

    Learn more about Linux text-based multimedia utilities for playing streams, editing images, and reading CDs or DVDs from the command-line.

  • Rust Language

    We look at a few features of Rust, Mozilla's systems programming language, and its similarity to other languages.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News