From b32652705e72fdde13478668d3321b245374948e Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 8 Sep 2019 15:49:50 -0500 Subject: script: keys: Specify disk partitioning --- devel/script/2_keys.xml | 355 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 355 insertions(+) diff --git a/devel/script/2_keys.xml b/devel/script/2_keys.xml index e66d752..059c735 100644 --- a/devel/script/2_keys.xml +++ b/devel/script/2_keys.xml @@ -470,5 +470,360 @@ signingkey https://packages/builder@ourcompany.net.pub The literal string fill specifies that the partition shall fill the remaining space of the containing block device. No partitions may come after one that specifies fill on the same containing block device. +
+ <literal>diskid</literal> + + Name + diskid + + + Purpose + The diskid key specifies a substring of a disk's identification string. The system matches this string to the specified block device's identification string to ensure that the proper disk is partitioned. + + + Format + The diskid key is a space-separated tuple of values that contains exactly two string elements: a valid block device file name, and the substring of its identification string. The second element is read to the end of the string, so it may contain further spaces. diskid may appear up to one time per block device file name. It is invalid to specify more than one diskid for the same block device. + + + Default + If the diskid key is not specified for a block device, the system will not be able to verify that the block device is the intended target of partitioning commands. + + + Examples + + + The <literal>diskid</literal> Key — Verify Manufacturer of Hard Disk + +diskid /dev/sda HITACHI + + This ensures that the identification string of the disk at /dev/sda contains the string 'HITACHI'. + + + The <literal>diskid</literal> Key — Verify Model of NVMe Device + +diskid /dev/nvme0n1 WDC WDS512G1X0C-00ENX0 + + This ensures that the identification string of the NVMe device at /dev/nvme0n1 contains the string 'WDC WDS512G1X0C-00ENX0'. + + + +
+
+ <literal>disklabel</literal> + + Name + disklabel + + + Purpose + The disklabel key specifies the type of partitioning a disk will use. + + + Format + The disklabel key is a space-separated tuple of values that contains exactly two string elements: a valid block device file name, and the type of disk label to use. Valid disk labels are: + + mbr — Master Boot Record (MBR) + gpt — GUID Partition Table (GPT) + apm — Apple Partition Map (APM) + + disklabel may appear up to once per block device file name. It is invalid to specify more than one disklabel for the same block device. + + + + Default + If the disklabel key is not specified for a block device, the existing disk label will be used. If no disk label is currently written to the device, the device will not contain a disk label. + + + Examples + + + The <literal>disklabel</literal> Key — Simple Usage + +disklabel /dev/sda mbr + + This erases any present disk label on the block device at /dev/sda and creates a new MBR disk label. + + + The <literal>disklabel</literal> Key — Multiple Disks + +disklabel /dev/sda apm +disklabel /dev/sdb gpt +disklabel /dev/nvme0n1 gpt + + This erases any present disk labels on the block devices /dev/sda, /dev/sdb, and /dev/nvme0n1. The system will then create a new APM disk label on /dev/sda, and new GPT disk labels on each of /dev/sdb and /dev/nvme0n1. This example would allow you to use mass storage (greater than 2 TB) on a Power Mac G5 while retaining OpenFirmware boot compatibility on the first disk. + + + +
+
+ <literal>partition</literal> + + Name + partition + + + Purpose + The partition key specifies a new partition to be created on a block device. + + + Format + The partition key is a space-separated tuple of values that contains either three or four elements: a valid block device file name, the partition number to create, the size of the new partition as specified in , and optionally a type code for the partition. Valid type codes are: + + boot — Marks the partition as bootable. On MBR disk labels, this enables the Bootable flag. On APM disk labels, this sets the partition type to Apple_Bootstrap. On GPT disk labels, this sets the partition's type to BIOS Boot. + esp — Marks the partition as an EFI System Partition (ESP). This type is only valid on GPT disk labels. + + partition may appear many times per block device file name; the exact maximum depend on the disk label in use on the block device. It is invalid to specify a partition for a partition number that already exists on the block device. It is invalid to specify a partition for a block device that does not have a disk label supported by Horizon. + + + + Default + If no partition key is specified for a given block device, then the partition table on that block device is not modified. + + + Examples + + + The <literal>partition</literal> Key — Simple Usage + +partition /dev/sda 1 40M boot +partition /dev/sda 2 fill + + This configures /dev/sda to contain a 40 MiB boot partition, and uses the rest of the disk as a single data partition. + + + The <literal>partition</literal> Key — Advanced Usage + +partition /dev/sda 1 1G boot +partition /dev/sda 2 20% +partition /dev/sda 3 40% +partition /dev/sda 4 fill + + This configures /dev/sda to contain a 1 GiB boot partition, a second partition using 20% of the disk's total size, a third partition using 40% of the disk's total size, and a fourth partition that utilises the rest of the disk. + + + +
+
+ <literal>lvm_pv</literal> + + Name + lvm_pv + + + Purpose + The lvm_pv key specifies a block device to use as a LVM physical volume. + + + Format + The lvm_pv key is a string value which must describe a path to a valid block device. This is typically either a whole disk or a partition on a disk. lvm_pv may be specified up to once per block device specification. If an lvm_pv key is specified for both a block device and an underlying partition already extant on the block device, system behaviour is undefined. + + + Default + If no lvm_pv key is specified, no LVM physical volume will be created by the system. + + + Examples + + + The <literal>lvm_pv</literal> Key — Whole Disk LVM + +lvm_pv /dev/sda + + This configures the entire block device at /dev/sda to be an LVM physical volume. Any existing data on the specified disk will be destroyed. + + + The <literal>lvm_pv</literal> Key — LVM Partition + +disklabel /dev/sda apm +partition /dev/sda 1 4M boot +partition /dev/sda 2 fill +lvm_pv /dev/sda2 + + This configures the block device at /dev/sda with a new GPT disk label, creates a 4 MiB BIOS Boot partition, and then uses the rest of the disk as an LVM physical volume. + + + +
+
+ <literal>lvm_vg</literal> + + Name + lvm_vg + + + Purpose + The lvm_vg key specifies parameters for creating a new LVM volume group on the target computer. + + + Format + The lvm_vg key is a space-separated tuple of exactly two string values: a path to a valid block device containing an LVM physical volume, and a valid LVM volume group name. A volume group will be created on the specified LVM physical volume with the specified name. lvm_vg must appear exactly once per lvm_pv key. It is invalid to specify a block device that does not contain an LVM physical volume. + + + Default + If no lvm_vg key is specified, no LVM volume groups will be created on the target computer. + + + Example + + + The <literal>lvm_vg</literal> Key + +lvm_vg /dev/sda2 elaine + + This creates a new LVM volume group named elaine on the LVM physical volume /dev/sda2. + + + +
+
+ <literal>lvm_lv</literal> + + Name + lvm_lv + + + Purpose + The lvm_lv key specifies parameters for creating a new LVM logical volume on the target computer. + + + Format + The lvm_lv key is a space-separated tuple of exactly three values: the name of an extant LVM volume group, the name of the LVM logical volume to create, and the size of the new LVM logical volume as specified in . The name of the new LVM logical volume must be a valid logical volume name. It is invalid to specify a logical volume size larger than the available space in the volume group. + + + Default + If no lvm_lv key is specified, no LVM logical volumes will be created on the target computer. + + + Examples + + + The <literal>lvm_lv</literal> Key + +lvm_lv elaine root fill + + This creates a new LVM logical volume named root on the LVM volume group elaine, using all available space in the volume group. + + + +
+
+ <literal>encrypt</literal> + + Name + encrypt + + + Purpose + The encrypt key specifies block devices to encrypt with LUKS. + + + Format + The encrypt key has two forms. The first form is a string value which must be a path to a valid block device. The second form is a tuple of two string values which are a path to a valid block device, and the passphrase to use to encrypt the volume. + + The passphrase to encrypt the volume should not be provided if a non-encrypted network transport is used to transfer the HorizonScript to the target computer. This could expose the passphrase to attackers. + + The passphrase will be read to the end of the line, so it may contain spaces if desired. + If no passphrase is specified, the system will interactively prompt for a passphrase during the installation. There is no time out for entering a passphrase. + encrypt may be specified up to once per block device. It is invalid to specify an encrypt key more than once for the same block device. + + + + Default + If no encrypt key is specified, no LUKS containers will be created. If no passphrase is specified in an encrypt key, the system will interactively prompt for one. + + + Examples + + + The <literal>encrypt</literal> Key — Prompt for Passphrase + +encrypt /dev/elaine/root + + This configures the block device at /dev/elaine/root to use LUKS, and prompts the installing technician for a passphrase. + + + The <literal>encrypt</literal> Key — Use Plaintext Passphrase + +encrypt /dev/elaine/home oh. so. secret. + + This configures the block device at /dev/elaine/home to use LUKS with the passphrase oh. so. secret. in plaintext. + + + +
+
+ <literal>fs</literal> + + Name + fs + + + Purpose + The fs key specifies file systems to create on the target computer. + + + Format + The fs key is a space-separated tuple of two string elements: a path to a valid block device, the type of file system to use Valid file systems are: + + ext2 — The ext2 file system, a non-journaled Linux filesystem. + ext3 — The ext3 file system, a journaled Linux filesystem. + ext4 — The ext4 file system, a journaled Linux filesystem. + hfs+ — The HFS Plus file system, a non-journaled filesystem from Apple used for boot partitions on Macintosh computers. + jfs — The JFS file system, a journaled filesystem from IBM. + xfs — The XFS file system, a journaled filesystem orginally developed by SGI. + vfat — The FAT32 file system, a non-journaled filesystem used for EFI System Partitions on computers with EFI firmware. + swap — Swap space, used for virtual memory. + + fs may be specified up to once per block device. It is invalid to specify fs more than once for the same block device. + + + + Default + If no fs key is specified, no file systems will be created on the target computer. + + + Examples + + + The <literal>fs</literal> Key + +fs /dev/elaine/root ext4 +fs /dev/elaine/home xfs + + This creates a new ext4 file system on the block device at /dev/elaine/root, and creates a new XFS file system on /dev/elaine/home. + + + +
+
+ <literal>mount</literal> + + Name + mount + + + Purpose + The mount key describes the filesystems and mountpoints to use on the target computer. + + + Format + The mount key is a space-separated tuple of two or three string elements: a path to a valid block device, the mountpoint on the target computer, and optionally mounting options. The mountpoint must start with /. Valid mounting options depend on the file system chosen, but typically include options such as noatime, user, and so on. See the mount manpage for the file system you are using for more information on mounting options. Mounting options are separated with commas. Mounting options will be used in the installation environment and additionally saved to the target computer's /etc/fstab file. + mount must be specified at least once, for the root (/) partition. It is invalid to specify mount more than once for the same block device. It is invalid to specify mount more than once for the same mountpoint. + + + + Examples + + + The <literal>mount</literal> Key + +mount /dev/elaine/root / +mount /dev/elaine/home /home noquota,wsync + + The filesystem at /dev/elaine/root will be mounted at /. The filesystem at /dev/elaine/home will be mounted at /home, with the noquota and wsync options. + + + +
-- cgit v1.2.3-60-g2f50