Installation

From SprezzOSWiki

Installation is parameterized on source media and system boot firmware. The installer ISO can be used to boot from optical media, hard drives, or USB devices emulated as either one, on both UEFI and BIOS systems.

Walkthroughs

There's not yet any true walkthrough document, though anything you can find about the debian installer generally applies to ours, as well.

Optical media

USB

Installer boot sequence

  • GRUB is booted from a device selected by the BIOS or UEFI firmware
    • If the firmware isn't picking the installer media, the SprezzOS installer will not boot!
    • Depending on what (if anything) does get booted, you can perhaps perform a secondary boot. Bootloader-specific techniques are outside the scope of this document.
  • GRUB loads its modules, based on a configuration which has been compiled into it
  • GRUB displays the boot menu, and some kernel (and possibly initrd) are specified.
    • If GRUB isn't booting the installer kernel/initrd, the SprezzOS installer will not boot!
  • The specified kernel begins to boot.
    • If an initrd was specified, it is unpacked in memory as a temporary filesystem root.
    • The initrd in this case provides its own /sbin/init
  • The SprezzOS installer always uses an initrd.
    • This initrd contains a few unpacked udebs. rootskel contains the installer's /sbin/init.
    • It pivots root and runs busybox init

Preparing the target

The SprezzOS installer uses the growlight tool to set up storage. In order to install SprezzOS, you must "finalize" a "target" filesystem for your appropriate firmware (either UEFI or BIOS). At any time, a help display can be summoned with 'H'.

Creating a filesystem

A filesystem can be created either directly on a device, or within a partition.

  • Creating a filesystem on a device requires that the device have neither a filesystem signature nor a partition table signature in its first block.
  • Creating a filesystem in a partition requires that the partition not have a filesystem signature in its first block.
  • Some partitioning schemes indicate the filesystem type in their metadata. Growlight will pick a sensible default filesystem type based on the partition type, but will not enforce a match (which might not, in any case, exist).

A filesystem can be created with the 'M' key. You will be asked to select a filesystem type, and then questions based on that type. Usually this will include a request for a filesystem label.

Swap

A swap device is just another type of filesystem, and is created in the same way, and with the same requirements.

Partitioning

Use of a partitioning scheme confers several benefits:

  • Interoperability: Some bootloaders and operating systems require certain partitioning schemes.
  • Multiple filesystems: It's not usually possible (and certainly not convenient) to use multiple filesystems from a single unpartitioned device.
  • Alignment: A filesystem can be arbitrarily offset via use of partitions; this might not be possible using the filesystem tools alone.
  • Shaping: A partition to be used as a component in some aggregate can be restricted in size, if necessary.
  • Filesystem-oblivious labeling: The GPT partitioning scheme allows labels to be assigned to partitions, independently of any filesystem metadata.
  • The GRUB bootloader can reliably embed itself within post-MBR sectors as opposed to blocklists.

The drawbacks of partitioning include:

  • Complexity of non-destructively repartitioning if use diverges from initial expectations
  • Some partitioning schemes cannot make full general use of hardware (2TB limit on BIOS partitions, for example)
  • ZFS is designed to use entire disks, managing its own (GPT-compatible) partitioning scheme on the device, and presenting "datasets"

It is recommended that, when possible, GPT partitioning be used on all devices save those serving as components in a ZFS pool (ZoL (ZFS on Linux) will automatically enable write cache when it uses entire devices). UEFI firmware generally requires GPT partitioning. BIOS hardware can sometimes support GPT.

A partition table can only be created on a device which has neither a filesystem nor partition table signature in its first block. A filesystem signature can be wiped with the 'w' key, while a partition signature can be wiped with the 'W' key. Create a partition table with the 'm' key. You will be asked to select a partition table type.

Creating virtual devices

Growlight supports creation and modification of various virtual devices, include mdadm software RAIDs, ZFS pools, and encrypted disks. Use the 'A' key to create such a device. You will be prompted for the type of virtual device, and then asked other questions based on the desired type.

Using filesystems

Once a filesystem has been created, it can be targeted with the 't' key, or simply mounted with the 'o' key. In either case, you will be prompted for a mount path, and allowed to select mount options. When targeting, the mount path is taken relative to the installation instance's root. A mounted filesystem can be unmounted with the 'O' key; this will automatically cause it to be untargeted. Installation is restricted to targeted filesystems. In order for installation to proceed, it is necessary to at least target a root filesystem. It is furthermore not possible to target a path other than root until a root has been targeted.

A partition can only be created within unpartitioned space on a partitioned device. A partition can be created with the 'n' key. You will be asked questions based on the partition table type, usually including a partition data type. In the case of GPT, you will also be prompted for a partition label.

Completing the install

The machine will reboot, and hopefully engage the newly-installed bootloader. The bootloader will hopefully specify your newly-installed kernel properly, and if all works out well, you'll be presented with the shell environment.

See Also

{{#switch:|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:|child||{{#ifeq:|subgroup||{{#switch:installation

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = hlist
 }}
}}

}}}}}}