User:Josephgbr/drafts/Archinstall

From ArchWiki
Jump to navigation Jump to search

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: This documentation is in preparation of possibly adding archinstall (Português), based on the preview in User:Torxed, to the official Arch Linux ISO as an optional addition. (Discuss in User talk:Josephgbr/drafts/Archinstall)

archinstall é uma ferramenta para ajudar na instalação do Arch Linux. A ferramenta é voltada principalmente para novos usuários que desejam experimentar o Arch Linux por meio de um processo de instalação guiada.

O objetivo desta ferramenta é instalar uma instalação de referência leve do Arch Linux e seguir o valor central de "Keep It Simple". Para uma instalação com mais recursos, siga o Guia de instalação oficial.

Nota: Como o processo de instalação precisa obter pacotes de um repositório remoto, este guia assume que uma conexão de Internet está disponível.
Atenção: Quaisquer problemas e perguntas de suporte devem ser relatados na página oficial do projeto [1]. Problemas como a partição de sistema EFI sendo um requisito e que o Systemd-boot seja usado sobre outros gerenciadores de boot são limitações conhecidas.

Pré-requisitos

Obter uma imagem de instalação

Visite a página Download e, dependendo de como você quer inicializar, obtenha o arquivo ISO ou uma imagem netboot, e a respectiva assinatura GnuPG.

Verificar a assinatura

É recomendável verificar a assinatura da imagem antes de usá-la, especialmente ao fazer o download de um espelho HTTP, no qual os downloads geralmente são propensos a serem interceptados para servir imagens maliciosas.

Em um sistema com GnuPG instalado, faça isso baixando a assinatura PGP (sob Checksums na página de Download) para o diretório da ISO e verificando-a com:

$ gpg --keyserver-options auto-key-retrieve --verify archlinux-versão-x86_64.iso.sig

Alternativamente, de uma instalação existente de Arch Linux, execute:

$ pacman-key -v archlinux-versão-x86_64.iso.sig
Nota:
  • A assinatura em si pode ser manipulada se for baixada de um site espelho, ao invés de archlinux.org como acima. Nesse caso, certifique-se de que a chave pública, que é usada para decodificar a assinatura, seja assinada por outra chave confiável. O comando gpg produzirá a impressão digital da chave pública.
  • Outro método para verificar a autenticidade da assinatura é garantir que a impressão digital da chave pública seja idêntica à impressão digital da chave do desenvolvedor do Arch Linux que assinou o arquivo ISO. Veja Wikipedia:pt:Criptografia de chave pública para mais informações sobre o processo de chave pública para autenticar chaves.

Preparar uma mídia de instalação

A imagem de instalação pode ser fornecida à máquina de destino através de um unidade flash USB, um disco óptico ou uma rede com PXE: siga o artigo apropriado para preparar você mesmo um meio de instalação a partir da imagem escolhida.

Inicializar o ambiente live

Nota: As imagens de instalação do Arch Linux não oferecem suporte a Secure Boot. Você precisará desabilitar Secure Boot para inicializar a mídia de instalação. Se desejado, Secure Boot pode ser configurado após completar a instalação.
  1. Aponte o dispositivo de inicialização atual para aquele que possui a mídia de instalação do Arch Linux. Normalmente, isso é obtido pressionando uma tecla durante a fase POST, conforme indicado na tela inicial. Consulte o manual da sua placa-mãe para obter detalhes.
  2. Quando o menu do gerenciador de boot da mídia de instalação aparecer, selecione Arch Linux install medium e pressione Enter para entrar no ambiente de instalação.
    Dica: A imagem de instalação usa systemd-boot para inicializar no modo UEFI e syslinux para inicializar no modo BIOS. Veja README.bootparams para uma lista de parâmetros de inicialização.
  3. Você será autenticado no primeiro console virtual como o usuário root e será apresentado um prompt de shell Zsh.

