Tag - LiveCD

One of the issues our translation team has been facing for a while, was the long delay between the moment at which translations of messages are recorded on Transifex and the moment at which they are available in a stable release of DoudouLinux. This issue was highlighted more than one year ago as a potential cause for motivation loss of our translators (now more than 200 people working on 50 languages!). One of the proposed solution was to automatically fetch translation updates from Transifex every night in order to build nightly updates of all the translations, using the standard Debian package system (“apt-get upgrade”). This solution is now active: new translations should be available to every one the day after they are recorded on Transifex :). Instructions can be found on our website.

To achieve this, we set up a dedicated repository for our nightly Debian packages, that we called “DoudouLinux volatile”. It provides 2 types of packages: doudoulinux-l10n for applications, doudoulinux-icons for icons on the desktop of the most advanced activities. Around 00:30 GMT every night, a script is launched on our build server. It will offer newer updates packages two hours later whenever a message has been detected as changed or new on Transifex. Of course this assumes we can get all the modified files from Transifex without being blocked by their anti-DOS attack system (which already happened during our tests). May this happen, we would have one day or more of additional delay before publishing translations updates.

How does it work? The server owns a local copy of several branches from our SVN code repository and is able to query Transifex servers using their Python client application (CLI client). The process of building package updates is the following:

SVN files are re-synchronized with the HEAD version.

If SVN updates cause translation files to be updated (PO/TS files), any previous local change in these files is first reverted.

The current stable version of DoudouLinux, Gondwana 1.x, requires to download a different file if you want to burn a CD or to write an USB key. Since Grub2 is now able to boot the kernel image that is contained into an ISO file, it is possible to boot a Live ISO written onto an USB key and then to only use the ISO file whatever the target support. This is of course very practical but doesn't work on Debian Squeeze Live images without a dedicated patch called findiso. We have included this patch in the latest development release, 2013-02, that will be turned into the next stable release Hyperborea 2.0 around April/May. Doing so provides several advantages:

Only one file to be downloaded, per language.

Easy system update on the USB key: just replace the ISO file with the newer one! (and update Grub parameters)

A single FAT partition can be preserved on the USB key, allowing the normal use of an USB key, especially on capricious systems that can only read FAT :p (do you really keep using these old-fashion systems???).

Ability to have several flavors of DoudouLinux on the same key, for example the stable release and the development one, or several languages.

Does not require to reformat the USB key and then should lead to better R/W access performances by preserving factory settings.

Of course it is better for DoudouLinux developers too since we don't need to test the USB image anymore. This also solves the issue we had with isohybrid images that don't run on every computer and also broke our persistence activation tool… So now let's see how to take benefit of this new feature :). Beware: the process to turn an ISO file into an USB live system is done from the command line! Ready?

Installing Grub2

NB: Here we are using Grub2 from a Debian system but, if you don't care about copying the kernel image and its ramdisk onto the USB key too, this should also be possible to use any other bootloader (no test ever achieved though).

You need to have Grub2 installed in your system. If not, install the corresponding package. A particularity of Grub2 is that it doesn't fit anymore on the very small 512 first bytes of a disk. It has then 2 alternatives:

If the first partition starts at the cylinder number 1 instead of number 0, there may be enough space after the first 512 bytes for Grub to copy all its files. As they are outside any partition, they should be preserved from any modification.

If there is not enough space before the first partition, Grub uses sectors in the first partition and records their position in the first 512 bytes. Of course the file system in the first partition may move these sectors without Grub knowing, this is then not 100% reliable.

If you are in the second situation and want to change to the first one, you have no other choice but reformatiing your USB disk. Grub displays a message during its installation when you are in the second situation.

So now let's install grub onto the USB key. We need to mount it and launch the Grub installation command:

As you can see, the boot flag (second column of the partition information table) is not set since there is no * sign in this column. So in the fdisk prompt, type a to activate the partition. fdisk will ask you to enter the partition number (ie. 1). You then just need to write the partition table by pressing w:

We have chosen to put all the files into the /boot directory that Grub made, but you can choose any other directory on your USB key. The Unicode font is required if you want translated messages in the Grub splash screen. So now everything is ready to get DoudouLinux boot, except that Grub hasn't been configured…

Setting Grub2, quickly

The Grub configuration must be placed in the file “/mnt/boot/grub/grub.cfg” that does not exist yet. A very basic setting of Grub2, to start the ISO, is the following:

Of course isofile is the name of the ISO you want to boot, change it to fit your needs! In these settings we tell Grub to mount the ISO file so that he can access the kernel image and the ramdisk image file into it. This feature is only needed to launch the kernel with the minimalistic system in the ramdisk. This minimalistic system will then use the boot parameter findiso to find the ISO file and mount it into the final Linux system, DoudouLinux.

