233 lines
2.9 KiB
Markdown
233 lines
2.9 KiB
Markdown
|
# Arch install
|
||
|
|
||
|
## First steps
|
||
|
|
||
|
### Font in the console
|
||
|
|
||
|
~~~
|
||
|
setfont ter-128n
|
||
|
~~~
|
||
|
|
||
|
### Connecting to WiFi
|
||
|
|
||
|
~~~
|
||
|
iwctl
|
||
|
iwctl > device list
|
||
|
iwctl > station <device> scan
|
||
|
iwctl > station <device> get-networks
|
||
|
iwctl > station <device> connect <name_point>
|
||
|
~~~
|
||
|
|
||
|
### Time synchronization
|
||
|
|
||
|
~~~
|
||
|
timedatectl set-ntp true
|
||
|
timedatectl status
|
||
|
~~~
|
||
|
|
||
|
## Preparing the file system
|
||
|
|
||
|
~~~
|
||
|
fdisk /dev/sda
|
||
|
~~~
|
||
|
|
||
|
### Creating a partition table
|
||
|
|
||
|
~~~
|
||
|
GPT: fdisk > g
|
||
|
DOS: fdisk > o
|
||
|
~~~
|
||
|
|
||
|
### Section structure
|
||
|
|
||
|
~~~
|
||
|
UEFI:
|
||
|
/dev/sda1 - swap (6G)
|
||
|
/dev/sda2 - boot (512m)
|
||
|
/dev/sda3 - btrfs @,@home (all free)
|
||
|
~~~
|
||
|
|
||
|
### DOS:
|
||
|
|
||
|
~~~
|
||
|
/dev/sda1 - swap (6G)
|
||
|
/dev/sda2 - btrfs @,@home (all free)
|
||
|
~~~
|
||
|
|
||
|
### Creating sections
|
||
|
|
||
|
~~~
|
||
|
fdisk > n
|
||
|
~~~
|
||
|
|
||
|
### Specifying the types of sections
|
||
|
|
||
|
~~~
|
||
|
swap: fdisk > t > Linux swap
|
||
|
boot: fdisk > t > EFI
|
||
|
~~~
|
||
|
|
||
|
### Creating file systems (UEFI)
|
||
|
|
||
|
~~~
|
||
|
swap: mkswap /dev/sda1
|
||
|
boot: mkfs.vfat /dev/sda2
|
||
|
btffs: mkfs.btrfs -L "Arch" /dev/sda3
|
||
|
~~~
|
||
|
|
||
|
### Connect SWAP
|
||
|
|
||
|
~~~
|
||
|
swapon /dev/sda1
|
||
|
~~~
|
||
|
|
||
|
### Creating partitions BTRFS
|
||
|
|
||
|
~~~
|
||
|
mount /dev/sda3 /mnt
|
||
|
btrfs subvolume create /mnt/@
|
||
|
btrfs subvolume create /mnt/@home
|
||
|
mkdir /mnt/@/{boot,home}
|
||
|
umount -R /mnt
|
||
|
~~~
|
||
|
|
||
|
### Mounting partitions
|
||
|
|
||
|
~~~
|
||
|
mount -o subvol=/@,ssd,noatime,compress=lzo,space_cache=v2,discard=async /dev/sda3 /mnt
|
||
|
mount -o subvol=/@home,ssd,noatime,compress=lzo,space_cache=v2,discard=async /dev/sda3 /mnt/home
|
||
|
mount /dev/sda2 /mnt/boot
|
||
|
~~~
|
||
|
|
||
|
## Configere system
|
||
|
|
||
|
### Sorting mirrors for installing packages
|
||
|
|
||
|
~~~
|
||
|
reflector -c Russia -c Belarus -a 5 --sort rate --save /etc/pacman.d/mirrorlist
|
||
|
~~~
|
||
|
|
||
|
### Install base packages
|
||
|
|
||
|
~~~
|
||
|
pacstrap /mnt base linux linux-firmware base-devel btrf-progs dhcpcd iwd vim terminus-font
|
||
|
~~~
|
||
|
|
||
|
### Generating a partition mount file
|
||
|
|
||
|
~~~
|
||
|
genfstab -U /mnt >> /mnt/etc/fstab
|
||
|
~~~
|
||
|
|
||
|
### Change root dir
|
||
|
|
||
|
~~~
|
||
|
arch-chroot /mnt
|
||
|
~~~
|
||
|
|
||
|
### Change password
|
||
|
|
||
|
~~~
|
||
|
passwd
|
||
|
~~~
|
||
|
|
||
|
### Internet Activation
|
||
|
|
||
|
~~~
|
||
|
systemctl enable dhcpcd
|
||
|
systemctl enable iwd
|
||
|
~~~
|
||
|
|
||
|
### We set the time zone and synchronize the time
|
||
|
|
||
|
~~~
|
||
|
ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime
|
||
|
hwclock --systohc --utc
|
||
|
~~~
|
||
|
|
||
|
### Name host
|
||
|
|
||
|
~~~
|
||
|
echo arch > /etc/hostname
|
||
|
~~~
|
||
|
|
||
|
### Settings hosts
|
||
|
|
||
|
~~~
|
||
|
vim /etc/hosts
|
||
|
--
|
||
|
127.0.0.1 localhost
|
||
|
::1 localhost
|
||
|
127.0.1.1 arch.localdomain arch
|
||
|
~~~
|
||
|
|
||
|
### Generating locales
|
||
|
|
||
|
~~~
|
||
|
vim /etc/locale.gen
|
||
|
locale-gen
|
||
|
~~~
|
||
|
|
||
|
### Install locale
|
||
|
|
||
|
~~~
|
||
|
vim /etc/locale.conf
|
||
|
-->
|
||
|
LANG=en_US.UTF-8
|
||
|
LANGUGE=en_US
|
||
|
LC_ALL=C
|
||
|
LC_COLLATE=C
|
||
|
~~~
|
||
|
|
||
|
### Settings console
|
||
|
|
||
|
~~~
|
||
|
vim /etc/vconsole.conf
|
||
|
-->
|
||
|
KEYMAP=us
|
||
|
FONT=ter-128n
|
||
|
~~~
|
||
|
|
||
|
#### BTRFS
|
||
|
|
||
|
~~~
|
||
|
vim /etc/mkinitcpio.conf
|
||
|
-->
|
||
|
MODULES=(btrfs)
|
||
|
~~~
|
||
|
|
||
|
### Editing hooks
|
||
|
|
||
|
~~~
|
||
|
vim /etc/mkinitcpio.conf
|
||
|
-->
|
||
|
HUKS=(...keymap)
|
||
|
~~~
|
||
|
|
||
|
### Creating the initial environment
|
||
|
|
||
|
~~~
|
||
|
mkinitcpio -P
|
||
|
~~~
|
||
|
|
||
|
### Installing the loader
|
||
|
|
||
|
~~~
|
||
|
pacman -S grub
|
||
|
grub-install /dev/sda
|
||
|
|
||
|
-- Если UEFI:
|
||
|
pacman -S efibootmgr
|
||
|
grub-install --efi-directory=/boot
|
||
|
|
||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||
|
~~~
|
||
|
|
||
|
## Completion
|
||
|
|
||
|
~~~
|
||
|
exit
|
||
|
umount -R /mnt
|
||
|
reboot
|
||
|
~~~
|