Linux.com

Home Learn Linux Linux Tutorials Roll Your Own Customized Ubuntu With UCK

Roll Your Own Customized Ubuntu With UCK

Does the world really need another Ubuntu respin? Maybe not the world, but maybe you do. You might want to make your own customized Ubuntu to use in your business, or for your personal needs, or make your own ultimate rescue Ubuntu for performing rescue and recovery tasks on Linux, Mac, and Windows computers.

We're going to use UCK, the Ubuntu Customization Kit, to roll our own ultimate customized Ubuntu. We'll put whatever packages we want on it, and we'll make it a hybrid image so we can install it to a CD/DVD, USB stick, or hard drive. USB sticks are great for portable and rescue Linuxes because they are nearly as fast as hard drives, reusable, and you can save changes across reboots.

UCK is one of the easiest tools for creating a customized Ubuntu through a nice graphical wizard. It offers a root console option for more flexibility and advanced options such as using apt-get and tasksel, and for complete control, such as using preseed files, some hackable scripts. (Documentation is in /usr/share/doc/uck/html/.)

Prerequisites

UCK only works with Ubuntu, so you need to install it on Ubuntu or an Ubuntu derivative, such as Linux Mint. The package name is uck, which you install in the usual way with your favorite package manager. Then you'll need your chosen Ubuntu/Kubuntu/Lubuntu/etc. installation ISO, and you must have Internet access while uck is building your custom Ubuntu. You can't build for other architectures; for example you can't build an ARM image on an x86 machine, or a 64-bit image on a 32-bit PC.

You'll need a minimum of 5GB free space in your home directory, and of course way more is always better. If you have VirtualBox or some other virtualizer you can preview and test your custom images before copying them to other media.

A very important prequisite is to install libfribidi-bin. It is a required dependency that is not present in the uck package. If you don't install it your custom build will fail, when it is almost finished, with a "Failed to build gfxboot theme" error. This is is a bug going back to 12.04 or earlier, so sigh and deal with it.

Customizing Your Build

Fire up UCK and follow the prompts. These are the steps:

 

  • Select which language packs to install. To select multiples just click on each on; you don't need to use shift- or ctrl+click.
  • Select the languages you want available when you boot your live Ubuntu
  • Select your default language
  • Choose your desktop environment or environments
  • Select the Ubuntu installation ISO that you downloaded. I used Lubuntu.
  • Give your build a name, like Lubuntu-Custom
  • Do you want to customize the CD manually during building (using package utilities, console, etc.)? Well of COURSE you do, otherwise why are you here?
  • Do you want to delete all Windows files from the CD? Say yes to save space if you don't plan to mess with Windows
  • Do you want to generate a hybrid image (ISO/USB). Yes you do.

 

Now you'll see a message that the building will now start, with the location of your new ISO. This opens a terminal, and you'll have to enter your sudo password. Follow along as it updates package repos, removes unnecessary language packs, and then opens the customization dialog (figure 1). Run package manager opens Synaptic so you can select whatever additional packages you want. Use Synaptic in the usual way, searching and marking packages for installation. The base packages on your installation ISO are already selected, so you only need to select your chosen extras. Close Synaptic when you're finished, and you'll be returned to the customization dialog. You can then return to Synaptic if you need to, or select Continue Building to go to the next step.

UCK customization dialog

Run console application opens a root terminal if you prefer using apt-get, or any other custom commands you want to use. For example, you could install tasksel, the fabulously useful Debian installation tool that installs package groups such as LAMP Server, Virtual Machine Host, Audio recording and editing suite, various desktops, plus a manual package selector (figure 2).

UCK tasksel

Install and run tasksel this way from the UCK root console:

root@studio:/# apt-get install tasksel
root@studio:/# tasksel

You can generate a list of package groups and their installation status with tasksel --list-taskstasksel --task-desc [package group name] displays the description, and tasksel --task-packages [package group name] lists all the packages in the group. Consult man tasksel for complete options.

When you're finished running commands in the root console type exit to return to the customization dialog. You can run Synaptic or the console again, or select Continue Building to go to the next step, which is building your new ISO. This takes just a few minutes, and when it's finished you'll see a Build Success dialog that tells you where to find your new Ubuntu image, and how to quickly test it with qemu.

lubuntu in virtualbox

Copying to Installation Media