Para trocar para um console diferente — por exemplo, para ver este guia com Lynx junto com a instalação — use o atalho Alt+seta. Para editar arquivos de configuração, mcedit(1), nano e vim estão disponíveis. Veja packages.x86_64 para uma lista dos pacotes incluídos na mídia de instalação.

Verificar o modo de inicialização

To verify the boot mode, list the efivars directory:

# ls /sys/firmware/efi/efivars

If the command shows the directory without error, then the system is booted in UEFI mode. If the directory does not exist, the system may be booted in BIOS (or CSM) mode. If the system did not boot in the mode you desired, refer to your motherboard's manual.

Warning: The Archinstall tool requires you to be booted in UEFI mode for now.

Conetar à internet

To set up a network connection in the live environment, go through the following steps:

Note: In the installation image, systemd-networkd, systemd-resolved and iwd are preconfigured and enabled by default. That may not be the case for the installed system unless you choose to configure networking during the guided installation.

Executar o instalador

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Change the github-link to the GitLab once all the features are ported and synced over. (Discuss in User talk:Josephgbr/drafts/Archinstall)
Note: You are strongly encouraged to follow the manual Installation guide. It will teach you more than any scripted installation ever will. This guided installation is given as an option to new users who would like to try out Arch Linux but lower the barrier to entry. Issues and questions should be asked on the official repository over on github

During the guided installation, you will be prompted several questions. These questions or steps will be described in detail here. The examples below will install Arch Linux on one of two hard-drives. Running the installer in a safe and guided manner can be done by running the following command:

# archinstall

Selecionar o layout de teclado

The first step of the guided installation is to select a keyboard layout. This keyboard layout will be set both in the live medium as well as the installed system.

Select one of the above keyboard languages (by number or full name): us
Note: The presented list is not all available options. There is a search function in this step by entering a single ? and hitting enter. The search menu will appear for additional layouts.

Selecionar qual região de espelho deseja usar

Note: This step is optional, by skipping it you will keep the default Arch Linux mirror-list on the live medium.
Warning: This step uses case sensitive input when inputting by name instead of number.

This step allows you to specify which country's mirrors to use. Archinstall will fetch any active HTTPS mirror from the specified region and place only those mirrors in the mirrorlist for the live medium as well as the installed system.

Select one of the above regions to download packages from (by number or full name): New Zealand

Selecionar uma unidade

Note: No formatting will be performed in this step. Until you're presented with "Are you sure you want to continue?", It's safe to click around and try different inputs.

In this step you will be presented with a list of block devices. Select the drive you want to install Arch Linux to.

0: /dev/loop0 (('570.3M', '/run/archiso/bootmnt/arch/x86_64/airootfs.sfs', None))
1: /dev/sda (('250G', '/dev/sda', None))
2: /dev/sdb (('512G', '/dev/sdb', None))
Select one of the above disks (by number or full path): /dev/sda

Only if the selected drive contains existing partitions will you be warned about it and further actions is required. If this happens, you will need to select what to do with the drive and it's partitions and will be described in the next coming section. The three options will be presented as shown here:

BlockDevice(path=/dev/sda) contains the following partitions:
 Partition(path=/dev/sda1, fs=vfat)
 Partition(path=/dev/sda2, fs=ntfs) (Filesystem not supported)
 Partition(path=/dev/sda3, real_device=/dev/sda, fs=crypto_LUKS)

0: Abort the installation.
1: Format entire drive and setup a basic partition scheme.
2: Keep existing partition layout and select which ones to use where.
Found partitions on selected drive, (select by number) what you want to do: 2

Cancelar a instalação

This option simply aborts the installation and abandoned any queued changes.

Formatar toda a unidade

In this sub-option, you allow archinstall to use the entire drive and no other partitions will be spared. When this option is selected, the following sub-menu will appear where you will select the root partition file system format:

Select which filesystem your main partition should use (by number or name):
Note: This step also list all supported file systems. If you want archinstall to support more file systems, please submit a feature suggestion on the upstream Issue page

Manter o layout de partição existente

Note: Any /boot partition will be left untouched if it contains data for multi-boot purposes.

