Ideas for a "Multi" installer for FreeBSD

Posted on 2025-01-27 - Updated on 2025-02-02

This post is a list of “I would like this feature installing the operating system”. Motivations and implementation plan.

I spent my “Open Source 2022” working around bsdinstall, the FreeBSD OS installer. Weekly I replaced the Text User Interface (TUI) frontend dialog/libdialog with bsddialog/libbsddialog in a component (an utility in C or a shell script) and I tested the installer/ISO generated the previous week. The challenges were: the partitioner, the mixedgauges, and implementing the features for bsdconfig, anyway the task was really interesting. During the weeks I wrote notes with new ideas and features to improve bsdinstall. Unfortunately I had a sudden medical problem in autumn 2022. I could not sit in front of the computer for many months. Obviously I had no time to implement my ideas. Baptiste finished the replacement.

I started working again in mid-2023. My open source effort was to improve the accessibility for vision impairment users. bsdinstall uses a TUI frontend, TUI is a well-known accessibility problem, screen readers (both speech synthesizer and Braille display) cannot “read” TUI. So the installer is not acessible for blind users. The best solution is a new Command Line Interface (CLI) frontend, fortunately it will be sponsored by the FreeBSD Foundation for the Vision Accessibility project. This will be a proof of concept and research project, so far only a Google’s paper addresses the topic of accessible CLI. However adding a new frontend to bsdinstall is not trivial, the task requires heavy changes. Actually I do not know if I can add a new frontend totally different from dialog.

Spring 2024, I started thinking about a redesign for the installer. Of course I can add also many other features a in a new project, most require a re-design/rewrite of the current installer. The new project could be available like a port and a script to generete an ISO so anyone can download and adapt the installer to their needs. Furthermore, I have received some requests, for example several people would like something in Lua. July 2024, I wrote an email to hackers mailing list to collect extra tips and ideas, other suggestions were received during EuroBSDCon. I hoped to finish by 6/8 months, but a medical issue (related to the previous one) blocked me, end-2024. However, this time the therapy worked, and after 2 years the doctors gave good news.

2025, maybe it’s time to start. Some project choices, ideas and requirements:

Guidelines:

  • Simple, modularized and extendable.
  • Compatible with bsdinstall.
  • Backend (Server side) and frontend (Client side).
  • “Multi-”: multi-language, multi-frontend, multi-mode, multi-interactivity

Requirements and features

  • Of course Open Source under a BSD-Like license.

  • An option to select bsdinstall or this installer at start-up.

  • Logging and debug features similar to bsdinstall with extensions.

  • Improvements and extensions for the partitioner. Several feature requests exist, mainly on bugzilla.

  • A configuration file with variables, hooks, comments and examples.

    • Provide bsdinstall variables and configuration files. Ideally these features will be placed in the “centralized” configuration file above.
  • Multi installation process:

    • Interactive. The server waits for the user input from the frontend, then it performs the “command”.
    • Noninteractive. No user actions. Server reads previously written files: by hands, by a previous installation, by a fake installation.
  • Server side written in Lua, modularized in scripts. Independent of any frontend. Probably using bsdinstall components (their logic without UI), of course adding extra features.

  • Frontend responsible only for User Interface.

  • Backend <-> Frontend communication via text files. To evaluate also a Lua layer, etc.

  • Multi-language: English, French, Spanish, and so on.

  • Multi-mode installation: [Automatic], [Simple], and [Expert].

  • Multi-frontend. Implementation priority:

    • Text User Interface. Similar to bsdinstall with new features.
    • File. Settings are read from text file(s).
    • Command Line Interface. Suitable for a screen reader for vision impairments users.
    • Graphical User Interface.
    • WEB. TBD, I am not a web-expert. A proof of concept is available.
  • A menu to select: frontend and other options, at start-up. A possible example:

Menu in a terminal to select installation options

The Command Line frontend could be similar to portoptscli, an utility to set up port options suitable for screen readers. Demo (turn on audio):

  • Frontends have to be totally separated from the backend, eventually to be easily added/deleted/changed/improved in the future. This is the learned lesson by adding bsddialog to bsdinstall.

  • New UI/UX features (something is related to the server side):

    • Navigation. New buttons: [Restart], [Prev], and [Next] for each screen.
    • Dialogs for help, at start-up and during installation (F1 or [Help] button).
    • High Contrast theme for color blind and low vision users.
    • Final step to install ports and packages for accessibility.
    • Final step to install a desktop environment. Some possible examples:

Window a question question to install a Desktop environment

Menu in a terminal to select a GPU driver

Menu in a terminal to select software to install

Window with a bar to display the installation progress


Other Requests

Groups and laptop/desktop users are collecting feature requests. They make sense and should be implemented. Suggestions and new ideas are welcome, feel free to contact me.


Current Status, Plan, Timing.

Now: studying Lua, reading “Programming in Lua, 4th Edition”.

Implementation Plan: Implement bsdconfig logging and debug features in a Lua lib. Write a Lua chunk to call a bsdinstall component. Define a “communication” file for backend <-> frontend. Delete TUI from the bsdinstall component and start to write a frontend. At this point it should be easy to add: the other bsdinstall components, the “Requirements and features”, and requests from desktop users. This project is supposed to be tedious but simple. The challenge is the partitioner, but I have already rewritten its frontend in the past.

Timing: I hope to finish by September at least 3 frontends. I’ll try posting updates.