If you wonder how we could have written so long a boot parameter line, well, that's just the LiveCD boot line with few arguments removed or added :). To retrieve it, mount the DoudouLinux CD and look in the file “isolinux/live.cfg”. Note that you may have to change the localization parameters of this boot command for your particular use:

locales → your language settings

keyboard-layouts → your keyboard layout

keyboard-variant → your keyboard variant

keyboard-options → your keyboard options

utc → whether your computer clock is UTC or local time

timezone → your timezone

Don't forget to unmount your key:

$ sudo sync
$ sudo umount /mnt/

So now you should have a booting USB key that launches DoudouLinux, except that the Grub screen is not very nice. Let's see how to improve this.

(update of 2013/02/21) NB: once you've launched DoudouLinux on your USB key, you can use its persistence tool to make a persistence file on the USB key so that your DoudouLinux system won't loose user's work :).

Setting Grub2 for real

In the following Grub configuration file we have added:

language settings, to get translated Grub messages

video modules to show the background image

colors and background image

classes to the DoudouLinux system entry, in case you want to graphically customize this entry

This is a bit more complicated but the result is as expected: a graphical boot as early as Grub! You now have no reason to not have DoudouLinux everywhere with you since it can also be on your USB stick of everyday use :).

One issue we have with the DoudouLinux ISO images is that, since it is designed to start without any user interaction, localization parameters are preset inside the ISO and cannot be easily changed. While this can be acceptable for most language variations (eg. French from Canada and French from France do not differ that much), this can be a real issue for the keyboard layout and the timezone. Indeed, if you try to teach children the keyboard and that it outputs an Azerty layout while you only have Qwerty ones in your country, this is rather annoying… This is however the case between France (Azerty), Canada (Qwerty) and Switzerland (Qwertz) in which French is spoken. Currently the only official solution is to play with combinations of Left Alt+Shift to change between predefined CD keyboard layouts[1].

So, as we can't propose an ISO for each country and each timezone, we have created a ticket quite a long time ago about this issue[2]. The problem to solve is that localization parameters are computed at each CD boot. It is then not possible to make changes persistent without patching the Debian live tools we're using for DoudouLinux. The only solution right now is then to unpack an ISO, change whatever needed, then repack a new ISO. We are indeed lucky enough to not have to unpack the whole CD filesystem because the CD localization parameters need to be accessed during the early boot process and then are contained in the CD boot parameters. Our relocalization process is then simply the following:

Unpack the ISO image

Change the boot configuration file

Repack the ISO image

To achieve this, we will use rsync and genisoimage from the Debian packages of the same name. So first let's “loop” mount the ISO then copy its content into an empty directory:

The first line is the default boot entry, the second one allows to disable any live persistence that would have been set formerly. You can change or add the following parameters:

locales, this is the interface language, eg. fr_FR.UTF-8

keyboard-layouts, self-explanatory, it can be a single layout, eg. fr, or a series, eg. fr,us,de

keyboard-variant if you need to use a particular variant, eg. the French variant in Canada fr-legacy

keyboard-options if you don't need all the stuff we added to DoudouLinux like Left Shift+Alt

notimezone can be replaced with a particular timezone, eg. timezone=America/Montreal

utc=yes sets the hardware clock to UTC, utc=no sets it to the local time

Note that if your machine is unluckily running Windows :p, you have to set the hardware clock to local time. If it runs Linux, you probably have to set it to UTC. On the other hand, if the hardware clock is the local time, preserving the setting no timezone should automatically get the correct date and time. A list of timezones can be found on Wikipedia. Concerning keyboard layouts, the answer is at the bottom of one of our README files. Finally language codes and country codes can be found on Wikipedia too.

So, for a Canadian/Québec setting, we might use the following parameters:

Of course, once the job is done, cleaning useless files is a good idea:

$ sudo rm -fr isofs/
$ sudo umount /mnt/

Here is a screenshot of the resulting environment that you can't currently get out of one of our CD's without modification:

That's it!

What we are now dreaming of is a simple set of web pages that would allow to queue such ISO customization online. Our web server would do the job of unpacking/setting/repacking using its own set of CD's and would then send an email to users for them to download the resulting ISO before it is removed to make room for other users :). Any volunteer?

PS: credits to the Linux Mint ISO relocalization tool for the source of the command lines.

Notes

[1] DoudouLinux CD's are often configured with Azerty, Qwerty and Qwertz keyboards

