In order to avoid delay in loading the installer, scan the media in the
background as a separate go routine.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
We were part probing all of the devices at once, then again
one at a time. Remove the second probing.
Also make the probing only log on fail.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When booting off of a generated ISO image, the boot devices were showing
up as installible media. This patch fixes this issue by ignoring
squashfs filesystems and labels that contain CLR_ISO.
A second issue was found where the filters above would not work during
the first visit to the "Configure Media" window, and all devices would
be erroniously displayed. By adding partprobe above the lsblk, the issue
is resolved. This has a side-effect where we can remove the individual
partprobe commands usually run after lsblk.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
- Modifies the screen flow to first launch the Welcome (Language) page
- Adds localization package "gotext"
- Enables localization for "en_US", "zh_CN" and "es_MX"
- Modifies the strings to use localized version
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
Always store the current partition table, with free space,
in the disk block device information.
Find free space from the already loaded partition table.
This information will be used for manual disk partitioning.
Use separate mkpart and format flags
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Safe: gpt disk with sufficient space
Destructive: All media (expect mounted)
Modify: all gpt disks
When adding new partitions, ensure we store the new
partition number and update the device name.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We will log the message, but not crash the program as most
non-zero error was really warning about the partition table
or media details.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Show the device name and file system type in the error message.
We have had mapping issue on some device names.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
- The new -j flag detects ister json config format and converts it to yaml
- The existing -c flag also detects ister json config format, converts it to yaml
and continues as usual
- Handles the ister "rest" option for physical targets
- Handles multiple targets
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
Need to ensure we set the boot mode correctly on the targeted
boot partition.
1. Ensure boot flag is set, was getting removed by the follow-on
sgdisk command.
2. Need to set legacy_boot, not just boot when selected in YAML
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This information is actually useless for future references and could
also endup in the telemetry records. Since we have no good reason to
store it we don't want to marshal this data.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
By default, the prompt for the encryption passphrase will timeout
and drop into the rescue shell. This prevents the timeout and
waiting forever for the passphrase.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes#10
Enable encrypted partitions for all but /boot.
A single passphrase is used for all partitions which enable encryption
expect swap, which currently uses a random password each boot.
NOTE: If we need to support a large swap for laptop suspend/restore, we
should change from a random passphrase to the same known passphrase.
/etc/crypttab will attempt to use either the disk label or the
UUID to identify the disk instead of the physical disk name.
Swap partition would normally loose its UUID or Label each boot
due to dm-crypt and mkswap overwriting the connect. To maintain
identification of the partition, we use a trick from here:
https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption
of creating a small (1M) ext2 partition with label at the beginning
of the swap partition, then use an offset in the /etc/crypttab to
prevent overwriting this information.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
lsblk changed their JSON output format for booleans from strings
to actual booleans and for number from strings to actual numbers
in release 2.33.
Updated the code to work with both the new and old formats.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Size is either set at the parent level or it is a
sum of the children.
Add error checking and new test cases.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We should not panic if we could not determine the guid, with this we
emit a log warning and move forward.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
When the default logging is set to Info, have a baseline of
the installation steps logged.
Add additional testing to storage to ensure metrics do not slip.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Loop devices are valid then don't exclude it when reading block device's
configuration, also make sure tui reacts properly.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
With this the user can add alias block devices and use these alias
to expand target media's Name values, i.e:
block-devices: [
{name: "target", file: "/dev/sda"}
]
targetMedia:
- name: ${target}
type: disk
...
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
With this users may provide custom arbitrary mkfs.* options. Also,
the patch attempts to simplify the ops.go code and reduce code
duplication.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Fixes Issues #26
- Build header and scrolling frame
- Populate the scrolling frame with a row frame for each disk
- Only enable one disk at a time for changes
- Prevent changes to other disks once configuration begins
- Added Warning PopUp dialog
- Implement ReScan and Revert of media
- Add Disk Serial number to block device
- Needed to track selected disk in case of a rescan
- Handle no usable media
- Fix size error when size unchanged
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This patch fixes the tests coverage regressions and add a small fix
to the script where it doesn't remove the temporary coverage report
file if it fails. Now it can be enabled on the CI and avoid adding
new testsuite regressions.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
If a USB drive is added or removed, this allow discovery without
restarting the installation program.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This is code is still alpha. The Text-based User Interface is
undergoing a resign of the layout before beta.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>