Installer en mode console

Updated 26 Décembre 2019

Introduction

Pour installer Calculate Linux, Télécharger une live USB créer une clé USB bootable et démarrer dessus. Utiliser cl-install pour installer le système Calculate Linux Il détectera automatiquement votre disque dur si vous n'en avez qu'un, le partitionnera, installera la distribution et le configurera de la même manière que le système a démarré depuis le disque USB :

cl-install
Enter password for user guest
Password: 
Repeat: 
Enter password for user root
Password: 
Repeat: 
Language and locale
 * Locale: Russe (Russie)
 * Timezone: Europe/Moscow (+03:00)
 * Keyboard layout: Russe
 * Hardware clock type: UTC
Distribution
 * Installation de l'image: Calculate Linux Desktop Xfce 20 x86_64 20191223
Type d'Installation
 * Allocate drive space: Erase disk and install Calculate Linux
 * Partitions options: Swap partition, The partition for the update Data partition
 * La table de Partition: la Table de Partition GUID (GPT)
 * Devices for install /dev/sda (ATA VBOX HARDDISK, 40.3 G)
Layout
 * Mount points: 
+--------------------+---------------+----------+------+-----+
| Disk or directory | Mount point |Filesystem|Format|Size |
+--------------------+---------------+----------+------+-----+
| /dev/sda1 | swap | swap | yes | 3.3 G|
| /dev/sda2 | / | ext4 | yes | 15G |
| /dev/sda3 | | | no | 15G |
| /dev/sda5 | /var/calculate| ext4 | yes | 6.9 G|
| /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,cd-rw,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
 * Système Audio: ALSA
 * Default audio de la carte: Intel 82801AA-ICH
Video
 * Video driver: Auto detection
 * Composite: yes
 * Résolution de l'écran: 1024x768
 * Grub terminal: gfxterm
 * Framebuffer resolution: Auto
Update
 * Automatically check updates: yes
 * Interval for the updates checking: 24h
 * Clean obsolete programs archives: no
 * Mise à jour other overlays: no
 * Mise à jour des packages at first boot: no

Run process? (Yes/No):

Par défaut, cl-install va créer une partition swap, une partition système, une partition pour les mises à jour et une partition de données, cette dernière comprenant les répertoires personnels des utilisateurs. Ici est plus sur le partitionnement de disque.

Si vous avez une partition dédiée aux mises à jour, cl-install peut mettre à jour le système existant à partir d'une image ISO précédemment téléchargée de l'ISO. Il s'installera sur cette partition de mise à jour, en migrant tous les principaux paramètres système, y compris la langue et la locale, les points de montage, les paramètres système, les profils utilisateurs et leurs mots de passe.

Langue et locale

Au moment de l'installation, cl-install copie les paramètres linguistiques et locale du système actuel vers le nouveau, y compris la disposition du clavier et le fuseau horaire. Si vous démarrez depuis une LiveUSB avec les options locales définies dans le menu de l'écran de démarrage de Windows, cl-install utilisera ces paramètres. Au lieu de cela, vous pouvez également choisir de définir vos propres options :

  • -l (--locale) pour définir le locale
  • --timezone pour définir le fuseau horaire
  • -k (--keymap) pour définir la disposition du clavier
  • hwclock -- pour définir le type d'horloge matérielle

Utilisez l'option list pour afficher toutes les valeurs disponibles.

Distribution

Pour installer Calculate Linux, vous pouvez utiliser soit un LiveUSB ou un fichier ISO précédemment téléchargé. Par défaut, cl-install recherche les ISOs sur le LiveUSB et dans les répertoires /var/calculate/linux et /var/calculate/remote/linux. Il sélectionnera ensuite la saveur et l'architecture appropriées. Les options -s (--os) et --march permettent de modifier respectivement la distribution et l'architecture, tandis que l'option --iso est utilisée lorsque votre ISO est stockée dans un emplacement personnalisé. -U (--update) indique à cl-install de ne s'installer que si le système suggéré pour l'installation est plus récent que le système actuel. Ces options ont un sens lorsque vous effectuez une mise à jour à partir d'un fichier image système. 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.

Attention

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

Attention

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. Pour afficher toutes les valeurs disponibles, exécutez :

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. Exemple:

cl-install --list video

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!