- Add suspend lvm state for offline volumes.
- Need to check all children for possible install targets.
- controller: Add clr-init with lvm usage
- LVM always written in /etc/fstab
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
If the user has not explicitly requested 'latest' from the
command line, use version of the available offline content.
This is the default case for generated installer ISOs.
This functionality was broken by a previous fix.
Ref: 6dc97671d3
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Change the PostArchive model type from bool to boolset to account
for default of true and state if the value was explicitly set.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Change the AutoUpdate model type from bool to boolset to account
for default of true and state if the value was explicitly set.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
If the user forces a version to be installed, we ignore any
offline swupd content cache (standard for Installer ISOs) which
might be present.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Refactor the boot partition login to central code.
Search all target install media for the boot partition.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
New default is the creation of a /var/swapfile if not
swap partition is explicitly defined in the YAML file
or via Advanced Configuration.
Now use and report media sizes in XiB
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #517
Enable the possibility of no /boot partition in legacy mode.
- add warning if no /boot and legacy
Warn the user that installing in legacy mode without a /boot
partition means the install will never boot in UEFI mode.
- Force off 64bit mode
When an ext file system is used for the /boot content
(no /boot partition, and booting legacy mode) we need to
disable 64bit flag or the image file system not boot.
https://wiki.syslinux.org/wiki/index.php?title=Filesystem#ext
- Blocked use of XFS due to partition table requirement to use MBR.
- Do not allow encryption of / w/o /boot
Refactor validation code for reuse by both standard and advanced
disk partitioning. Add new standard Desktop and Server wrapper
functions.
Move validation to common function, remove from Find Targets, and
remove redundant validation function.
Enable the skip size for advanced partitions.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We were attempting to run the telemetry command to opt out
on the target when the binary was not present.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
It is unknown how long each shell command can take or there may
be only a single call to a long-running script so make this
indeterminate to output spinner progress.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #531
Add new hook to be called after image generation is completed.
Update base image test to use post-image hook
This is useful for image manipulation such as compression, format
modification, etc.
Fixes: #649
When post-install hooks are run in a chroot, the network is
inherited from the host, but DNS is not configured.
This work-around temporarily copy's the hosts /etc/resolv.conf
to enable DNS in the chroot.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
With the new flag we can easily instruct clr-installer to use an arbitrary
build/install, this flag eases the clr-boot-manager's CI by testing image generation
before we land new features.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Fixes: #447
Some failures with media left the progress bar active
and did not give a visual failure cue.
Add the executable to the message
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #600
Only copy the swupd configuration files from the host to the target
by default when running the interactive installer (gui or tui).
Otherwise, observe the setting from the configuration YAML or the
command line (highest) argument.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Ignore the --iso and --keep-image flags for the massinstaller
when installing onto physical media as they do not logically apply.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
If an ISO can not be generated due to multiple kernels, then
ensure that we keep the raw image file.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Currently, ISO image generation supports only a single kernel.
Hence, skip ISO generation if multiple kernel bundles are present.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
We should be using image mode when invoking clr-boot-manager
as we want changes implemented on the target image.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Now printPrefix is concatenated into the progress bar description. The
printPrefix is only intended for the mass installer, so it is removed
from the gui/tui progress bar descriptions.
Signed-off-by: John Akre <john.w.akre@intel.com>
swupd had depreciated 'verify --fix' with 'os-install' a while ago.
Though we change the command, the method name was unchanged. Now
refactored the name and also just pass the entire model at creation
for future changes instead of just a few member datum.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When installing from offline content, the taget version must match the
offline content version so that the offline content remains valid. Now a
log message will be written to document the version override.
Signed-off-by: John Akre <john.w.akre@intel.com>
When the version field in the config file is set to 0, the latest
version will be installed instead of the host's version.
Fixes: #502
Signed-off-by: John Akre <john.w.akre@intel.com>
When target bundles are added to the configuration file
we generate an override YAML file for the installer. This needs
to default to autoUpdate: true for interactive installs.
This fixes a bug which was introduced when we switched to having
the installer generate the override YAML file instead of creating
it with a post-installation hook in conjunction with offline
installation support.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #478
Add new --allow-insecure-http flag to support the use of HTTP URLs.
This is needed to allow swupd to download content from http sites;
generally development mixes.
Also enable the use of the setting in both the TUI and GUI to allow
the user to set a swupd mirror which is HTTP.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
The VerifyWithBundles function is used to install contents into the
target, download offline contents, and to create the initrd for the ISO.
Now, a prefix string will be added to the output of these commands to
specify which step VerifyWithBundles is running.
Signed-off-by: John Akre <john.w.akre@intel.com>
This commit adds an installation step to copy offline update contents to
the install target media. When installing from an ISO image, unsquashfs
is used to decompress offline content directly to the target which is
faster than a file copy.
Signed-off-by: John Akre <john.w.akre@intel.com>
A network check will be performed when a network connection is required
to install, but hte installer's network state is not passing. If the
network check fails, additional bundles were selected, and offline
installs are supported, the user will be prompted to remove the
additional bundles so that they can continue the install.
Signed-off-by: John Akre <john.w.akre@intel.com>
The indeterminate progress bar will continually move until the network
check completes. This type of progress bar makes more sense than the
multistep progress bar that incremented after each network retry.
Signed-off-by: John Akre <john.w.akre@intel.com>
When installing with offline content, the installed version must match
the version of the installer image so that the offline content can be
consumed.
Signed-off-by: John Akre <john.w.akre@intel.com>
When creating installer images with offline support, installation
content for a minimum set of bundles will be downloaded to the
/var/lib/clr-installer/offline-content directory inside the installer
image. The offline-content directory will be used instead of the network
to install bundles when it exists.
To generate images with offline support, the --offline command line
argument or the offline config file field can be set.
Signed-off-by: John Akre <john.w.akre@intel.com>
The targetBundles field in the config file specifies the minimum set of
bundles that the installer image's installer will install to the target
media. To achieve this functionality, a config file is generated and
inserted into the installer image at /var/lib/clr-installer.yaml. This
config file contains the list of bundles specified by targetBundles and
a minimum set of entries based on the config file used to generate the
installer image (keyboard, language, timezone, kernel).
Signed-off-by: John Akre <john.w.akre@intel.com>
This change removes the need for telemetrics bundle to be present for
the installer to work.
Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
This change executes opt-in when users agree to provide crash information
to the clear linux team and opt-out when users do not agree.
Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
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>