Installing in console mode

Updated 26 December 2019

Introduction

To install Calculate Linux, download a Live USB image, create a bootable USB drive and boot up from it. Use cl-install to install your new Calculate Linux system. It will detect your hard drive automatically if you only have one, partition it, install the distribution, and configure it in the same way as the system booted from the USB drive:

cl-install
Enter password for user guest
Password: 
Repeat: 
Enter password for user root
Password: 
Repeat: 
Language and locale
 * Locale: Русский (Россия)
 * Timezone: Europe/Moscow (+03:00)
 * Keyboard layout: Русская
 * Hardware clock type: UTC
Distribution
 * Installation image: Calculate Linux Desktop Xfce 20 x86_64 20191223
Installation type
 * Allocate drive space: Erase disk and install Calculate Linux
 * Partitions options: Swap partition, The partition for the update, Data partition
 * Partition table: GUID Partition Table (GPT)
 * Devices for install: /dev/sda (ATA VBOX HARDDISK, 40.3G)
Layout
 * Mount points: 
+--------------------+---------------+----------+------+-----+
| Disk or directory  |  Mount point  |Filesystem|Format|Size |
+--------------------+---------------+----------+------+-----+
| /dev/sda1          | swap          | swap     | yes  | 3.3G|
| /dev/sda2          | /             | ext4     | yes  | 15G |
| /dev/sda3          |               |          | no   | 15G |
| /dev/sda5          | /var/calculate| ext4     | yes  | 6.9G|
| /var/calculate/home| /home         |          |      |     |
+--------------------+---------------+----------+------+-----+
 * Bootloader: /dev/sda
 * Use UUID: yes
Network settings
 * Network: Migrate network settings
Users
 * Migrating users: 
+------+-------------+---------------------------------------------------------------------------+
| User |Administrator|                                  Groups                                   |
+------+-------------+---------------------------------------------------------------------------+
| guest| Full access | audio,cdrom,cdrw,games,guest,lp,plugdev,scanner,usb,users,uucp,video,wheel|
+------+-------------+---------------------------------------------------------------------------+
 * Use the root password to edit Grub: yes
 * Autologin: Not used
 * Encrypt user profiles: no
Audio
 * Audio system: ALSA
 * Default audio card: Intel 82801AA-ICH
Video
 * Video driver: Auto detection
 * Composite: yes
 * Screen resolution: 1024x768
 * Grub terminal: gfxterm
 * Framebuffer resolution: Auto
Update
 * Automatically check updates: yes
 * Interval for the updates checking: 24h
 * Clean obsolete programs archives: no
 * Update other overlays: no
 * Update packages at first boot: no

Run process? (Yes/No):

By default, cl-install will create a swap partition, a system partition, a partition for updates and a data partition, the latter including user home directories. Here is more on disk partitioning.

If you have a dedicated partition for updates, cl-install can update the existing system from a previously downloaded ISO image. It will install to that update partition, migrating all main system settings, including the language and locale, the mount points, the system settings, the user profiles and their passwords.

Language and locale

At installation time, cl-install copies the language and locale settings from the current system to the new one, including the keyboard layout and the timezone. If you boot from a LiveUSB with the locale options set in the bootup screen menu, cl-install will use those settings. Instead, you can also choose to set your own options:

  • -l (--locale) to set the locale
  • --timezone to set the timezone
  • -k (--keymap) to set the keyboard layout
  • --hwclock to set the hardware clock type

Use the list option to view all available values.

Distribution

To install Calculate Linux, you can either use a LiveUSB or a previously downloaded ISO file. By default, cl-install searches for ISOs on the LiveUSB and in directories /var/calculate/linux and /var/calculate/remote/linux. It will then select the appropriate flavour and architecture. Options -s (--os) and --march allow to modify respectively the distribution and the architecture, while option --iso is used when your ISO is stored in a custom location. -U (--update) tells cl-install to install only if the system suggested for installation is newer than the current one. These options make sense when you update from a system image file. If the computers are in aCalculate Directory Server Calculate Directory Server domain, you only need to copy the new ISO file to directory /var/calculate/remote/linux on the server, and then run cl-install --update on the desktops. In this case, the -K (--update-pkg) option may be useful. It tells the system to update at first boot and then to install packages from the migrated /etc/portage/sets/custom set.

