Ubuntu – How to customize distribution with predefined user and automatic installation/configuration

custom-distributionscustomizationsystem-installation

I am working on Ubuntu customization for production level. The setup environment is explained below:

I have some Ubuntu machines (12 to be more precise) that runs a software made by myself for this business. It boots directly to the X, automatic log-in, then opens right away mysoftware GUI.

I would like to have a custom Ubuntu installation image (for USB stick, etc…) with predefined user, variable hostname and some customization that I have already made on those machines.

So, What is the best tool to create this customized distribution (based on my needs on customization, easy deployment/customization/creation)

My problem is, I have to turn the installation process more easy. Because the HDD clone process is wasting so much time for me. And with different hardwares, I have about three different HDD clones to match them.

What I would like to accomplish on this customization:

  • predefined username to log into automatically with
  • predefined session customizations ($HOME customizations for OpenBox, .ssh,.compton, etc…)
  • runs software right after automatic login
  • automatic predefined software packages installed (from apt-get, but without internet need)
  • variable hostnames (sales00, sales01, sales02, and so on…)
  • set of customized permission of system calls/programs (such as chmod 4755 on /bin/date)
  • customized /etc/skel for new user (just in case)
  • disable automatic updates
  • fresh network adapters configuration (today I have a mess on network adapters from each machine like eth49, eth88,). I wish they have all the same numbers
  • network adapters predefined static IP: I have three network adapters: one has a fixed IP for all machines (the same IP 1.1.1.1 for this, though), second and third network adapters are configured through my software. So I wish I have a custom installation that configures automatically this 1.1.1.1 IP for that network adapter

And so, again, What is the best Ubuntu custom distribution creator (studio?) to work with?

P.S.: I used to try PinGuyBuilder once, but it changed to default the permissions customization (like chmod 4755 on /bin/date) and has limitations like predefined username/hostname
Best Regards

Best Answer

What is the best Ubuntu custom distribution creator (studio?) to work with?

All of them lack some (if not most) of the features you list.

I would do this myself (manually). The way to do this is to download an ISO, create a "chrooted" environment with that ISO, hack away, burn ISO to a DVD and boot from it. I have to AU topics that have good info:

The 2nd one is very generic (works across different releases) since it does not have a desktop and you can add it yourself on top of the server.

Your list with comments, without providing actual methods on how to do each though. I leave that up to you ;-)

(comment: a kickstart file is a redhat feature for automated installers. Ubuntu has limited support for it but it can be a starter to get going).

  • predefined username to log into automatically with

    • This can be done from a kickstart file and is pretty normal to change for a personal installer/ISO. So most will have this but is also easily done manually.
  • predefined session customizations ($HOME customizations for OpenBox, .ssh,.compton, etc...)

    • Doubt any of those kits can do this. But the manual method can be used to add packages into your own install so you can also create configurations files. Problem here is that you probably will need to recompile from source since the default configs are not human readable.

      If possible a far easier method would be to drop a config file from your own machine into /etc/skel/ and move it to the correct location after install.

  • runs software right after automatic login

    • Configuration of "startup applications". You only need to edit a text file.
  • automatic predefined software packages installed (from apt-get, but without internet need)

    • can also be done from a kickstart file. Or manually: when you create your own ISO you add your files to the DVD yourself using "apt-get" or by copying the archive cache from your machine into the ISO.
  • variable hostnames (sales00, sales01, sales02, and so on...)

    • If you already have a host set up like this it will be as easy as copying that file over to your ISO.

    • set of customized permission of system calls/programs (such as chmod 4755 on /bin/date)

    • Yuck ;-) You can chmod the file on the ISO. Of course you can also add your own post-install script file to the ISO.

  • customized /etc/skel for new user (just in case)

    • Easy with a manual method since that is the method to set up your user. That dir is used to create your user home and files like ".bashrc" with the options/parameters/etc set in /etc/skel.
  • disable automatic updates

    • that is a setting ... so can't be more than an edit of "gsettings". By the way: should already be set to "off" so doubt you need to do anything for this.
  • fresh network adapters configuration (today I have a mess on network adapters from each machine like eth49, eth88,). I wish they have all the same numbers

    • this one I am not sure about. I would assume these things get created during boot(?!) so doubt it will be something you can set up upfront. But if this is configurable during install I you will be able to add/edit the files you need for this (/etc/network/interfaces or dhcclient )
  • network adapters predefined static IP: I have three network adapters: one has a fixed IP for all machines (the same IP 1.1.1.1 for this, though), second and third network adapters are configured through my software. So I wish I have a custom installation that configures automatically this 1.1.1.1 IP for that network adapter

    • you can set this up on the ISO in the same fashion as you would with a normal install.
Related Question