Create Your Own Ubuntu Distro

Posted by ubuuser on Feb 28, 2012 5:28 AM
LXer Linux News

LXer Feature: 28-Feb-2012

If you have been using Ubuntu for several releases now, you know the time you had to spend on your computer on the installation day, e.g to configure different nuisances, install your work software, your favorite stuff etc. One such thing is multimedia support, sometimes networking issues, graphics issues and so on. If you break your system during that process you either dig deeper into the problem or start over again. Even after installation of Ubuntu, you want certain things Ubuntu ships to not be there. Many times I have had to remove certain default packages to make Ubuntu more to my liking. Today I will show how to create your own custom ubuntu DVD.

I will share why I choose to keep certain packages, why I chose to remove certain packages from the default installation and so on. I want to make an Ubuntu DVD that has everything I need (all the software I use), some development packages that I need on work. I will even install some media packages and photo software so that I can share this DVD with my friends at work. So the DVD should also contain some development software, php, mysql, jdk, vim, virtualbox, some productivity applications, small games, some networking tools.

Since I'm sharing this DVD with friends at work, I have to make sure I will not break their experience by including heavy games which does not run on their old computers. You have to be extremely careful about the targeted people who will be using the software. One thing to always keep in mind is you have to make sure it works for you (your best setup) and after that you have to think for others. If you cannot use it for yourself, nobody else can. If you know your target setup needs some wireless drivers and stuff make sure you include them as well.

There are three things most important for a Linux based operating system. The kernel, graphics drivers and networking. These three things are the basis for determining if a Linux distro will run effectively or not on your computer. After these three things is multimedia, the fourth factor that determines how usable a computer operating system is for a general user. If you get these four things right the battle is all but won. The first thing I consider while creating a new distro is getting a new kernel (new kernel means new drivers, bug fixes and a good basis for graphics drivers). After that I get new graphics drivers for mesa 3D acceleration. With every new kernel releases you might even get support for more networking drivers. If your wireless did not work on previous Ubuntu installation make sure you install those as well.

Note: Make sure tmp directory in your home have lots of space if you want to create a dvd with huge software. In my case (initially with 7 to 8 G space in /home/username) I was not able to copy 350M of eclipse directory to /opt (of new installation, which off course was inside /home/username/tmp directory), because I had only 2.9 G left before last packaging. Final DVD size was 1.8G. If you create a tmp directory inside some other drive which has enough space and link it inside home, it might work.

Step 1: Install Ubuntu customization kit.

Download the deb file from and install it.

Step 2: Run Ubuntu customization kit.

Choose your language and choose your ubuntu 11.10 cd as the base. I assume you will select Gnome (if you want to include gnome-shell as well on your ubuntu dvd). When you are presented, if you want to "Run console application" choose this option and you will be greeted with a terminal. Do not fear the terminal because I am here to help.

Step 3: Including software sources.

Some of the extra software I want to install is jupiter (a power setting tool), the latest blender, a new kernel, the latest transmission bit-torrent application, latest graphics drivers, vlc etc. So what I do is I open /etc/apt/sources.list using gedit and add some sources.

# gedit /etc/apt/sources.list

deb oneiric universe

deb oneiric-updates universe

deb oneiric multiverse

deb oneiric-updates multiverse

deb oneiric partner

deb oneiric main

deb-src oneiric main

deb oneiric main

deb-src oneiric main

deb oneiric main

deb-src oneiric main

deb oneiric main

deb-src oneiric main

deb oneiric main

deb-src oneiric main

deb oneiric main

deb-src oneiric main

deb oneiric main

deb-src oneiric main

Once you have pasted above text into /etc/apt/sources.list and saved it, close gedit. Now we need to make our package manager aware of those new sources so that the next time we request some software it gets us the most recent versions.

Note: There are some "security key mismatch" issues regarding some sources, I ignored them because they did not matter to me. Run following commands;

# apt-get update # apt-get dist-upgrade # apt-get install synaptic

The first lines update the package manager with new sources, second line installs all updates for default installation so that we get updated versions of all our already installed software and the third line installs a gui based package manager software.

4. Remove some default packages (Optional). (You can even do this step before dist-upgrade to save some bandwidth)

This step is extremely optional. Don't use this if you are happy with default ubuntu packages. However I don't like to notified about updates unless I choose to get them myself via update manager. I don't like music lens that ships with ubuntu, because I choose to open music application and play my playlist. I don't like banshee music player and I don't like the dejadup backup tool. Instead of banshee I would like to install clementine (which has a useful feature of dragging files from playlist to copy songs to your different devices e.g mobile phone), it has good equalizer (I configure it using settings from vlc, it has smart playlist and lyrics option. I also don't like desktop version of ubuntuone and its always running process.

Start synaptic and search for packages like lens and remove music lens, search dejadup, ubuntuone, update notifier, banshee and remove them completely (not just remove). What packages to remove is to your personal taste.

5. Install some software

While we did dist-upgrade we automatically installed packages like xserver-xorg-video-intel (graphics driver for Intel hardwares) latest mesa, new kernel etc. This option takes care of those black screen of death in sandy bridge processors in default 11.10 installation. Next is to install your software. Below I will include command to install all software I want to install on this setup, feel free to remove or add any software you want for your installation.