This option unlocked another sub-menu where you will be prompted to select which partitions to use. Any partitions selected will be formatted, and those not selected or modified will be left untouched. This enables a some what flexible way of allowing you to [Partition the disks] in your own way before running the installer, and then cherry pick which partitions to use in this installer. The options you will be presented with are:

** You will now select which partitions to use by selecting mount points (inside the installation). **
 ** The root would be a simple / and the boot partition /boot (as all paths are relative inside the installation). **

0: Partition(path=/dev/sda1, fs=vfat)
1: Partition(path=/dev/sda3, real_device=/dev/sda, fs=crypto_LUKS)
Select a partition by number that you want to set a mount-point for (leave blank when done): 0

When entering a partition, you will need to supply two things. First you will need to supply a mount-point for the partition and then which file-system to use.

Enter a mount-pint for Partition(path=/dev/sda1, fs=vfat): /boot
Enter a valid filesystem for Partition(path=/dev/sda1, fs=vfat) (leave blank for vfat):

In this example we mounted the first partition to /boot. And we will leave the default vfat file-system for the boot partition. Encrypted partitions have a required third hidden step. And that is to assign a inner file-system, inside the encrypted partition. If the partition file-system is left blank, the installer will try to auto-detect the inner file-system by mounting the encrypted drive with the disk encryption password specified. If not password is specified the installer will ask for one. If the auto-detection fails, you will be required to enter a supported file-system such as btrfs for the inner file-system.

Criptografia de disco

Next step is optional but recommended, and will allow you to select (or skip) a password for the luks2 root partition encryption.

Enter disk encryption password (leave blank for no encryption):
Note: The password is prompt-less, so you will not see any input while writing
Warning: The boot partitions is left un-encrypted. For more advanced options a manual installation following the wiki guidelines is required.

The disk encryption uses luks2 with argon2. The default options for luks2 are a key-size of 512, the default hash algorithm used is sha512 and the iter-time option is 10000 by default. If any of these default options are not sane, please report so to the upstream Github repository.

Hostname desejado

This step is optional, but might help identify your machine on the network later on. Setting a hostname will modify /etc/hostname on the installed machine.

Desired hostname for the installation:

The default will be Archinstall if left empty.

Senha do root

This next step is optional. By default the Arch Linux root account is disabled by the /etc/shadow entry for root being defined as root:*:. You are encouraged to not set a password and thus leaving this step empty and leaving root disabled.

Enter root password (Recommended: leave blank to leave root disabled):

Criar um superusuário

Note: This step only shows if root was left disabled.

In this sub-menu you are required to create a super user which is based on sudo. This step is here as an assurance that you are not left locked out of your machine post installation.

Create a required super-user with sudo privileges:

Usuários adicionais para a instalação

In this step, you can optionally create more users on the machine. When creating a user, you will get the opportunity to supply both a password and to set the user as a super-user or a regular user.

Enter a username to create a additional user (leave blank to skip & continue): test
Password for user test: 
And one more time for verification:
Should this user be a sudo (super) user (y/N): N
Note: This step will repeat until a blank entry is given to the first question

Escolher um perfil para a instalação

Machines can have many use cases. archinstall ships a number of pre-configured profiles that you can choose from. These profiles are intended to give a quick start to a working environment, but they will never be fully featured or considered advanced. Some examples of profiles include:

  • desktop
    A new-user friendly desktop environment. It will ask which desktop environment to use from the list below.
  • kde
    A minimal graphical environment based on the kde desktop environment (Will not install kde-applications).
  • gnome
    A minimal graphical environment based on the gnome desktop environment (Will not install gnome-extra).
  • webserver
    A basic web-server based on nginx.
  • docker
    A minimal Arch Linux machine with docker pre-installed.
  • database
    A minimal Arch Linux machine with postgresql installed and pre-configured.
Note: This step is fully optional, but might help new users get familiar with Arch Linux by using for instance a traditional desktop experience through a desktop profile.
Enter a pre-programmed profile name if you want to install one: awesome

