This page is a "request for comments" related to the general installation process. Please feel free to contribute and comment. Through the general install process the installer should be able to also install itself. The Installation ProcessInstalling PureDarwin should be a two stage process, as illustrated here. First stageThe first stage installer is run from either a PureDarwin CD image, or from another operating system on the target computer. The first stage should:
The user will be asked a quick list of questions. The question must always have a default answer available and "compatible" with all others answers of previous and next questions.
"Non-interactive mode" will require the user (eg. system admin) to do some extra work. The installer should always automatically attempt to copy non-interactive configuration files from a set location on the boot CD (eg. in /Library/Install/ ) to the target disk. In order to make use of this facility, a boot CD with files in this location should be specially prepared. We can make a root of the install CD, along with the pd_makedmg script, available for download for exactly this purpose. Grouping in categories and sub-categories the sequences of questions seems common. This leads us to another possibilities, we could also target a type of PureDarwin release installed (e.g., nano, dev, rescue, test/bench, etc..). Notes: We can't depend on what admin tools are loaded onto the target (having the core system ship without eg. the DSTools package), so user records should be created by generating the data files (a la pd_injectuser) rather than via tools (pd_adduser). Preparation of destination mediaPartitioning the destination disk, formatting, installing bootloader. This stage could also see the installation of the kernel(s) and a core system so that the rest of the install process could run from the destination, as outlined above. Notes: We need to know from where we can put and provide the installation materials and to where the PureDarwin project will be installed. e.g., disk, but we have also: iso and VMware, qemu and other democratised emulation/simulation/virtualisation solution. First Stage Installer ScriptAn installer script will be needed to guide the user through the first stage installation. A rough idea of how this would work (using the Chameleon bootloader components replacing the standard Darwin ones in /usr/standalone/i386/) is:
Correctly setting up bootloaders is a tricky business, especially in a multi-boot environment. One of the advantages of this two stage approach is that the user will find out if the system can successfully boot into Darwin before spending time installing (potentially involving lengthy downloads) all the packages needed by a complete system. Second stageThe second stage installer will be designed to run in a Darwin environment, meaning that it will be exactly the same no matter what the first stage installer was. In this way we will be moving the environment-specific parts of setup into the first stage (of which there will be a few different platform-specific versions), consequently we only need to maintain a single version of the main installation code. It will possibly need access to a network connection, although providing a local cache of packages will make this unnecessary. "PureDarwin Core" is basically (in minimal PureDarwin installation which automatically runs a setup and install script at boot) allowing the user to add extra packages to. It should be possible for the user to chose not to install anything an be left with a working, bare-bones system. ("PureDarwin Boot" above is a fictional version of Nano equipped with the extra packages needed to run pd_setup) This is covered on the Package management page. Post-configurationThis will include adding users (a default one is provided if no user account has been created) to the system and some settings. The choices (configuring details such as the system timezone, preferred language, keyboard layouts, etc...) made by the user at the "pre-configuration" phase let the installation to be finish without the user waiting around.. A final question could be (or not) to fall into a shell or to reboot (on timeout too). |
The goal of this project is to make Darwin more usable by providing an installation ISO, documentation, and add-on software. You are welcome to join #puredarwin on irc.freenode.net if you would like to join PureDarwin development and to add to this site.

