Contents |
As of early 2008, the PhoeNUX team has decided to move away from developing Phinos and is now using a customized version of the installer created by the Ark Linux team. We will leave this information here for historical reasons. At some point down the road we may decide to revisit this installation route, but that is a decision for another day. ZDD - 5/21/08
Phinos (PhoeNUX INstalls the OS) is the installer for PhoeNUX OS. Unlike a number of operating system installers, this one is written in Perl using Qt as the user interface toolkit. While there may be more efficient, compiled C or C++ installers available, having the flexibility of being able to patch and run the installer without rebuilding it is a powerful reason to use an interpreted language for its development. Coupled with the ease of user interface coding, Phinos meets the goals design-wise to allow it to be useful for a number of projects.
Phinos is designed on pseudo-object oriented and structured Perl. At present, we use only a handful of outside Perl modules. These are Proc::Simple, Perl::Config::IniFile, and PerlQt. The core of the hardware detection at present is done not in Perl code, but by the command line tool lshw version 2.03 or higher. However, all drive detection is done via DiskTools.pm, a totally Perl driven module. Additionally, the installation of the RPM packages are done using the apt command line tool via kapt-get, a PerlQt apt manager. While most of the heavy lifting is done using previously created command line tools, the installer does much of the logic and all of the UI to present the tasks being performed in the most user accessible way possible.
The class structure of Phinos incorporates the following classes at present:
Phinos PhinosConfig MainWidget Detect Fs MntPntDlg WarningDlg InstallProgressDlg Unpack Post
The hierarchy of the classes is best shown using this UML diagram:
Following is a short description of the classes and what they do in the installer.
This is the driver class of the entire application. At present it does not contain a typical set of KDE application arguments (see kdelibs documentation, kapplication.) The only arguments that currently are honored at present is --windowed. The long term plan is to have a command line switch (--patch <path to file>) which would patch the classes before running the application with a patchset loaded from the path supplied as the argument to the flag.
None.
This class creates an .ini configuration file object for reading and writing configuration items. The core of this class is designed around perl::Config::IniFile, a Perl module designed to make parsing and writing ini style configuration files simple. All options for Phinos' configuration will be wrapped in this class for access by the rest of the application.
This class instantiates and builds the main window of the application. At present, far too much logic is placed in this class for true division of labour. This class inherits from Qt::VBox, presenting itself as a QVBox object to the application.
Detect is a thin wrapper around a Linux powered computer. Presently much of the hardware detection is handled by the external lshw application. This class needs extended emmensly to fully detect all hardware and current software / operating systems presently installed on the target computer. Additionally, it would be greatly enhanced if the class did NOT rely on lshw, or if it did, only invoked it once, or twice at most, since it is a slow application to begin with.
Fs creates partitions, destroys partitions, formats partitions, creates swap formatted partitions, generates the /etc/fstab, activates swap, and mounts targets. Presently Fs will not generate non-xfs target partitions, so it cannot presently make reiser v3/4, ext2/3, jfs formatted targets. Also, Fs does not allow for UUID strings or drive labels for uniquely identifying partitions. These limitations must be overcome and NTFS/FAT filesystem resizing must be added to allow this class to act as the engine for an advanced partitioning tool for the installer.
MntPntDlg maps partitions to mount points and configures whether the system uses swap partition or swap files. Currently the mount points are limited to /, /boot, /home, /usr, /var, and the swap. This limitation must be overcome to allow enterprise customers to mount partitions to any location. Additionally remote exports must also be supported. Another limitation is that presently it does not probe for partition format nor does it support non-Linux native partition types.
This class shows the current progress of the installation. Currently far too much logic is in this class to satisfy seperation of model and view.
Unpack is a wrapper around all of RPM's functionality. Currently does not support some of RPM's more advanced features, nor does it support the use of a dependancy solver tool such as apt-get, which will be needed to handle PhoeNUX OS updates and upgrades.
Post performs the essential post installation tasks necessary for making PhoeNUX OS bootable. This includes generating the initrd, grub initialization, hardware discovery, and various configuration file edits in /etc/syconfig.
Below is some screen captures from a box in use:
Just a quick note before I start this. Phinos as we know it will probably be retired after the 1.0 series. Version 1.0 will coincide with the first stable release on PhoeNUX OS (at this point, I'm just hoping we call it 1.0, but it's still not 100% clear at the moment). In preparation for the 2nd major release of PhoeNUX, a new GUI will be written which will hopefully be easier to program and more modular than Phinos currently is. A lot of the backend code will likely be copied over though, and some code from Zack's curses-based installer, which is currently in the works, will most likely be used as well.
OK, here's the list:
- Make installer load at boot up with a dialog for skipping out of it. Also make this dialog control whether the konsole will be used to load it, or to just load right into it.
- Use Perl-Config-IniFile to create a mechanism for reading in a pre-scripted configuration for the installation, to make auto-install a possibility (read OEM install mode.)
- Create a custom partitioner that uses the gnu parted command line tool as the backend, which can do NTFS resizing with ntfs-tools. This must have better usability than QtParted and DiskDrake.
- Add additional package selection options. For instance, allow the user to install or not install the extra applications, servers, and development tools bundled on the DVD.
- Add l10n so non-American or non-english speaking people can use PhoeNUX OS.
- Bundle lshw and PerlQt-v3.009 and create a configure script to check if the target box needs them.
- Update Mode.