Console installation

1. About the console installation mode
Console installation of the OS consists of the following steps:
- select the installation type;
- select the product based on the license purchased;
- select the security level based on the license purchased;
- accept the terms and conditions of the License Agreement;
- configure the system parameters;
- confirm installation;
- reboot the PC after installation;
- if installed successfully, run the OS for the first time.

These buttons help navigate the installation process:
- [Next] - go to the next page;
- [Back] - return to the previous page;
- [Install] - begin installation.

Use these keys to navigate the menu and set values:
- <Left arrow>, <Right arrow>, <Up arrow>, <Down arrow> - move the pointer left, right, up or down respectively;
- <Tab> - move the pointer to the next object;
- <Space>, <Enter> - change, enable;
- <Esc> - cancel;
- <F10> - quit.

2. Installation type selection

On the "Welcome" screen, select from the "Select the installation type" list one of the options:
- "Step by step installation" --- the OS will be installed and the permanent administrator account will be created;
- "OEM installation" --- the OS will be installed to the device to be handed over to an end user. A temporary administrator account will be created and deleted upon the installation completion. After the installation the end user will be prompted to change the installed OS parameters and to create an administrator account.

Click [Next] to advance to the "License" screen.

3. License
On the License screen:
1) press [-- Not selected --] to select the appropriate product as per the purchased license:
	- "Astra Linux Desktop";
	- "Astra Linux Server";
2) select the security level corresponding to the purchased license:
	- Base;
	- Advanced;
	- Maximum;
3) check the "I accept the license agreement terms" checkbox;
4) click [Next].

4. Configuring system parameters
After accepting the License Agreement and clicking [Next] the system configuration screen will appear.
Each parameter can be changed or left as default.

4.1 Regional Settings
In the section "Regional Settings" of the "Settings" screen, there is a set of parameters that define the OS localization and time settings:
- In the "Language Switching" field, select the key combination for changing the input language. The default combination is <Alt+Shift>;
- In the "System Language" field, select the language of the installed OS. You can select either Russian or English. The default language is Russian;
- In the "Time zone" field, select the UTC time zone, according to which the system time will be adjusted;
- In the "Additional Settings" field, the following options are available:
	- select to set the date and time manually or enable time synchronization;
	- select keyboard layouts.

To set the date and time manually, you should:
- In the "Additional Settings" field, press <Enter>;
- In the opened window, select the option "Set date and time manually". The "Date" and "Time" fields will become available for editing;
- Click on the "Date" field and set the current date in the opened calendar window;
- Click on the "Time" field and set the time in the opened window;
- Click [Apply]. You will be taken back to the "Additional Settings" field in the "Regional Settings" section of the "Settings" screen. The date and time will be immediately applied in the installation program and after the OS installation.

To enable time synchronization, you should:
- In the "Additional Settings" field, press <Enter>;
- In the opened window, select the option "Use network time settings";
- If necessary, specify the time server in the "NTP server" field;
- Click [Apply]. You will be taken back to the "Additional Settings" field in the "Regional Settings" section of the "Settings" screen. Time synchronization will be immediately enabled in the installation program and after the OS installation.

To select keyboard layouts, you should:
- In the "Additional Settings" field, press <Enter>;
- In the opened window, check the layouts that will be available in the installed OS. By default, the Russian and English layouts are checked;
- Click [Apply]. You will be taken back to the "Additional Settings" field in the "Regional Settings" section of the "Settings" screen. The keyboard layouts will be applied after the OS installation.

4.2.1 "Step by step installation": Authorization settings
Enter the hostname in the "Hostname" field. The hostname is a one-word string that identifies the computer in a network.The default hostname is generated using the "astra-<number>" pattern. The hostname may contain digits, uppercase and lowercase latin letters and a dash character ("-"). The hostname cannot start or end with a dash character ("-"). It can be 1-63 characters long.
Enter the system administrator's username in the "Administrator username" field. The username must begin with a lowercase letter and may contain any sequence of lowercase letters and digits.
Enter the system administrator's password in the "Password" field. The password can be any sequence of letters, digits and other characters, and must be at least 8 characters long. It is recommended to use a complex password containing at least three groups of characters out of the followinng ones:
	- uppercase and lowercase latin letters;
	- digits;
	- punctuation characters;
	- math characters;
	- special characters.
Confirm the password by entering it in the "Confirm password" field.
GRUB password is set to match the administrator's password by default. To change the GRUB password change the value in the corresponding field to open the password change dialog, then enter and confirm the new password.
The "Setup the bootloader (GRUB) password" checkbox must be checked in order to change the password.
If the "Login without a password" and the "Matches the administrator password" boxes are checked, the GRUB password will not be set.

4.2.2 "OEM installation": Authorization settings

