The Partial() function is used to report a partial progress in a progress bar. When using this function the value set on the progress bar was always zero since it was doing a division of two integers that were always resulting in a number < 1 which was being truncated because both numbers were integers so go was using an integer to store the result too. This commit fixes the bug by converting the values to the right types. Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
Clear Linux Installer
Clear Linux OS Security
As the installer is a part of the Clear Linux OS distribution, this program follows the Clear Linux OS Security processes.
Dependencies
The following bundles are required in order to run clr-installer:
- sysadmin-basic (for kbd)
- storage-utils
- network-basic
How to test?
Make sure there is extra storage space, such as a USB memory stick, and choose it while running the installer.
Clone this repository
git clone https://github.com/clearlinux/clr-installer.git
Build the installer
cd clr-installer && make
Install (installing the installer)
To create a bootable image which will launch the installer, use the installer.yaml as the config file.
sudo .gopath/bin/clr-installer --config scripts/installer.yaml
Refer to InstallerYAMLSyntax for syntax of the config file.
Create a bootable installer on USB media:
sudo .gopath/bin/clr-installer --config scripts/installer.yaml -b installer:<usb device>
Note: Replace
<usb device>with the usb's device file as follows:sudo .gopath/bin/clr-installer --config scripts/installer.yaml -b installer:/dev/sdb
Testing [Run as root]
In order to execute an install the user must run clr-installer as root. It's always possible to tweak configurations and only save the configuration for future use, in that case it's not required to run as root.
Having said that, to run a install do:
sudo .gopath/bin/clr-installer
Multiple Installer Modes
Currently the installer supports 2 modes (a third one is on the way):
- Mass Installer - using an install descriptor file
- TUI - a text based user interface
- GUI - a graphical user interface (yet to come)
Using Mass Installer
In order to use the Mass Installer provide a --config, such as:
sudo .gopath/bin/clr-installer --config ~/my-install.yaml
Using TUI
Call the clr-installer executable without any additional flags, such as:
sudo .gopath/bin/clr-installer
Reboot
For scenarios where a reboot may not be desired, such as when running the installer on a development machine, use the --reboot=false flag as follows:
sudo .gopath/bin/clr-installer --reboot=false
or if using the Mass Installer mode:
sudo .gopath/bin/clr-installer --config=~/my-install.yaml --reboot=false