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 > Documentation > Advanced tools > Data persistence

Data persistence

October 2010 — last update October 2013

All the versions of this article: [čeština] [Deutsch] [English] [Español] [français] [italiano] [Bahasa Malaysia] [română] [русский]

The main drawback of a system on “CD-ROM” like DoudouLinux is that modified data are lost at computer shutdown. This is true for both user and system data. Aware of these limitations, developers of these systems called “Live CD” set up tools to ensure data persistence from one system boot to another. Of course, a USB device such as USB keys can be used to store your DoudouLinux data. This is recommended if you sometimes wish to change computers.

Note: the DoudouLinux version on USB key has the same drawback as the CD, so long as data persistence has not been activated; however, the tool to make Live USB keys that is shipped within DoudouLinux automatically activates persistence. The advantage compared to the CD version is that you can have DoudouLinux and your own data on the same device (in addition to the fact that the USB key is faster and less noisy than the CD).

1- How does persistence work?

When DoudouLinux starts, it starts the system using the CD or USB key contents in read-only mode. Data involved can thus not be modified. However, during the boot process, a small program is searching in your hardware configuration for storage devices that may contain persistent data coming from a prior use of DoudouLinux. If one of these devices contains what is needed, then the corresponding data are made available read/write in DoudouLinux. Moreover, if you create new data, it will be written onto the storage device to be able to get it back at next DoudouLinux boot.

Note: a consequence is that the media hosting persistent data has to be correctly connected at DoudouLinux boot, it cannot be connected while running. This is of course always the case when you are using a Live USB key with persistence activated on it.

Technically, DoudouLinux creates a file named home-rw-doudoulinux or live-rw-doudoulinux on your device. When such a file exists on your computer, DoudouLinux knows that former persistence data are to be used. If you delete it or alter it, you will lose all your persistent data….

2- Activating persistence

The DoudouLinux system starts by default in a mode which takes persistence into account. This does not mean that it is active but that the system could use it if a configured media was found. The choice of this mode is done in the first few boot seconds. You can choose between the modes: with or without persistence (see screenshot below). The mode without persistence is needed when you wish to deactivate persistence (see below Deactivating persistence).

PNG - 40.1 kb
Activation ou non de la persistance au début du démarrage

Once DoudouLinux is started and ready for use, persistence activation can be done with the tool “Data persistence” in the software section “TuneSystem” (Whole DoudouLinux activity). The default running mode of this tool is called “wizard”. Its “expert” mode is briefly detailed later in this page and should interest only a small group of users.

The “wizard” mode starts by detecting external disks (USB) and internal disks. If one or more external disk(s) is detected, the tool will propose to activate data persistence on these external disks or internal disks via a list. If only one internal disk is found, the tool will ask you whether you do not prefer using an external disk instead, like an USB key. If no, the wizard will propose to use this internal disk. After the last confirmation (see the screenshot below), the tool will create the persistence file onto the selected device for you. Its size, not tunable in “wizard” mode, defaults to 100 MB and is adjusted regarding to available disk space so that no more than 50% of free space will be used.

PNG - 7.6 kb
Validating persistence activation

Once the operation is achieved, DoudouLinux should be restarted because it can only setup persistence during system booting.

3- Expert mode

The expert mode cannot be accessed with mouse clicks. You need to launch the tool in the console [1] using the following command:

sudo persistence-gui --expert

Starting this tool will lead to a series of questions (see screenshots below):

  1. if you have several disks, it will ask on which disk should DoudouLinux data be recorded?
  2. if the selected disk has several partitions, on which partition should DoudouLinux data be recorded?
  3. which persistence type do you want? (see the 4 persistence types)
  4. what is the persistence file size?

Once all of these are answered, DoudouLinux will be able to prepare the selected disk so that it can host the modified data.

PNG - 7.2 kb
Selection of the disk to be used
PNG - 5.5 kb
Selection of the partition to be used

4- The 4 persistence types

Data persistence can handle either user data only or both user data and system data. With this second option the system can be modified and chosen applications can be added, but this needs of course more free space. Moreover, this option does not guarantee anymore that your DoudouLinux system is perfectly safe. It should then only be used in very specific cases.

Furthermore, modified data can be stored in a unique file or archive, as well as in directories at the root of a disk partition. Data can be easily read from within another system using the second method, but this may generate directories that overlap directories of the system already installed on computer, particularly if a Unix-like system is installed (Linux, BSD, Mac OS X, etc.). Anyway, it is not implemented in DoudouLinux yet for technical reasons.

Combining these two pairs of options gives 4 persistence types:

Persistence mode
Mode Data Storage
1 user single file
2 user + system single file
3 user directories
4 user + system directories

5- Deactivating persistence

This feature is not available in a DoudouLinux tool yet; however, you can achieve this manually if you have the required Linux skills, or you can use another system to access the persistence file without running DoudouLinux. For this you need to start in the mode without persistence then:

  • in the case of a persistence stored onto a single file, remount the partition containing it read/write if needed, then remove or rename this file
  • in the case of a persistence stored onto directories, change the partition label and eventually mount it read/write then remove directories that DoudouLinux had added.

Note that partitions of internal disks are mounted read only at DoudouLinux boot for safety reasons, this is why you may need to remount them read/write. Of course, if you remove the persistence file or the directories, you will loose all your modified DoudouLinux data!

6- How it works?

The way persistence works depends on the storage method used. In the case of a single file, this file has a special name and is always recorded at the root of the selected partition. When DoudouLinux starts in persistence mode and detects such a file, then “mounts” it in order to access its contents. Technically, the file represents a virtual partition formatted with the standard Linux file system called ext3.

In the case of persistence stored into directories, the disk partition containing these directories has a special name. As for single file storing, when DoudouLinux starts in persistence mode and finds such a partition name, the partition gets “mounted”. The technical limit that DoudouLinux has with this method is the reduced length of this name, which is incompatible with the persistence file name of the former case.

For people who would like to know even more about the internal functioning of persistence: it is based on the intrinsic working of “Live CD’s”. Such a system embeds a compressed File system that is obviously read-only since it is burnt onto a CD. But the system needs to be able to modify or create files at computer run-time for many reasons. The read-only file system is then combined with a file system on to which DoudouLinux can write.

The default is to store the writable file system in the computer RAM memory. This is why DoudouLinux is so harmless! But this is also why everything is lost when the computer is switched off. When persistence is activated, this whole file system or only a part is copied into a single real file or into directories of a real partition. This is why modifications can be restored after rebooting, provided that these data are “mounted” in the system at startup.


[1] You can launch the console using the keyboard shortcut Logo key + T.

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 © 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