If the "OEM installation" type is selected, a temporary administrator account is set up - "astra-oem" . It will be deleted upon the installation completion. The end-user will be prompted to change the installed OS parameters and create an administrator account during his first login. The "astra-oem" temporary administrator account cannot be renamed. Other temporary administrator account settings in the "Authorization settings" section are set up similarly to the "Step by step installation" type.

4.3 Other settings
In the "OS components" section check the necessary OS components on the list and click [OK]. The following components are available^
- "SSH server" --- OpenSSH server. Unchecked by default;
- "Ufw firewall" --- ufw firewall with preset profiles. Checked by default. The checkbox is disabled if "Virtualization tools" box is checked;
- "Virtualization tools" --- Virtualization environment creation tools and basic VM management tools. Unchecked by default. The checkbox is disabled if "Ufw firewall" box is checked;
- "Base packages";
- "Games" --- a games suite. Unchecked by default;
- Multimedia" --- audio and video players. Checked by default;
- "Graphics tools" --- graphic editors for vector and rasterized graphics. Checked by default;
- "Office suite" --- Libreoffice package and additional text editors, printing and scanning software. Checked by default;
- "Internet suite" --- browsers, email clients, etc. Checked by default;
- "Fly desktop" --- GUI desktop environment and Fly software. If "Step by step installation" is selected, the checkbox is checked by default. If unchecked, only the console mode will be available in the installed OS. If "OEM installation" is selected, the checkbox is checked by defaulted and cannot be unchecked.

The selected components will be installed with the OS.

4.4 Device partitioning

In the "Device partitioning scheme" section a menu opens where the disk partitioning scheme can be set. Disk partitioning itself will take place during the installation.

4.4.1 Partitioning configs

The partitioning tools allow to:
1) select a disk partitioning config;
2) select a device (disk) to be partitioned or an individual partition to install the OS alongside other operating systems;
3) select the bootloader installation location;
4) enable multiboot;
5) select the partitioning table type --- GPT or MBR (msdos).

Select the the disk (partition) to be partitioned from the "Disk on which the system will be installed" list. If the disk contains previously installed operating systems, their names will be displayed along their partitions.

The OS installation options:
1) to the unpartitioned space --- if the unpartitioned space size meets the OS system requirements, this option is selected by default;
2) to the whole disk --- if the whole disk is selected, all partitions and data on this disk will be erased;
3) to the existing partition --- if a previously installed operating system is installed in the selected partition, a warning message will be displayed.

Select the bootloader installation location:
1) "Auto" --- the bootloader will be installed the following way:
	a) on BIOS clients --- to /boot partition;
	b) on UEFI clients --- to /boot/efi;
	c) if no boot partition is available --- to the root partition;
The disk boot sector will be overwritten to point to the installed bootloader;
2) "Partition" --- the bootloader will be installed similarly to the "Auto" option, but the boot sector will not be overwritten.
WARNING! If the disk has no installed OS with its own bootloader, BIOS clients will fail to boot the OS;
3) "Not install" --- the bootloader will not be installed. The existing boot partition with a previously installed bootloader must be specified to continue the OS installation.

If the OS is installed to the whole disk, the partition table type can be selected. To select the GPT partition table type, check the "Use GPT partition table" box. Uncheck the box to use MBR partition table.

If the OS is installed to the whole disk on a UEFI client, check the "Install, the OS in BIOS compatibility mode" box to enable booting in BIOS mode.

If the OS is installed alongside one or several other operating systems, check the "Multiboot" box to display all the installed operating system in the boot menu.

For the automatic disk partitioning select an appropriate partitioning scheme from the "Disk partitioning config" list:
1) "AUTO: Use EXT4" --- the partitioning scheme for small disks (under 40 GB). No free space reservation for snapshots or updates;
2) "AUTO: Using LVM with EXT4 and a separate /home" --- the scheme provides free space reservation for snapshots or updates;
3) "AUTO: Protective conversion to EXT4" --- the partitioning scheme with the disk protective conversion. A passphrase is requested when thin option is selected;
4) "AUTO: Protective conversion to LVM with EXT4 and separate /home" --- the partitioning scheme similar to "AUTO: Using LVM with EXT4 and a separate /home", but with the disk protective conversion. A passphrase is requested when thin option is selected.

To perform partitioning manually, select one of the schemes and edit it.

4.4.2 Partition layout editing

To edit the selected partitioning scheme press <F2>.

The following can be edited:
1) partitions file systems;
2) partitions labels;
3) partitions mount points;
4) partitions creation or deletion;
5) swap area.

The disk partitioning must be performed as per the recommendations to enable snapshots creation and the OS future migrations.

