Installation: Difference between revisions

From SprezzOSWiki
No edit summary
No edit summary
Line 20: Line 20:
==Preparing the target==
==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]]).
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]]).
==Creating a filesystem==
===Creating a filesystem===
A filesystem can be created either directly on a device, or within a partition.
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 on a device requires that the device have neither a filesystem signature nor a partition table signature in its first block.
Line 27: Line 27:
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.
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===
====Swap====
A swap device is just another type of filesystem, and is created in the same way, and with the same requirements.
A swap device is just another type of filesystem, and is created in the same way, and with the same requirements.


===Partitioning===
====Partitioning====
Use of a partitioning scheme confers several benefits:
Use of a partitioning scheme confers several benefits:
* Interoperability: Some bootloaders and operating systems require certain partitioning schemes.
* Interoperability: Some bootloaders and operating systems require certain partitioning schemes.

Revision as of 02:37, 26 January 2013

Installation will depend on method of installation 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.

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).

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 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)

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.

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.

See Also