Use the excellent http://unetbootin.sourceforge.net/ to install your new custom Ubuntu to a USB stick. Use the "Space used to preserve files across reboots" option to save configurations and files, and to not have to start over with every reboot. This is a great way to make a personal portable Ubuntu you can carry with you anywhere. Any PC or laptop made in the last 7 seven years should reliably support booting to a USB device, though you may have to enter the BIOS to allow USB booting. In many BIOS pressing the F12 key opens a boot device selector.

For making a bootable CD/DVD use the excellent K3b or Brasero. When you boot your new custom Ubuntu you'll have the option to either run it live from your boot media, or install it to a hard drive.

Other Ways to Roll Your Own

UCK is a great introduction to creating a customized Linux distribution. Here are some other roll-your-own tools you might be interested in:

 

  • SUSE Studio builds virtual machine images, cloud images, hard drive and removable media images
  • Linux From Scratch is a great way to learn to build a distro from source code
  • DebianCustomCD builds Debian from scratch.

 

 

Comments

Subscribe to Comments Feed
  • Allen Said:

    I am fairly new to Linux, but really love the flexibility and performance. Thank you for the really good article. I do have two questions, if you don't mind answering them for me. Can you use Ubuntu Server and make a custom installation image using your article? When doing this to a server application, will there be any licenses or other items I need to worry about? Thanks much

  • Erinn Said:

    You can use Ubuntu Server, and any Ubuntu flavor or derivative. You only need to worry about licenses if you re-distribute your creation; if you're just using it for yourself then you can do what you want.

  • Allen Said:

    Thanks for the information. That is what I thought.

  • Allen Said:

    I was wondering if there is a way to do this with other distributions? I use CentOS and OpenSuse a fair amount at home as well as Ubuntu. Thanks,

  • Kafshiel Said:

    Excellent tutorial. And what a great tool too. I've just discovered it in linux.com and it's funny how i missed it previously. I'm on Linux since May and loving it. I also use Lubuntu which i have in my desktop alongside Windows 7 and in my netbook alongside Peppermint (yeah i really love LXDE!) so i'm gonna try to build my own Lubuntu, since i always spend hours customizing it the hard way, removing and adding packages. This tool is perfect to learn more about Linux and it's exactly what i wanted at this time because the new 13.10 is coming and last time i tried a dist-upgrade didn't worked very well but hey it was Beta anyway so i had to reinstall 13.04... That's what's amazing about Linux: the strong community sense and cooperation. Many thanks for sharing your knowledge with us and I will refer this article to other friends too.

  • dashesy Said:

    I have used Fedora's kickstart file for a long time. It is very powerful, and you can do all sort of customization. You can start from a bare minimum, and build any rootfs you can imagine, perfect for respins as well as custom devices.

  • cmcanulty Said:

    I am using Ubuntu 12.04 classic 64 bit and I get an error if I try to install libfribidi-bin and the web page only gives versions for 12.10 and up. I want to stay with 12.04 as it is long term support. I run 12 identical machines at our local library and would really like to use this! Thanks Here is the error from the software center, synaptic won't even let me try it

  • cmcanulty Said:

    it removed the error, here it is again dpkg: regarding .../libfribidi-bin_0.19.2-3_amd64.deb containing libfribidi-bin: libfribidi-bin breaks libfribidi0 (-install): installing libfribidi-bin would break libfribidi0, and deconfiguration is not permitted (--auto-deconfigure might help)

  • Juan Said:

    Thanks for writing this article. When It comes to launching the package manager, synaptic, I get an error, says it cannot find a package manager. Anyone else getting that? Is it because I didn't have synaptic installed when I installed UCK? Thanks

  • cmcanulty Said:

    help with installing libfribidi-bin on Ubuntu 12.04

  • Anirudha Said:

    I upgraded to ubuntu 12.10 cause libfribidi wasn't installing on it.. Now I followed ur steps but it gives me this err.. mkdir: cannot create directory `/home/anistark/tmp/customization-scripts': Permission denied

  • Damir Olejar Said:

    Please make sure that you are NOT using the Ubuntu Alternate install but Desktop instead (due to mising files in ISO)

Upcoming Linux Foundation Courses

  1. LFS230 Linux Network Management
    06 Oct » 09 Oct - Virtual
    Details
  2. LFS416 Linux Security
    06 Oct » 09 Oct - Washington
    Details
  3. LFD331 Developing Linux Device Drivers
    13 Oct » 17 Oct - Virtual
    Details

View All Upcoming Courses

Become an Individual Member
Check out the Friday Funnies

Sign Up For the Linux.com Newsletter


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board