Change InstallSelected to be a map with the key being
the name of the TargetMedias from the model to support
installing across multiple disks.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Detect the details of the changes to the media to be presented
to the user during the final confirmation step.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
clr-boot-manager now supports a legacyBios mode. This patch makes sure
to adjust the expected env variable in order to force installing bootlader
in legacy mode.
This patch also sets the debug flag so we can inspect the c-b-m behavior.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Use a new feature from telem-record-gen where the telemetry record is
generated independently of telempost daemon. This change allows to
simplify the code to interact with telemetry.
Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
Currently, the network check is displayed as success even when it fails.
This fixes the bug to indicate the correct progress status.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
Fixes#416.
After the language is selected, the pre-check page checks if the
prerequisites for the installation are met.
Currently the checks include system compatibility and network
connectivity.
Fixes the progress failure status to show a different color.
Refactored to remove redundant code.
Displays the system check error.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>gui: Fixes window resize due to error message
The TUI allows the user to set https_proxy, but the GUI
relies upon the Network Manager. Autoproxy via pacdisvoery
works, but if manual settings are made we need to use the
environment variables.
Changes to the proxies via Network Manager are synced
from the non-privileged user to root for proxy.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When running the "swupd verify" command to install the base OS and the
selected bundles, the progress of the command execution was just being
shown as a progress bar that was looping until the swupd command
finished. This approach was not ideal since this process can take
several minutes to complete, and since the progress bar was just
spinning it didn't provide a real feedback for the user to know in what
part the process was. This can trigger some anxiety in users.
This commit solves this problem by using the machine readable output
from swupd to determine the exact part of the process where the install is
and report this to the user using a series of steps along with a progress
bar (or percentage value in not TUI installer) that shows how far the
step has gotten.
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
The way this was coded was causing bugs in output when creating an ISO
image. The most obvious was the line "Cleaning up from ISO creation"
would be repeated a few times at the end of execution.
Having sub-progress loops doesn't make sense here, since the flow is
"task"->"completion status" not "task"->"subtask"->"sub
complete"->"task complete"
Also, the removed progress loops would fail to be printed anyways, so
removing them doesn't change progress output except for fixing this
bug.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
We need to pass the full suite of options to the ISO
generation code to ensure the call to swupd has all
of the requested options.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Handle errors during installation.
Displays an error message on screen instead of panic and crashing.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
Use new bundle option to swupd verify instead of bundle adds.
Optimize the flow to only have a single swupd verify call.
Reduces the desktop image build from 40 minutes to 10 minutes.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Add execution of MakeIso() to controller's Install routine, after all
other image creation tasks are complete.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
When building an initrd it's convenient to only install the 'os-core'
bundle, because any extra bundles are not required and bloat
intird.
This commit adds an option to only run the 'verify' command and not
install the extra bundles listed as 'core-bundles'.
Approved to reduce coverage for swupd library.
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Create the command line argument and configuration file changes
to support generating an ISO from the raw image.
TODO: Integrate the ISO generation code
Signed-off-by: Mark D Horn <mark.d.horn@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>
Now check for which service is handling wired network interfaces.
Needed by the TUI which still handles static IP configurations for
wired connections.
TODO: Once NetworkManager is the new OS default, we can explore
configuring wireless interfaces via the TUI as well.
TODO: Consider change the other systemctl calls to use new dbus.
Dropping coverage requirement for this build
Signed-off-by: Mark D Horn <mark.d.horn@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>
Fixes Issue: #261
Pull Request #236 introduced a bug where local network interfaces
are always copied to the target media.
This PR correct this by only copying when copyNetwork is set to
true; this is enabled in the UI when the users changes a network
interface (for static).
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
New functionality to download Pre and Post Installer messages
TODO: Display the messages as pop-ups
- Need to use system curl command to handle proxies for now
Refactoring for enabling:
- Moved FetchRemoteConfigFile from conf to network
- Move code for Clear Linux Version parsing until a utility function
which is called early in the flow for reuse
Now that use external curl FILE protocol passes.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes Issue: #242
Only show user selected bundles on the summary menu item for
bundle selection; not core, required bundles.
Make the latest user bundle changes more evident by prepending
them to the list of bundles to install.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We also need to set either proxies or the
DNS search domain to enable pacdiscovery
if network testing does not pass.
Need to add:
systemctl enable pacdiscovery on target
Ensure we copy the /etc/systemd/network settings
- Fixed bug in showing dns server per interface
- Add new DNS Domain field per interface
- Mask out (skip) Wireless and Bridge interfaces
- Update Network Interface TUI
- Added DNS Domain
- Widen screen for error messages
- Moved Error labels before field
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes#215
We already default to placing the swupd state cache directory
in the installation target. This change implements the only
missing part of the request to allow removing the state directory.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Create a new environment variable 'yamlDir' which locates
the directory containing the configuration YAML file being
used using the installation. This can then be used for
pre-install and post-install hooks to locate the scripts
to be run.
Signed-off-by: Mark D Horn <mark.d.horn@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>
Save a copy of the current configuration prior to starting
the installation. This provides a YAML containing the configuration
in case of a crash or failure during the install.
It is placed in the same directory as the clr-installer.log file as
both of these files should be submitted in case of failures.
Signed-off-by: Mark D Horn <mark.d.horn@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>
Added the '-l' to run bash as a login script.
Previously gcc was not on the path when executed
without '-l'.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Add the swupd's --format, --contenturl and --versionurl arguments.
These arguments are mapped with the --swupd prefix such as:
--swupd-format, --swupd-contenturl and --swupd-versionurl
And are used for constrained environments dealing with local installs,
specially with image generation in a network isolated environment.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Now users may defined environment variables to be used in the image
generation. Also, these variables are passed down to the pre and post
install hook scripts.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
There're some use cases for images without kernel definition, to
pass over the configuration the user may define, kernel: none.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Be consistent with ister_gui and only add the sysadmin-basic
bundle when non-root users are added. Previous we were always
adding the sudo bundle.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Also change to using 'locale -a' to generate possible languages
installed as 'localectl' is currently broken due to the relocation
of the locales from /usr/lib to /usr/share.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>