Installation type

You can install Calculate Linux either to the entire hard disk using the installer's built-in partitioning tool, or to existing free partitions. If you install Calculate Linux together with another operating system or use your own disk partitioning scheme, you can use existing partitions without re-partitioning your hard drive. To do this, use the -d (--disk) option.

For instance, if you want to install on the /dev/sda2 partition only:

cl-install -d /dev/sda2

The -d option can take several colon separated values: partition, mount point, filesystem and formatting.

Here is an installation example with a swap partition and a data partition:

cl-install -d /dev/sda1:swap -d /dev/sda2::btrfs -d /dev/sda5:/var/calculate -d /var/calculate/home:/home

In our example, /dev/sda1 will be used as swap, while /dev/sda2 will be the system partition. The system partition will be formatted as btrfs. /dev/sda5 will be used as a data partition (in Calculate Linux, those are typically stored in /var/calculate). The last option will mount the /home directory to /var/calculate/home. -d /dev/sda2::btrfs and -d /dev/sda2:/:btrfs are the same, as they point to the same location, the root partition being the default.

Warning

The system partition is always formatted, even if you do not specify format expressly.
If you specify the filesystem expressly, the partition will be formatted if it does not correspond to the filesystem of the partition.

The default filesystem is ext4. Calculate Linux also supports btrfs, ext3, ext2, jfs, reiserfs and xfs. If you specify btrfs-compress, the btrfs file system with zstd compression enabled will be used.

Disk partitioning

If you decide to install on the entire disk, the program will partition it. You can modify the disk partioning scheme as well as the partition sizes. Для указания схемы разбиения используйте параметр -S, --auto-scheme. To view all available values, run:

cl-install -S list

Partitions options values:
  [swap]    Swap partition *
  [update]  The partition for the update *
  [data]    Data partition *
  [uefi]    Use the UEFI bootloader *
  [lvm]     Use LVM

Where

  • swap creates a swap partition;
  • update creates a partition for updates. In this case, like slots A/B on Android devices, the installer will be able the newer version of the system to this second partition from an ISO file.
  • data creates a separate partition for data;
  • uefi creates a bootable EFI partition and enables the UEFI bootloader.
  • lvm enables LVM partitioning. Multiple volumes may be used.

The default are swap, update, data, or swap, update, data, uefi if you have UEFI on your computer. If GPT is used, a BIOS boot partition will be created.

To install the system on a single partition using an entire drive, specify none, as shown below:

cl-install -S none

To specify the filesystem when partitioning, use options --root-fs for the system partition and data-fs for the data partition. Below is how to install a desktop system on a btrfs partition and with OpenRC as the network manager:

cl-install --hostname pc201.local.calculate.ru --netconf openrc --root-fs btrfs --data-fs btrfs

Network settings

For Calculate Linux Desktop, you have the choice between NetworkManager (default) and OpenRC. If you prefer OpenRC, set the following parameter: --netconf=openrc.

Other network settings include:

  • --iface stands for the network interface, DHCP or IP address and network mask (example: --iface eth0:192.168.1.10:24)
  • --hostname sets a short or a long hostname
  • --ntp NTP installs an NTP server for the system
  • --dns DNS stands for domain name servers (comma separated)
  • --domain-search stands for domains to be searched (comma separated)
  • --route adds routing rules

Warning

When you set a static IP address and network mas for an interface, always remember to add the the default route, as shown below:
cl-install --iface eth0:192.168.1.10:24 --rout eth0:default:192.168.1.1
If you fail to do so, you may find yourself with no Internet connection.

If you have only one network interface, you can skip the respective parameter.

You can specify multiple routes by adding parameters to --route .

Users

