23 Commits
Author SHA1 Message Date
William Douglas 73d7f22c56 Update code for revive linter 2022-11-03 10:18:41 -07:00
Mark D Horn 95125f0fe1 massinstall: Exit with error for validation fails
We were only printing an error message for media validation
errors, but exiting with status 0.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-05-11 10:54:42 -07:00
Mark D Horn 4f2caf0e33 boolset: switch AutoUpdate from bool to boolset
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>
2020-05-07 17:04:00 -07:00
Mark D Horn a639650dee storage: find and set boot partition
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>
2020-04-29 15:45:30 -07:00
Mark D Horn 4244fbaf43 storage/ui: swapfile instead of swap partition
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>
2020-04-15 17:23:59 -07:00
Mark D Horn 636e4804fc model: refactor method name IsDesktopInstall
Renaming method to be more clear.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-27 15:07:10 -07:00
Mark D Horn 9283a120fd Enable override for partition validation
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-27 15:07:10 -07:00
Mark D Horn 90b5e36769 massinstaller: Add partition checking
Ensure validation is done for both standard and
advanced partitioning methods.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-27 15:07:10 -07:00
Mark D Horn be9d9bc64e Update partitioning support in legacy mode
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>
2020-03-27 15:07:10 -07:00
Mark D Horn b99ff9135a storage: Enable Advanced Media Partition for CLI
Fixes: #628

Allow the use of the Advanced Media Partition labels from the command
line interface if no targetMedia is found in the YAML file.
The primary use case for this feature is PXE booting for installation.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-03-24 15:16:21 -07:00
Mark D Horn 6ab2c723c9 mass: Enable automatic reboots
Do not wait for user input for requested reboots.
Instead offer a short countdown which can be aborted
by an interactive user if enabled by mistake.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
John Akre c7fae814b5 swupd: Concatenate printPrefix with description
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>
2019-10-16 09:15:21 -07:00
John Akre d0ec0371b6 swupd: Specify VerifyWithBundles steps
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>
2019-09-23 16:08:10 -07:00
Mark D Horn 7c99f7d9c8 args: tui: gui: --gui flag to force graphics mode
Now check for mutually exclusive options.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-09-12 19:20:47 -07:00
Mark D Horn 7098434b5a storage: Change InstallSelected to be a map
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>
2019-09-12 19:20:47 -07:00
Mark D Horn 3334c1ff67 storage: Identify Install Target types
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>
2019-04-18 12:48:36 -07:00
Leandro Dorileo f9379723f3 mass installer: break line for version warning printing
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Leandro Dorileo 1074784a7a args: add --swupd-state
When creating images it's useful to have a --swupd-state to provide
an state dir outside the image so we don't duplicate the target's
content.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Leandro Dorileo e309b76760 mass installer: print progress only if not piped
With this we print only the new step getting started - not printing
the actuall progress - if the process is piped/redirected.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-02 09:13:21 -07:00
Leandro Dorileo f5e8d7e33b controller: simplify cleanup code
Simplify the cleanup code and move the SaveInstallResults() call to
the controller code, removing this knowledge from the front end
implementations.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-01 09:48:43 -07:00
Leandro Dorileo a26b5415a1 model: add Version field
The mass-installer use case for image generation requires to specify
the target system version. This patch allows the configuration of
an arbitrary version.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-27 14:50:33 -07:00
Leandro Dorileo 28f1e0fa92 errors: start using ValidationError
For data model validation we start using the specialized ValidationError
to report that kind of problem. In that situation in the main program
we avoid panic'ing but nicely report the model validation issue and
reporting exit status 1.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-25 09:56:40 -07:00
Mark D Horn e84bb0e403 First Open Source push of code base
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>
2018-08-13 14:14:30 -07:00