diff --git a/asciidoc/quickstart/eib.adoc b/asciidoc/quickstart/eib.adoc index 742b9c8b..458d100f 100644 --- a/asciidoc/quickstart/eib.adoc +++ b/asciidoc/quickstart/eib.adoc @@ -93,7 +93,7 @@ image: EOF ---- -This definition specifies that we're generating an output image for an `x86_64` based system. The image that will be used as the base for further modification is an `iso` image named `slemicro.iso`, +This definition specifies that we are generating an output image for an {x86-64} based system. The image that will be used as the base for further modification is an `iso` image named `slemicro.iso`, expected to be located at `$CONFIG_DIR/base-images/slemicro.iso`. It also outlines that after EIB finishes modifying the image, the output image will be named `eib-image.iso`, and by default will reside in `$CONFIG_DIR`. Now our directory structure should look like: @@ -106,6 +106,46 @@ Now our directory structure should look like: In the following sections we'll walk through a few examples of common operations: +=== Configuring Operating System (OS) + +The EIB `operatingSystem` section is intended to configure where the operating system is going to be installed, the image size, etc. +It is an optional section and should not be included unless one or more customizations are being applied. + +[,yaml,subs="attributes"] +---- +apiVersion: 1.0 +image: + imageType: iso + arch: x86_64 + baseImage: slemicro.iso + outputImageName: eib-Base-RT-SelfInstall.iso +operatingSystem: + isoConfiguration: + installDevice: /dev/disk/by-id/ata-QEMU_HARDDISK_111-disk1 # first defined disk +---- + +.Type-specific Configuration + +Depending on the type of image being customized, one of the following optional sections may be included. + +* `isoConfiguration` - Optional; configuration in this section only applies to ISO images. + * `installDevice` - Optional; specifies the disk that should be used as the install device. This needs to be a block device, and will default to automatically wipe any data found on the disk. + Additionally, specifying this attribute triggers a GRUB override to automatically install the operating system rather than prompting user to begin the installation, allowing for a fully unattended and automated installation. If omitted, the user is prompted to select the "Install" option from the GRUB menu, + as well as having to select the installation disk and confirm that the device + will be wiped in the process. ++ +[NOTE] +==== +The device being used on the `installDevice` section can be specified as `/dev/sda` or using the `/dev/disk/by-id`, `/dev/disk/by-path` naming to ensure the proper device is being used. +If using libvirt VMs, the `serial` attribute value can be specified when creating a disk for the VM (e.g., `serial=111-disk1`) so it can be used on the `installDevice` value with the `by-id` naming as for example `/dev/disk/by-id/ata-QEMU_HARDDISK_111-disk1` if using ATA devices (`libvirt` automatically prefixes the ID with `ata-QEMU_HARDDISK_` for ATA devices, or `virtio-` for virtio devices, see https://github.com/systemd/systemd/issues/17670#issuecomment-731261739[#17670 virtio issue] for more information). +==== +* `rawConfiguration` - Optional; configuration in this section only applies to RAW images. + * `diskSize` - Optional; sets the desired raw disk image size that EIB will resize the resulting image to. This is important to ensure that your disk image is large enough to accommodate any artifacts being embedded in the image. It is advised to set this to slightly smaller than your SD card size (or block device if writing directly to a disk) as the system will automatically expand at boot time to fill the size of the block device. This is optional, but highly recommended. Specify as an integer with either "M" (Megabyte), "G" (Gigabyte), + or "T" (Terabyte) as a suffix (e.g. "32G"). + * `luksKey` - Required for encrypted images; the given LUKS key for an encrypted raw image which is necessary for EIB to be able to complete the build process. + * `expandEncryptedPartition` - Optional; disabled by default, when enabled, automatically expands the encrypted partition to its maximum size. E.g. if `diskSize` is `25G` and this field is `true`, EIB will expand the encrypted partition to `25G` during the build process. + + === Configuring OS Users EIB allows you to preconfigure users with login information, such as passwords or SSH keys, including setting a fixed root password. As part of this example we're going to fix the root password, and the first step is to use `OpenSSL` to create a one-way encrypted password: