Minggu, 31 Maret 2013

Design and architecture of BlankOn Installer

BlankOn Installer is the central application used in BlankOn Live Media starting from BlankOn 8.0 Rote release. It is a full-screen application intended to take over the desktop when you are not using the live feature of the media.

It is an HTML5 application and the runtime is built with webkitgtk and Vala. The front-end is totally written in HTML, JavaScript and CSS while the back-end is written with various languages bridged by Vala.

The installer slated for BlankOn 9.0 Suroboyo consists of several subsystems below:

  • Partition Editor
  • File System Copier
  • Boot Loader Installer
  • Package Installer
  • File System Configurator

The subsystems are called in sequence according to the stage the user is in. The stage is started with a partition editor and ended with a boot loader installation.
The previous version of installer has similar subsystems but lacks of advanced partition editor and package installer.

Pattern

The software is written using a consistent pattern described as follows. The front-end will call the JS functions defined in the back-end part using JavaScriptCore which is passed in the webkitgtk. The back-end could implement the functionailites by it's own or just call third party libraries or scripts. The JS function defined in the back-end is simply a facade.



To enable developing front-end by just using a web browser, stubs of the JS functions to be defined in the back-end must be provided.

Partition Editor

The installer has an advanced partition editor called PartoEdi. The editor is using KineticJS to make the partition making interactive. The changes in the partitions are accumulated and then played back with libparted in the backend.



The output of the subsystem is a ready to use partition marked for installation and a swap partition. 

File System Copier

This subsystem copies the read only part of the live media into the marked partition. It copies everything without any modifications. The copying is done in the backend using rsync.



The rsync is chosen to get the progress of the copy and to be able to preserve the attributes of the copied files and directories.


File System Configurator

The configurator is run after the installer successfully copied all the files from the media. It creates user and groups defined by the installer. It sets the password. It sets the basic configuration of the system.



The configurations are made by the backend which runs the scripts.


Package Installer

This subsystem, as the name suggests, installs additional packages chosen by user. In the installation, user can choose a certain installation profile. This effectively installs the packages described by the profile. The profile is simply a meta package containing the list of additional packages.



This imperatively says that the packages installed in the live media are the packages shared by all of these profiles. A profile could also ask to remove certain packages installed in the media. The installation is made from local repository self contained in the media itself.

Boot Loader Installer

This subsystem installs the GRUB2 (and optionally with EFI support) into the boot partition.





As you can see the installer is pretty simple and straightforward. At the time of writing this article, the advanced partition, package installer and EFI support is not yet implemented.