Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: HOWTO: Create your own Ubuntu

  1. #1
    Join Date
    Mar 2008
    Beans
    115

    HOWTO: Create your own Ubuntu

    Howto Create your own Ubuntu

    There are a lot of articles on the Internet, how to customize a Windows OS or a Linux distribution. On Windows platform, you can use nlite for Windows XP or vlite for Windows Vista. There is a similar program for Linux, it is able to create a distributable live CD about your present system. My only problem is that if I install an original Ubuntu (or any derivation of it), it has a lot of unnecessary thing, which will be never used by me. I decided to build an own one. Here it is.

    Some weeks ago, I have found an article to build up a customized Kubuntu, on www.howtoforge.net site. The idea is simple: the author using an Ubuntu server version instead of a desktop system because it doesn't have a graphical interface. My problem is that I have to change the kernel and at this point, there are a lot of possible errors; furthermore, it is a Kubuntu system, what I don't like, so I have changed KDE and KDM packages to GDM and to GNOME. The result was not exactly equal to my expectations because I couldn't utilize the X while Daneey forummate from www.prohardver.hu didn't serve the solution: I have to install the xfonts-base package separately (strange: I could bypass this step using KDE). The second thing, which has changed my thinking, was n0_gAboR's recommendation – also on www.prohardver.hu.

    Let's have a look, step-by-step:
    Based on n0_gAboR's recommendation, I had the idea that there is an Ubuntu minimal release; I have searched and found it on https://help.ubuntu.com/community/In...tion/MinimalCD, so I have downloaded the x86 platform 32 bit version.

    I made a virtual machine and booted the iso. The Ubuntu bootscreen was a little bit strange for me:


    As you can see in the picture, if I want a normal installation, simply had to press ENTER; my target was to install a base system without GUI, so after the boot: prompt, I have typed:

    Code:
    cli
    On this way, only the base system will be installed with command line interface, so I can decide later, which packages should be installed, I do not have to change the kernel and furthermore, all the installed packages will have the up-to-date version. Of course, for this tpye of installation, you should have a broadband internet connection!

    The installation is very similar to the way of alternate installation, so I do not explain it; if you interesting in this topic, you can read it in Full Circle Magazine Issue #3. After the base installation had been finished, I began to build up my own customized system.

    Code:
    testuser@ubase: ~$ sudo apt-get install xserver-xorg gdm gnome-core xfonts-base pmount gnome-mount synaptic -y
    Xserver-xorg, gdm, gnome-core, xfonts-base, gnome-mount and synaptic are the parts of GUI and package manager; pmount is for mounting removable devices as a simple user. I have used the -y option in the above command; it means that there will be no confimation, all the questions will be answered with „yes”.

    Before reboot, I have forget an important step: it is a good idea to have the build-essential package; if missing, you can be in trouble in the future during compilation from source.

    Code:
    testuser@ubase: ~$ sudo apt-get install build-essential
    It is not absolutely necessary, but I usually make a reboot at this point.

    Code:
    testuser@ubase: ~$ sudo shutdown -r now
    (Starting the GUI, you can see an error below; the fast-user-switch-applet is missing but can be installed BEFORE loading up the GUI - THANKS for niccholaspage.)

    After the first login, I saw this:


    You can answer „Delete”, we will solve this manually:

    Code:
    testuser@ubase: ~$ sudo apt-get install fast-user-switch-applet
    Okay, let's have the next error:


    Really, this theme is missing:

    Code:
    testuser@ubase: ~$ ls /usr/share/gdm/themes
    total 12
    drwxr-xr-x 2 root root 4096 2008-07-20 15:05 circles
    drwxr-xr-x 2 root root 4096 2008-07-20 15:05 happygnome
    drwxr-xr-x 2 root root 4096 2008-07-20 15:05 happygnome-list
    There are a lot of possible solution; you can install this theme or an absolutely different one and set up as default theme – the choice is yours. I recommend to install a theme because the basic GUI is so ugly...

    As you can see above, there are three icons near the System menu. The two application launcher is empty, the Help is available from menu; we do not have any installed application, so I usually have deleted these.

    Okay, now you have a base system with GUI, but no applications. The decision is yours, what to install, I usually typed this command:

    Code:
    testuser@ubase: ~$ sudo apt-get install firefox-3.0 thunderbird openoffice.org flashplugin-nonfree sun-java6-jre sun-java6-plugin xpdf
    This line is so simple; Firefox for browsing the Internet, Thunderbird for e-mails, OpenOffice.org for handling documents, Flash, Java and Xpdf for viewing PDF-files.

    Now here comes the core of this article: Fragadelic have made the Remastersys program, which is able to backup our system or to make a distributable live CD about your system. I recommend to do not put any non-free software to our distribution to anybody. Only make a „clean” system, then the user of that system will install all the necessary additional programs, codecs and so on.

    Remastersys cannot be found in the official repositories, so you have to add its' repository to /etc/apt/sources.list with vi, or with nano, or with gedit:

    Code:
    ## Remastersys
    deb http://www.remastersys.klikit-linux.com/repository/ remastersys/
    Now refresh the package manager's known repositories and install Remastersys:

    Code:
    testuser@ubase: ~$ sudo apt-get update && sudo apt-get install remastersys
    After installation, you can found Remastersys in the System menu, not in Application menu. If you try to start it from menu, nothing happens; okay, let's start it from command line – now you have the error:

    Code:
    testuser@ubase: ~$ sudo remastersys-gui
    Cannot find either zenity or kdialog
    The zenity package enables communication for shell scripts over the GUI. If you do not want the GUI, you can start Remastersys from command line without „-gui”; you will get a little help about the usage of Remastersys. I have installed zenity and start Remastersys with GUI.


    First, I always select the Modify option, some parameters can be set up here, like the name of the iso-file, or the description of it. Now do not start to make your distribution, some preliminary steps needed. You have installed some applications until now and do not want to put the installation packages of these to your iso; maybe you can oversize the file and the CD-size will be not enough.

    Code:
    testuser@ubase: ~$ sudo apt-get clean
    Okay, you have cleared your system, let's start Remastersys and select Dist option. Remastersys begin to copy the current files and folders and will create the iso-file. During this work, you can take a cup of coffee or have a lunch, if you installed many-many applications.

    If the iso file had been created, it is recommended to test it on a virtual machine before burning it.
    If everything is OK, you should see the following during boot-up:


    I have the following experience regarding the new boot CD:
    - I didn't have enough patience to test the Check CD/DVD. It looks for me to freeze...
    - if I have started installation at Install Custom Live CD / Start Custom Live CD, during the installation it looks frozen at 94%. No, the installation will continue and will be successfull after so many minutes waiting, the installed system works.

    If you can see the above boot-menu, you have your own Ubuntu-distribution, congratulations!

    Notes

    These are here mainly for Remastersys.
    - it is strange that if I started the program from menu, right after the start it tells me that the iso had been created. Possibly it should start with gksu. If I start it from command line, it works...
    - ...if works, sometimes the program is crabby. I have experienced that it tells me: the cdfs filesystem is missing. At first issue, the installation of build-essential package helped me, at the second issue only reinstallation of Remastersys helped me. (Of course, it is possible that there could be a more sophisticated solution, this was my first idea – I didn't find anything about this at the support forum.)
    - if you start Remastersys from command line, you can see this message:

    Code:
    Recovery file "squashfs_recovery_filesystem.squashfs_12544" written
    If Mksquashfs aborts abnormally (i.e. power failure),
    run mksquashfs dummy /home/remastersys/remastersys/ISOTMP/casper/filesystem.squashfs -recover squashfs_recover_filesystem.squashfs_12544
    to restore filesystem
    To prevent future problems, record the command. It cannot be found in the Remastersys' log, so strongly recommended to record it or – if you started the program from command line – redirect to standard output to a file. If you experience problems, you will have the command to restore, you do not have to start the build again from nothing.
    - I have experienced that although I set up a background image to my desktop, it didn't become the part of the remastered system. I can imagine that the problem was that the picture was not in the system's place for background images.

    Okay, that's all from my side. You can see that we have the possibility to build up an own Linux from bricks and not so difficult – although I don't recommend for beginners, only all those who have some experience about Linux.

    If you have recommendation, ideas, criticism, notes – do not hesitate to contact me at sh4d0w808 (at) yahoo (dot) co (dot) uk. Hungarian versions of this article is available at http://logout.hu/iras/sajat_ubuntu_keszitese.html.
    Last edited by sh4d0w808; August 9th, 2008 at 06:38 PM.
    Being a target means being on the internet. End of line.
    Takedown blog (hungarian)

  2. #2
    Join Date
    Jul 2008
    Location
    /home/nicholas
    Beans
    207
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Create your own Ubuntu

    I tried this and when I ran remastersys and clicked to make the cd it said it finished in A second ans there was no file in the directory.

    EDIT:I'm stupid.So sorry.

  3. #3
    Join Date
    Jul 2008
    Location
    /home/nicholas
    Beans
    207
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Create your own Ubuntu

    By the way,Thank you for this awesome guide! I got a system working in no time.

  4. #4
    Join Date
    Mar 2008
    Beans
    115

    Re: HOWTO: Create your own Ubuntu

    Your welcome.
    Being a target means being on the internet. End of line.
    Takedown blog (hungarian)

  5. #5
    Join Date
    Feb 2008
    Location
    Portugal
    Beans
    22
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Create your own Ubuntu

    OK. This is a good tutorial.

    BUT, could you tell me how much MB ocuppies the CLI Ubuntu Instalation?

    You should do all this process with DEBOOTSTRAP and not with CLI Ubuntu instalation.


    Is very easy:
    1. Install deboostrap: sudo apt-get install debootstrap hardy /home/myubuntu
    2. After instalation go into /home/myubuntu in CHROOT mode
    3. Install all thing you want

    I thing you will get a strimmed ubuntu instalatio.

    Try it.

    (look for debootstrap tutorials or check some parte of this post http://ubuntuforums.org/showthread.php?t=688872)

    Good Luck.

  6. #6
    Join Date
    Mar 2008
    Beans
    115

    Re: HOWTO: Create your own Ubuntu

    Hello LuisPT,

    The base CLI system uses 539M. I do not have to take care about DEBOOTSTRAP as capink's ideas are used partially in Remastersys. Of course, U can do it manually without Remastersys, but that way requires more space on the harddrive, more time to copy files to the right place and so on.
    Being a target means being on the internet. End of line.
    Takedown blog (hungarian)

  7. #7
    Join Date
    Jul 2008
    Location
    /home/nicholas
    Beans
    207
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Create your own Ubuntu

    By the way,I think you should remove the image and text about the fast user switch applet and install it when people are still in the no gui system.

  8. #8
    Join Date
    Mar 2008
    Beans
    115

    Re: HOWTO: Create your own Ubuntu

    Quote Originally Posted by niccholaspage View Post
    By the way,I think you should remove the image and text about the fast user switch applet and install it when people are still in the no gui system.
    It is also a possible way, if anybody wants, then he/she can do this. I didn't know this until now, but i can imagine that somebody forget to install that package before using the GUI; I'd also want to show that here can be an error and it can be solved.

    Of course, thanks for this tip, I will add it to the article.
    Being a target means being on the internet. End of line.
    Takedown blog (hungarian)

  9. #9
    Join Date
    Feb 2008
    Location
    Portugal
    Beans
    22
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Create your own Ubuntu

    Quote Originally Posted by sh4d0w808 View Post
    Hello LuisPT,

    The base CLI system uses 539M. I do not have to take care about DEBOOTSTRAP as capink's ideas are used partially in Remastersys. Of course, U can do it manually without Remastersys, but that way requires more space on the harddrive, more time to copy files to the right place and so on.
    May I disagree with you?

    Well the main diference between my approach and yours is that your base CLI system uses 539MB, but mine (built by debootstrap) is only 41,3MB (tgz compressed), and I can even make it less than that.
    Do you see the diference? It's huge.

    You are not installing the ubuntu base system, you are installing a server base system.

    Additionally, you can grab a file with debootstrap ubuntu base system and use it locally several times to build your own distribution (you only donwload once the ubuntu base system).

  10. #10
    Join Date
    Feb 2008
    Location
    Portugal
    Beans
    22
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Create your own Ubuntu

    duplicated post
    Last edited by LuisPT; August 10th, 2008 at 12:39 AM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •