Install Arch Linux - andyceo/documentation GitHub Wiki
Актуальная версия: archlinux-2023.02.01 Оборудование: Dell XPS 13 9360
-
Скачать установочный образ и записать его на флешку:
dd bs=4M if=archlinux-2023.02.01-x86_64.iso of=/dev/sdc conv=fsync oflag=direct status=progress -
Загрузиться с флешки и выбрать пункт меню "Arch Linux install medium"
-
Перейти к установке
-
Keymap:
localctl list-keymaps loadkeys ru -
Internet connection:
ip link iwctl device list station <DEVICE> scan station <DEVICE> get-networks station <DEVICE> connect <SSID> # iwctl --passphrase passphrase station <DEVICE> connect <SSID> ping ya.ru -c 2 -
NTP:
timedatectl set-ntp true -
Partitioning and formatting:
# create also fat32 uefi partition if not exist fdisk /dev/sda pvcreate vgcreate lvcreate mkfs.btrfs /dev/mapper/<NAME> -
Create btrfs subvolumes and mount them:
mount /dev/mapper/<NAME> /mnt btrfs su cr /mnt/@ btrfs su cr /mnt/@home btrfs su cr /mnt/@var btrfs su cr /mnt/@opt btrfs su cr /mnt/@tmp btrfs su cr /mnt/@.snapshots umount /mnt # Mount root filesystem (subvolume @) mount -o commit=120,compress=zstd:15,space_cache=v2,subvol=@ /dev/mapper/<NAME> /mnt # You need to manually create folder to mount the other subvolumes at mkdir /mnt/{boot,home,var,opt,tmp,.snapshots} mount -o commit=120,compress=zstd:15,space_cache=v2,subvol=@home /dev/mapper/<NAME> /mnt/home mount -o commit=120,compress=zstd:15,space_cache=v2,subvol=@var /dev/mapper/<NAME> /mnt/var mount -o commit=120,compress=zstd:15,space_cache=v2,subvol=@opt /dev/mapper/<NAME> /mnt/opt mount -o commit=120,compress=zstd:15,space_cache=v2,subvol=@tmp /dev/mapper/<NAME> /mnt/tmp mount -o commit=120,compress=zstd:15,space_cache=v2,[email protected] /dev/mapper/<NAME> /mnt/.snapshots mount /dev/sda1 /mnt/boot -
Installing first packages:
pacstrap /mnt base linux linux-firmware nano intel-ucode btrfs-progs -
fstab:
genfstab -U /mnt >> /mnt/etc/fstab -
Chroot:
arch-chroot /mnt -
Timezone:
# ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime ln -sf /usr/share/zoneinfo/<Region>/<City> /etc/localtime hwclock --systohc -
Locale:
nano /etc/locale.gen locale-gen echo LANG=en_US.UTF-8 >> /etc/locale.conf -
Keymap (only if set a key map):
echo KEYMAP=[keymap] >> /etc/vconsole.conf -
Hostname:
echo archaeon >> /etc/hostname -
Hosts:
nano /etc/hostsContent:
127.0.0.1 localhost ::1 localhost 127.0.1.1 archaeon.localdomain archaeon
-
Password for root:
passwd -
Install remain packages:
pacman -S lvm2 grub grub-btrfs efibootmgr base-devel linux-headers networkmanager network-manager-applet wpa_supplicant dialog os-prober mtools dosfstools reflector git bluez bluez-utils xdg-utils xdg-user-dirs htop mc bash-completion tor -
Adding btrfs module and LVM hook to mkinitcpio.conf and regenerate linux kernel:
nano /etc/mkinitcpio.conf # modules - btrfs, hooks - lvm2 mkinitcpio -p linux -
Grub:
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Arch Linux" grub-mkconfig -o /boot/grub/grub.cfg -
Create regular user:
useradd -mG wheel andyceo passwd andyceo EDITOR=nano visudo # Uncomment the line which says %wheel ALL=(ALL:ALL) ALL -
Enable services:
systemctl enable NetworkManager systemctl enable bluetooth systemctl enable tor -
Reboot to Arch Linux:
exit umount -l /mnt reboot
-
Подключиться к WiFi:
nmtui -
Установить Gnome:
pacman -S gnome -
Включить/запустить сервис Гнома:
systemctl enable/start gdm -
Установить приложения:
pacman -S firefox vlc gparted smartmontools -
Поправить настройку
faillock:/etc/security/faillock.conf:deny = 5, иначе слишком часто блокирует логин пользователя иsudo
- Аппаратные: на ноутбуке Dell XPS 13 9360 BIOS не увидит UEFI-загрузчик, установленный Arch. Надо создать файл
boot/bootx64.efiчтобы BIOS увидел жесткий диск как диск, с которого можно загрузить UEFI-систему - Настроить Gnome (см. Gnome)
-
загрузиться с флешки
-
интернет:
iwctl --passphrase passphrase station <DEVICE> connect <SSID> -
подмонтировать корневую файловую систему в
/mntи все что необходимо (см./etc/fstab):mount -o commit=120,compress=zstd:15,space_cache=v2,subvol=@ /dev/mapper/<NAME> /mnt # примонтировать /boot -
сделать подмонтированную файловую систему основной:
arch-chroot /mnt -
заняться восстановлением:
# обновить и переустановить пакеты что изменились pacman -Syu # обновить и переустановить ядро linux (обязательно!) pacman -Syu linux # внимательно смотреть на ошибки, которые выдает pacman! # если используется btrfs, то при исчерпании места файлы при обновлении могут быть нулевой длины!
- https://www.nishantnadkarni.tech/posts/arch_installation/#step-3-setting-keymap-optional
- https://www.youtube.com/watch?v=Xynotc9BKe8
- https://wiki.archlinux.org/title/Installation_guide
- https://wiki.archlinux.org/title/GRUB
- https://wiki.archlinux.org/title/Dell_XPS_13_(9360)#top-page
- https://askubuntu.com/questions/731931/uefi-not-finding-a-bootable-system-on-xps13