apt-get install vlc vim vim-gnome turpial liferea ubuntu-restricted-extras clementine artha audacity openjdk-6-jdk gimp p7zip-full unrar chmsee radiotray geany inkscape audacity wine1.3 mysql-query-browser mysql-admin samba remmina mysql-server mysql-client php5-mysql apache2 umbrello userconfig soundconverter openshot pokerth xmoto gnome-hearts compizconfig-settings-manager skype:i386 winetricks linux-headers-generic linux-generic linux-libc-dev transmission meld phpmyadmin mypaint glchess lbreakout2 quadrapassel ant maven2 ssh git subversion bluefish kompozer blender chromium-browser cheese nautilus-open-terminal nautilus-gksu nautilus-wallpaper gnome-sushi backintime-gnome ooo-thumbnailer gedit-plugins gedit-developer-plugins virtualbox keepassx g++ shutter frozen-bubble wireshark zenmap speedcrunch furiusisomount pdfmod x11vnc miro ffmpeg kget elinks-lite focuswriter minitube espeak-gui winff libavcodec-extra-53 gtk-recordmydesktop phatch darktable syncropated cryptkeeper gnome-brave-icon-theme kolf bum gnome-tweak-tool powertop jupiter tree gnome-brave-icon-theme blubuntu-theme ubuntustudio-icon-theme gtk2-engines-oxygen gufw xsel system-config-samba dconf-tools libsvnclientadapter-java

Note: As I have installed mysql at the end of installation it will ask me for my root password (indeed it will ask many times), choose a password that anyone can guess, e.g admin. If you correctly configure phpmyadmin it needs password for root, so make sure you know what you are doing. If you leave the password blank you need to setup password for phpmyadmin from configuration file yourself. For ttf fonts accept eula.

I will install vlc, gvim, twitter clients, desktop news reader, mp3 and video not playing issues on default Ubuntu, off-line dictionary and so on. If you want to know what a package does use show option of apt-cache to find out more. E.g if I want to know what package winff is for, I will type following command.

# apt-cache show winff

This command shows general information about winff

6. Configure some obvious (Optional).

This process is completely optional. If you want to include some software not included on Ubuntu's repository or ppa do this stuff. E.g If I want j2ee version of eclipse to be included with Ubuntu. I will copy eclipse to /opt, Change its permission to 777 (I want to install any software from market place, don't know must about read, write and execute permission, if it will be preserved on the DVD), create eclipse.desktop in /usr/share/applications/ directory, put a nice icon on eclipse installation directory and point it in eclipse.desktop. Find a nice eclipse.png icon and put it in eclipse installation directory.

Here eclipse.desktop for reference [Desktop Entry] Type=Application Version=1.0 Name=Eclipse Comment=Programming IDE Icon=/opt/eclipse/eclipse.png Exec=/opt/eclipse/eclipse Terminal=false Categories=Developer

Note: I have svn configured in eclipse and installed libsvnclientadapter-java and I have a line in eclipse.ini after -vmargs -Djava.library.path=/usr/lib/jni

Now you just have to copy your eclipse installation to /opt directory of this setup. If you run # mount you can see where your current drives are mounted. You just have to copy the relative software directory to current paths. E.g I have eclipse on /media/somedrive/apps/eclipse to /opt I will execute following command (or run "nautilus" command and do it graphically).

# cp -R /media/somedrive/apps/eclipse /opt # chmod -R 777 /opt/eclipse

The above commands copies (recursively) the eclipse directory from my installation directory to /opt and sets its permission so that any user can install normal software later via market place. After these steps (eclipse.desktop in /usr/share/applications) eclipse should be available in menu.

If you want to make the eclipse shortcut available on Desktop of your installation copy eclipse.desktop (from /usr/share/applications/ which we created earlier) it to /etc/skel/Desktop (if /etc/skel directory does not have this directory create it) # mkdir /etc/skel/Desktop # cp /usr/share/applications/eclipse.desktop /etc/skel/Desktop

This step was little daunting, but at least it gives you an idea about what things goes where, you might have some software e.g say netbeans for web developers, which you might want to include on the default installation. Though in case of netbeans its just the matter of copying it to this setup and run it on terminal (make sure glassfish and or apache is runnable as normal user (give it permission 755 as we did above for eclipse)).

6. After everything has finished installing proceed to next step (close current terminal and choose Continue building" and let it create an iso for you. You can install this iso on virtualbox, or on your default computer, share with friends. One thing you can be sure of, if you don't delete the tmp directory (inside your home), you can repeat all above steps and you still don't have to download the packages, because those are already downloaded and won't have to download them again. So, before determining it is the best setup you can play with things e.g configure wallpapers for lightdm, desktop, choose theme, icons and stuff.

Good Luck!

Return to the LXer Features

Subject Topic Starter Replies Views Last Post
Another simple way to create your own DVD Ubuntushastri 1 1,619 Feb 29, 2012 12:57 PM

You cannot post until you login.


  Latest Features
Dr Tony Young: A KMail Breakthrough.
May 01, 2016

James Dixon: Installing jstock with Slackware 14.1
Jan 19, 2016

James Dixon: Installing sbopkg with Slackware 14.1
Jan 16, 2016

James Dixon: Open Source Wealth Management
Jan 15, 2016

Hans Kwint: GNUifying Windows: Make the best of imposed Windows-use at work
Oct 23, 2015

Dr. Tony Young: Update to "How long is a piece of string?"
Oct 20, 2015

Russell Hollander: Chromebooks, Linux, and Lenovo
Sep 23, 2015

Scott Ruecker (Phoenix, U.S.) : Interview With Richard Kenner of AdaCore
Aug 29, 2014

penguinist: Better Than a Quad-Head Display: My Adventures with "4K" 2160p and Linux
Mar 31, 2014

Dr Tony Young: Replacing KDE4 with Xfce
Mar 07, 2014

View all

  Search Features

Search LXer Features:

[ Copyright © LXer | All times are recorded in Central Daylight Time (CDT) ]

[ Contact Us | Privacy Policy | Terms of Service | About us | rss | Mobile ]