The recommended disk configuration:
1) GPT partition table;
2) "/boot" partition, at least 1 GB;
3) LVM volume group, including:
	a) root partition, at least 60 GB;
	b) "/home" partition;
	c) unallocated space, at least 60 GB.

Free disk space is recommended to be provided in advance using specialized partitioning software. The installer also can allocate free space.

To partition the disk manually, edit, comment out or delete the existing strings, or add new ones.

4.4.3 Partition tables

WARNING! If the disk contains valuable data and must not be formatted, the partition table must not be created. Create the required partitions after free disk space allocation.

If the disk is empty or can be formatted, the partition table should be created.

The msdos partition table is supported by all PCs. However, the msdos partition table can have no more than four primary partitions. The example uses partitioning with the GPT partition table.

The GPT partition table is created with the following string:
	clearpart --all --drives=/dev/<device> --disklabel=gpt

4.4.4 Boot partition

The boot partition is created with the following strings:
	bootloader --boot-drive=/dev/<device> --location=partition

	part /boot --label=boot --fstype=zipl --size=1024 --asprimary

4.4.5 LVM volume group

To create the LVM volume group of the recommended configuration, use all the remaining free disk space or set the volume group size to meet the following requirements:
1) root partition --- at least 60 GB;
2) "/home" and other partitions --- as per the suggested use.

The unallocated space (at least 60 GB) for the OS snapshots and migration can be located both within the LVM volume group and outside it.

The LVM volume group is created with the following strings:
	part pv.lvm_part --grow --asprimary

	volgroup VG170 pv.lvm_part
	logvol / --fstype=ext4 --name=lv_root --vgname=VG170 --recommended
	logvol /home --fstype=ext4 --name=lv_home --vgname=VG170 --recommended

4.4.6. Swap area setup

Swap area is used to enable hibernation and improve performance with low RAM.

The swap area can be allocated as a file and/or a disk partition. It is recommended to use a swap file instead of a swap partition.

If the RAM volume exceeds 64 GB, the swap area is not needed. To disable the swap area creation, comment out the respective strings.

A swap partition is created with the following string:
	logvol swap --fstype=swap --name=lv_swap --vgname=VG170 --recommended --hibernation

A swap file is created with the following string:
	swapfile --path=/ --recommended

The installed OS can have both a swap file and a swap partition.

4.4.7 Partitioning completion

Unallocated space should be left within the LVM volume group to enable OS snapshots and migration.

To complete the disk partitioning click [Apply], to dismiss changes click [Cancel].

Partitioning will be performed during the OS installation.

5. OEM installation and the device handover to the end user

The "OEM installation" installation type is intended to install the OS to a device to be handed over to an end user.

This installation type creates a temporary administrator account deleted upon the installation completion. The installation type is selected on the "Welcome" screen.

After the OS installation the setup wizard will be started, the user will be prompted to change the installed OS parameters and create the administrator account.

To enable additional setup during OEM installation, e.g. remove or install additional packages, change the OS configuration, the software autostart priority, etc, uncheck the "Hand over the device to the user" checkbox on the "Settings" screen.

If the "Hand over the device to the user" checkbox is unchecked, after the installation completion, it is possible to login with astra-oem temporary administrator account (the setup wizard will not be displayed during the first login).

Perform additional setup in the "astra-oem" account session.

Upon the setup completion before the device handover to the end user, run the "astra-installer-qt-oem-integration" script using one of the following methods:
- double click on the "OEM integration mode setup" desktop shortcut;
- in the Start menu, select Programs --- Tools --- OEM integration mode setup;
- in the terminal, execute the following command:
	sudo astra-installer-qt-oem-integration

After the script execution the device can be turned off.

The OS setup wizard will be launched during the next login.

When the OS setup wizard has finished its work both the astra-installer-qt-oem-integration script and astra-oem temporary account are deleted.

6. OS installation
Click [Install] to begin installation. When informed that all of the data on the partitioned disks will be erased click [Yes] to confirm or [No] to cancel installation. If installation is confirmed, the window will close and OS installation will begin.

Installation progress will be shown on the progress bar and in the installation log.
The installation log is written into the /var/log/astra-installer.log file. After the installation the log will be copied to /var/log/astra-installer.log in the new system.

Once the installation is complete, the computer will reboot automatically if the corresponding checkbox has been checked. Otherwise, a message will appear stating that the installation has finished successfully. Installation time will be displayed below.

Press [Finish] to exit the installer and reboot the computer.

7. OS Setup wizard

If the "OEM installation" was selected, the OS setup wizard is launched after the OS installation during the first startup.

The OS setup wizard allows the end user to create the administrator account and change regional settings set during the OS setup.

The OS setup wizard description is provided in its built-in help. When the OS setup wizard has finished its work the astra-oem temporary administrator account is deleted.
