DoudouLinux DoudouLinux

The computer they prefer!

DoudouLinux DoudouLinux

The computer they prefer!

The site's languages [ar] [cs] [de] [en] [es] [fa] [fr] [it] [ms] [nl] [pt] [pt_br] [ro] [ru] [sr] [sr@latin] [th] [uk] [vi] [zh]

> English > Contribute > Developers > How to generate a CD/USB image

How to generate a CD/USB image

March 2010 — last update November 2013

All the versions of this article: [English] [русский]

Warning: this article is obsolete and may not be updated soon. If you really want to build DoudouLinux by yourself, join our developer mailing list!

Building a new DoudouLinux CDROM or USB key image is not so complicated indeed: everything relies on few built-in Debian Linux tools. First of all you have to set your system to make it able to build such images. Then you have to get the DoudouLinux source code. You will find an included script which does all the job once all the required tools are installed!

1- Setting your system to make it compile live images

Currently live image generation only works with a particular version of the live-helper package patched with a small fix: live-helper 1.0.6-2. This package is no more available from official archives for Lenny/Squeeze [1] but it is still available at debian.doudoulinux.org since we made a copy before it disappeared from the Debian testing branch:

The best way to install it while avoiding the classical dependency mess is to declare our Debian repository then install it.

Note that the build script also uses time to monitor the build process duration [2]. Therefore you also need to install the corresponding package:

$ sudo apt-get install time

Now you have the tools to build a LiveCD! But you are not done… To speed-up re-building of LiveCD’s, Debian packages are not fetched directly on the Internet but through a package cache. So you need to setup a Debian package cache on http://localhost:3142/ if you don’t want to replace all URL’s instances occurring in configuration files. As explained on the Debian Live wiki page “cache packages”, this can be easily achieved using apt-cacher. You will then avoid downloading about 600-700 MB of packages [3] each time you build a LiveCD…

2- Getting source code

The quick way to get the DoudouLinux source code is to type this command:

$ svn co http://svn.gna.org/svn/doudoulinux doudoulinux

Unfortunately this will fetch the whole source code repository which already weights more than 60 MB. Note that the previous command won’t work until you install subversion, the code versioning system that we use:

$ sudo apt-get install subversion

If you don’t want to get all the DoudouLinux source code, you may prefer fetching only sub-trees. For our purpose of building a LiveCD, we only need the live/trunk/ branch:

$ svn co http://svn.gna.org/svn/doudoulinux/live/trunk doudoulinux/live/trunk

This branch only weights 10 MB as of writing.

NB: if you intend to participate into code development, you won’t be able to send modifications to the SVN server using this URL. Please use instead:

$ svn co svn+ssh://@svn.gna.org/svn/doudoulinux/live/trunk doudoulinux/live/trunk

This supposes that you can authenticate at Gna! and that you have provided an authentication key to your account.

3- Building an ISO CD image

Go into the live/trunk/ directory then invoke the build-img.sh script with the language directory name as sole argument:

$ cd path/to/doudoulinux/live/trunk/
$ ./build-img.sh fr
[…]
621.55user 185.93system 29:08.30elapsed 46%CPU (0avgtext+0avgdata 
[…]
computing SHA1 checksum file
final ISO image is ’isocd/doudoulinux-2010-03-fr.iso’
done!

CD image is built inside the build/ directory. After few (tens of) minutes - here 29 minutes, a CD image will be available in the isocd/ directory:

$ ls -lht isocd/*-fr.*
-rw-r--r-- 1 jm   jm     75 26 mars  21:31 isocd/doudoulinux-2010-03-fr.iso.sha1
-rw-r--r-- 1 jm   jm   608M 26 mars  20:47 isocd/doudoulinux-2010-03-fr.iso

An SHA1 checksum is automatically computed too in order to let users check their downloaded ISO image files. If you want to test your CD image, of course you can burn it, but you can also launch it inside a virtual machine. Both VirtualBox and qemu are known to be working but, due to the lack of virtualization acceleration in recent versions of qemu, we recommend using VirtualBox. Just create a new virtual machine with the CD image as CDROM drive, eventually add a small hard disk to test data persistence.

Note: if you want to rebuild all of the available languages, use all instead of the language two-letter code.

4- Building an USB key image

The script that builds LiveCD images can also build LiveUSB images. You just need to provide an extra argument usbimg:

$ cd path/to/doudoulinux/live/trunk/
$ ./build-img.sh usbimg fr
[…]

That’s all! If you want to test your USB key image, you can launch it directly using qemu but this is quite slow:

$ qemu -hda usbimg/doudoulinux-2010-05-fr.img

If you need to test it more intensively, you’d better write the image onto a physical device. For doing this you can use our tool liveusb-write. This is a simple GUI that detects external devices (USB) then proposes to write the image, create a second partition with remaining space then activate data persistence in a file of this second partition. liveusb-write is available from our Debian package repository and from the packages/ tree of our code repository.

5- Tips and troubleshooting

5.1- Use ext4 instead of ext3

If you use a recent kernel (≥ 2.6.29 or 2.6.30) you may store at least the live/ directory on an ext4 partition instead of a classical ext3 one. This has shown to increase build performance of 10%.

5.2- Error “No response for xxx”

Sometimes apt-cacher fails to answer without any reason apparently. Thus you can have some messages telling that your local package repository is not responding. Just restart the build process and usually all then gets ok…

5.3- Error “No candidate for xxx”

If you get a message like “No candidate for festvox-rablpc8k”, this means that apt-get was not able to download this package. The first thing to do is to check whether the package is actually missing from Internet package repositories or whether it is missing from the repository package list file. To do this, just search for the package on the Debian website. Then go to the bottom of the package page and try to download the file manually. If the package gets downloaded, move it into the live/trunk/localpackages/ directory. This is one of the purposes of this directory!

NB: we don’t know why such problem occurs but feel that this may be a Debian repository bug…

Footnotes

[1] This is due to the fact that DoudouLinux started in a Debian testing/unstable box with this version. Configuration files are not compatible with both the Debian Lenny version and the current testing/unstable one. Nevertheless these files will be modified in the future to work with Debian Squeeze.

[2] On a standard machine from year 2005 it takes 25-30 minutes, on a standard laptop from year 2010 it only lasts 15 minutes. This figures are obtained with package caching on.

[3] This takes as long as 10-15 minutes with my ADSL connection.


identica logo facebook logo google+ logo

Geographical location of visitors

DoudouLinux logo Debian logo TSPU logo Genesi logo Gandi logo Hosting Extreme logo Linux Jobs Reviewed by I love Free Software

Creative Commons Copyright © DoudouLinux.org team - All texts from this site are published under the license Creative Commons BY-SA

SPIP | template | Site Map| Follow-up of the site's activity RSS 2.0