There might be additional questions after selecting a profile. But only if the profile requires more user input. For any questions or documentation regarding the profiles sub-menus, please discuss those at the official archinstall Discord Server.

Pacotes adicionais

In this step, you can supply a list of (space separated) packages to install after the base-installation is complete. These packages will be queued and installed as soon as the base operating system is installed.

Write additional packages to install (space separated, leave blank to skip):
Note: AUR packages can not be supplied here. This step is intended for packages only.

Configuração de rede

The installer comes with a rudimentary network configuration step. It can copy the existing network configuration from the live installation medium or configure one specific interface.

0: Copy ISO network configuration to installation
1: enp0s2
2: eth0

Select one network interface to configure (leave blank to skip):
Warning: If you skip this step, there will be no network automatically configured in the installed system. You will need to configure networking manually in some way in order to get network access.

Copiar a configuração de rede da ISO

This option will copy any existing network configuration, if for instance you configured WiFi prior to running the installer as an example, then the WiFi configuration will be copied over.

Configuração específica da placa de rede

If you selected a interface to configure, then this sub-menu will be presented allowing you to choose between configuring DHCP for the interface or a static IP configuration.

0: DHCP (auto detect)
1: IP (static)
Select which mode to configure for enp0s2

If DHCP was selected, this step is done and Systemd-networkd will take care of the interface once the machine is rebooted. But selecting IP (static) forces you to enter a IP and subnet notation for the interface, as well as a gateway and DNS servers.

Enter the IP and subnet for interface (example: 192.168.0.5/24): 
Enter your gateway (router) IP address or leave blank for none:
Enter your DNS servers (space separated, blank for none):

Seleção de fuso horário

The last step is optional but lets you select a time-zone. To get a list of supported time-zones, run the command timedatectl list-timezones.

Note: This does not automatically enable NTP.
Warning: This step is case sensitive
Enter a valid timezone (Example: Europe/Stockholm): America/Chicago

Verificando a configuração

In the last and final step, you will be presented with the chosen configuration. Verify that everything looks correct, and once you're ready, press Enter to continue.

This is your chosen configuration:
{
    "!encryption-password": "******",
    "!root-password": "******",
    "filesystem": "btrfs",
    "harddrive": {
        "model": "QEMU_HARDDISK",
        "path": "/dev/sda",
        "size": "15G"
    },
    "hostname": "",
    "mirror-region": {
        "Sweden": {
            "https://archlinux.dynamict.se/$repo/os/$arch": true,
            "https://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch": true
        }
    },
    "nic": {
        "dhcp": false,
        "dns": [
            "8.8.8.8"
        ],
        "gateway": null,
        "ip": "192.168.0.5/24",
        "nic": "enp0s2"
    },
    "packages": [],
    "profile": null,
    "superusers": {
        "anton": {
            "!password": "******",
        }
    },
    "users": {}
}
Warning: Once you hit enter, a countdown will begin after which the installation will begin. You will have 5 seconds to abort before your selected partitions (or drive) will be wiped from all data.

Limitações

This installer is by no means a complete installation experience. The only way you will ever achieve a fully desirable installation experience is by manually installing all your needs. This installer is only meant to ease the barrier-to-entry for new users or quickly help set up machines for experienced users who can troubleshoot on their own.

Note: There's a difference between the guided installation and the library archinstall (github). The library does contain more features than shipped in the guided installer. Keep this in mind.

The main limitations of the guided archinstall installer are:

  • Relies on Systemd-boot as it's bootloader and not legacy-supporting alternatives like grub (yet, there's a ticket and WIP to support this).
  • Disk encryption parameters are not configurable outside of setting the password.
  • Lack certain accessibility features (color blindness for instance).
  • Current and new profiles are constantly under development.

Bugs e problemas

Any bugs and/or issues should be reported at the official upstream repository archinstall on Github. There's also a Discord Server for quicker communication and community support.

Note: Any logs under /var/log/archinstall should be appended to any support ticket. Verify that no sensitive information exists in the logs before posting!