Graphical Installer for FreeBSD
Links:
Slides from AsiaBSDCon 2024 URL: https://people.defora.org/~khorben/FreeBSD/bsdinstall/bsdinstall%20-%20Now%20with%20Graphics!%20-%20AsiaBSDCon%202024%20-%20WIP%20Session.pdf
gbsddialog URL:
https://github.com/khorben/gbsddialog
preview video URL:
https://youtu.be/jm6byc7N2O4
Contact: Pierre Pronchery <pierre@freebsdfoundation.org>
The first hurdle to overcome when testing a new Operating System is to get it installed. What is more, the first impression new users gather from an Operating System is its installation process. The state of the art for Operating System installers nowadays definitely involves a graphical process. This is the case for mainstream systems but also for other UNIX systems comparable to FreeBSD: RedHat Enterprise Linux, Ubuntu, Debian GNU/Linux, or even Devuan GNU+Linux Regardless of the technical level of the actual user, this is how the platform will be compared in the public eye.
In practice, FreeBSD has already been derived as a desktop-oriented Operating System by different projects. Of these, I only found GhostBSD as a maintained project offering a graphical procedure to install the system. The objective here was to consider a procedure that FreeBSD could adopt as part of its base system, in order to ship a graphical installer much like the current installer. However, GhostBSD’s installer relies on a Gtk+ interface driven with Python, implying a hefty footprint on the installation media when adopting FreeBSD’s usual image generation procedure. It would also imply importing and maintaining new projects into the ports tree.
Instead, with knowledge of the current bsdinstall(8) and bsdconfig(8) utilities, I envisioned a BSD-licensed replacement for Xdialog(1). Just like when invoking bsdconfig with the -X switch for graphical mode, it could be dropped in instead of bsddialog(1) and allow graphical installation - while sharing the infrastructure of the current installer. To avoid confusion with the current implementation of Xdialog from the x11/xdialog port, I have named its replacement gbsddialog(1). It also has to be said that Xdialog is quite obsolete (latest release in 2006) and this shows visually too.
After creating a Proof-of-Concept prototype past the 14.0 release, I was provided with a 2-months window by the FreeBSD Foundation, in order to complete a working implementation. Thanks to a few shortcuts, I was glad to present the outcome of this effort during the WIP session of AsiaBSDCon 2024, including a working graphical installer.
Most of the necessary patches are already available for review in FreeBSD’s Phabricator:
I have tried to keep these patches in growing order of friction expected before integration.
The most important objective of this project was to improve bsdinstall, regardless of the success of this integration. From the items above, it should be noted that D44279, D44280, D44670 are expecting to improve the general look & feel of the installer, even while in text mode. Similarly, D44671 and D44672 improve the overall versatility of the installer when scripted or customized. D44673 and D44674 bring it on par with bsdconfig -X, even allowing the graphical installation of jails.
Some parts are still missing, or made use of shortcuts still unsuitable for integration:
-
The "fetchmissingdists" target was avoided by shipping every component on the installation media;
-
The "checksum" and "extract" targets had to be re-implemented with simpler code, degrading the user experience also with the regular installer;
-
Creation of the installation media generates an additional, heavy image (almost 8 GB), and is suspected to be hindered by a bug in makefs(8).
The corresponding code can be found in my GitHub fork in the khorben/bsdinstall-graphical4 branch. As can be guessed from the branch name, depending on the complexity of rebasing operations, combined with the (hopefully) progressive integration of the changes proposed, new branches may be added to keep track of the progress. (In fact a khorben/bsdinstall-graphical5 branch already exists.)
Still, a lot needs to be done for the installer to reach a new level of maturity overall. While working on this project, I have received general complaints on the installer, and calls for a complete rewrite. It is true that the current code base suffers from a number of issues and limitations. The lack of a graphical installer is one of many symptoms, which range from the lack of recovery from errors, of navigability to previous steps, of a general vision of the installation progress, or of a network-based installer. In the meantime, this is the installer we have and are familiar with, and I think it can still be saved and improved.
Special thanks go to Ed Maste and Joe Mingrone for the opportunity, and to Philippe Audeoud, Tobias C. Berner, Olivier Certner, Jessica Clarke, Olivier Cochard-Labbé, Baptiste Daroussin, Brad Davis, Michael Dexter, Li-Wen Hsu, Mateusz Piotrowski, Alfonso Siciliano, Emmanuel Vadot, and Robert Watson for the feedback, reviews, and encouragements. (If I missed anyone, you know I did not mean to!)
Sponsor: The FreeBSD Foundation
Last modified on: May 5, 2024 by Graham Perrin