User:RafaelFF/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.
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
- 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
- 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.
- 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. - 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.
Conetar à internet
To set up a network connection in the live environment, go through the following steps:
- Ensure your network interface is listed and enabled, for example with ip-link(8):
# ip link
- For wireless, make sure the wireless card is not blocked with rfkill.
- Connect to the network:
- Ethernet—plug in the cable.
- Wi-Fi—authenticate to the wireless network using iwctl.
- Configure your network connection:
- DHCP: dynamic IP address and DNS server assignment (provided by systemd-networkd and systemd-resolved) should work out of the box for wired and wireless network interfaces.
- Static IP address: follow Network configuration#Static IP address.
- The connection may be verified with ping:
# ping archlinux.org
Executar o instalador
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
?
and hitting enter. The search menu will appear for additional layouts.Selecionar qual região de espelho deseja usar
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
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):
Manter o layout de partição existente
/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):
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
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
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.
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):
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):
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
.
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": {} }
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.
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.
/var/log/archinstall
should be appended to any support ticket. Verify that no sensitive information exists in the logs before posting!