When installing from a Live USB, you will be prompted for the guest and root passwords. When you update from an ISO, you will only be prompted for a password if the user is either 'guest' or 'root'. To change this behaviour and set the root password even though it be different from the standard for a Live USB, use the --root-password option.

By default, the bootloader can only change system boot parameters with the superuser password. To set this off, use --grub-passwd=off.

As mentioned above, the installer copies all user from the current system to the one that is being installed. When installing from a Live USB, the guest user will be migrated and will log into the graphical session by default. The -u option allows to edit the list of system users and their privileges. Here is how to create users user, guru and admin with different access privileges:

cl-install -u user -u guru:update -u admin:all:sudo,wheel,default

В качестве разделителя значений параметра -u используется двоеточие. The first value is the login, the second one the access rights code. The accepted values are: none which means, of course, no access (default); update that gives the right to update the system, and all which stands for the full access rights to Calculate Utilities. As the third parameter, you can list all Unix groups the user must belong to. default provides the default groups. Besides, a 'sudo' group will be created for the 'admin' user:

+------+--------------+--------------------------------------------------------------------------+
| User |Administrator |                                  Groups                                  |
+------+--------------+--------------------------------------------------------------------------+
| admin| Full access  | audio,cdrom,cdrw,games,lp,plugdev,scanner,sudo,usb,users,uucp,video,wheel|
| guru | System update| audio,cdrom,cdrw,games,lp,plugdev,scanner,usb,users,uucp,video           |
| user |              | audio,cdrom,cdrw,games,lp,plugdev,scanner,usb,users,uucp,video           |
+------+--------------+--------------------------------------------------------------------------+

Groups sudo and wheel+ provide access to the system with root permissions using sudo and su commands respectively.

For the domain users of Calculate Linux Desktop, access privileges can be assigned for specific desktops using groups sudo-host, where 'host' is the short or the long name of the relevant host. Refer to file /etc/sudoers.d/domain for more details. For domain users to be able to use su, add them to group su on the server. Note that the wheel group gives access to su for local users only.

Audio

At installation time, you can choose between PulseAudio and ALSA for sound. ALSA is the default choice on Calculate Linux. You might need to select your default audio device. To do this, use the --card option. To view all available values, run:

cl-install --card list

Default audio card values:
  [0,3]  HDA NVidia, HDMI 0
  [0,7]  HDA NVidia, HDMI 1
  [1,0]  HD-Audio Generic, ALC1220 Analog *

Here is an example of installation that defaults HD-Audio Generic:

cl-install --card 1,0

Video

Feel free to select the relevant video card and resolution on the LiveUSB's bootup screen. If you select the proprietary Nvidia driver, the necessary package will be installed at installation time. This is maybe the best way to test the system and select a video driver before installing on your hard drive. But you can also change the video driver and the screen resolution at installation time. You can edit the following parameters:

  • --video to set the video card;
  • --composite to enable composite (on by default);
  • -X to set the Xorg definition;
  • --grub-terminal to configure the Grub screen;
  • --fb to set the framebuffer definition.

Use list to view all available values. Example:

cl-install --video list

Video driver values:
  [default]      Auto detection
  [radeon]       AMD Radeon (radeon)
  [amdgpu]       AMD AMDGPU (amdgpu)
  [intel]        Intel (intel)
  [modesetting]  Framebuffer device (modesetting)
  [nouveau]      Nvidia Nouveau (nouveau) *
  [nvidia]       Nvidia Graphics Driver (nvidia)

Update

Like most OSes nowadays, Calculate Linux can check updates at regular intervals. A user needs privileges to get notifications and perform updates. By default, guest has them. When you create another user, you must assign them expressly. Please refer to the Users chapter.

You can select your interval for updates with the -I (--autocheck-interval) option or disable the check for updates at all with the -a (--autocheck) option.

We strongly recommend that you make system updates at least once a month, once a week if you can. If you do not, it may be difficult to catch up. We do what we can to make a maximum one-year-without-an-update period possible for our users, even though Calculate Linux is a rolling-release distribution. It means that you do not have to reinstall it to upgrade.

Install once and have fun!