“Summertime, and the livin' is easy” (G. Gershwin), especially with DoudouLinux as you now know since this is our main goal ;). We've just uploaded several new dailybuilds to let you test our new features with your children during the long summer break. Here are some screenshots and screencasts:

You can download the dailybuilds from our Dailybuild download section. The file names follow the pattern doudoulinux-2012-06-*, LiveCD and LiveUSB images are available. We provide these builds in English, French, Italian, Russian and Spanish. An ARM™ version for Genesi Efika is available as well, in English and French only:

Although we still haven't brought all the feature we would like, we are getting closer to the final release that will replace our current stable release named Gondwana. The feature we are really lacking is a real and easy installer that doesn't require to be already installed on the LiveCD. You can help if you want to :). For this reason, the development version will not be turned into the next stable release before September, instead of June as planned initially.

The default behavior of DoudouLinux is to show the menu of activities (see below) after the system has started and as soon as any activity is leaved. This is good for small children because the activities menu offers activities in the increasing order of difficulties, from top to bottom. However, for older children, the first activities are or will quickly become of poor interest. This is why the list of activities shown – but not their order – can be changed with the activities menu editor .

However the oldest children may still have no interest at all in seeing a menu of activities, since they will surely login into “Whole DoudouLinux”. The new version of the activities menu editor can now do this. The trick is quite simple: if only one activity is selected in the menu, DoudouLinux will not show the activities menu but instead will enter this activity directly. Activities menu settings are recorded in the directory /home/etc/, which means that any data persistence (user data or user+system) is sufficient to make settings survive a reboot or a shutdown.

This new version of the activities menu editor will be available with next releases: the coming development release numbered 2011-11 and the planned official release update Gondwana 1.2, due to mid January.

Currently the DoudouLinux installer just copies onto disk the Live media as is. While this is very practical for us and brings interesting features to users (rock-solid read-only system), this also has drawbacks:

the system is still compressed and slows down startup on old computers

you can not remove software

upgrading software creates a duplicate version of each software

many boot parameters cannot be changed (they're not persistent)

One of our most active contributors, Richard, suggested to use Remastersys. This is a tool whose goal is to perform full system backup onto a Live CD for Debian-based distributions. One of its features is to let users re-install a clean system onto hard disk from the Live CD: just what we need!

Thanks to it, on a laptop from 2003-2004, DoudouLinux is now booting in 40s instead of 120s from CD. I installed the system in 3 separate partitions: root, home and swap. The root system needs 1.9 GB so you have to setup at least a 2.5 GB root partition. Of course if you want to add software or don't want a separated home partition (bad idea), make it larger! Now let's look at the recipe :).

Remastersys is offered as a Debian package. The package provides a shell script to install the running Live system on disk: “remastersys-installer”. Reading the script showed that it is doing what we need. We have then successfully performed a clean install of DoudouLinux with the following operations:

add Remastersys repository to a running DoudouLinux

install Remastersys

run the Remastersys script called “remastersys-installer”

reboot!

Note that there are some issues to be corrected after the first boot (see after the source code below). We also have to customize the Remastersys script for use in an official future DoudouLinux release. In the meanwhile, if you want to test it by yourself, you need to type several code lines as root then as the main user to be able to use the graphical Gtk interface:

Once completed, if you see messages complaining about the impossibility to unmount /TARGET and /TARGET/home, just unmount them manually in the console:

sudo umount /TARGET/home/
sudo umount /TARGET/

Finally please note that there are few details to be corrected:

at boot GRUB is complaining about a missing splash image

network may not work because the file /etc/network/interfaces is appended with another network configuration at each boot (which causes inconsistencies)

boot is hanging tens of seconds when network is not plugged because it is waiting for a DHCP lease

The first point can be solved by editing /boot/grub/menu.lst and adding “boot” between the double slash (//) in the line speaking of splash. Note that the Remastersys splash image is not childish at all. Prefer installing the package grub-splashimages-doudoulinux instead! (and replace the file /boot/grub/splash.xpm.gz)

The second one can be solved by removing the for loop of the 3rd block of code in /etc/rc.local.

We have created a new download section named “Daily build”. There is a section for LiveCD images and section for USB key images. Please note that these files cannot be downloaded from the standard download web page because these files are uploaded onto the server for testing purposes only. As usual, this does not mean that they do not work correctly at all!

Unlike what its name suggests, we do not intend to build a DoudouLinux version every night in this directory for obvious upload bandwidth reasons. Instead you may find sometimes versions that are being developed and made available during several days (say at least 7 days). The page Release notes provide information about what has been changed from the latest official build (currently the 2010-08).