Установка и первичная настройка дистрибутива Arch Linux: различия между версиями

м Добавлена секция для TPM2 разблокировки
Удалена ошибочная строка в настройках загрузочных записей
 
(не показано 6 промежуточных версий этого же участника)
Строка 147: Строка 147:
=== TPM2 разблокировка ===
=== TPM2 разблокировка ===


<pre>$ sudo systemd-cryptenroll /dev/gpt-auto-root-luks --recovery-key
<pre>sudo systemd-cryptenroll /dev/gpt-auto-root-luks --recovery-key
Keep this key safe. Keep it hidden. Moving on, we'll now enroll our system firmware and Secure Boot state. Normally, this would allow our TPM to unlock our encrypted drive, as long as the state hasn't changed. If you're particularly paranoid, you can add --tpm2-with-pin=yes, so we get prompted for a PIN code on boot.
sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+7  /dev/gpt-auto-root-luks --tpm2-with-pin=yes</pre>


$ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+7  /dev/gpt-auto-root-luks
Если Swap раздел не был разблокирован на этапе загрузки, то необходимо это сделать сейчас:
Now we need to reboot and test this. If all goes well, we should be able to unlock our encrypted root partition with just a PIN code.</pre>


=== Завершения настройки базовой системы ===
sudo cryptsetup luksOpen /dev/nvme0n1p2 swap
 
Добавим ключ для Swap раздела в TPM2.
 
sudo systemd-cryptenroll --tpm2-device auto /dev/disk/by-designator/swap-luks
 
=== Завершение настройки базовой системы ===
Trizen менеджер пакетов для AUR: облегченная оболочка pacman и помощник AUR.
Trizen менеджер пакетов для AUR: облегченная оболочка pacman и помощник AUR.
  cd /tmp
  cd /tmp
Строка 163: Строка 168:


=== Установка требуемых пакетов и приложений ===
=== Установка требуемых пакетов и приложений ===
  pacman -S alacritty nextcloud-client android-tools android-udev filezilla gimp godot gvfs inkscape keepassxc libreoffice-fresh lib32-ncurses libreoffice-fresh-ru libva-utils mesa-demos mpv noto-fonts noto-fonts-cjk noto-fonts-emoji qbittorrent steam telegram-desktop tesseract tesseract-data-eng tesseract-data-rus blender code vlc
  pacman -S alacritty android-tools android-udev blender code filezilla gimp godot gvfs inkscape keepassxc lib32-ncurses libreoffice-fresh libreoffice-fresh-ru libva-utils mesa-demos mpv nextcloud-client noto-fonts noto-fonts-cjk noto-fonts-emoji qbittorrent steam telegram-desktop tesseract tesseract-data-eng tesseract-data-rus vlc
  trizen -S --noedit google-chrome-dev android-studio anydesk-bin webcord gtk2-patched-filechooser-icon-view assistant
  trizen -S --noedit android-studio anydesk-bin assistant google-chrome-dev gtk2-patched-filechooser-icon-view webcord


==== KDE ====
==== KDE ====
  pacman -S plasma dolphin ark audiocd-kio dolphin-plugins kio-admin kompare ffmpegthumbs icoutils kdegraphics-thumbnailers kimageformats resvg filelight kdf
  pacman -S ark audiocd-kio dolphin dolphin-plugins ffmpegthumbs filelight icoutils kdegraphics-thumbnailers kdf kimageformats kio-admin kompare plasma resvg
  systemd enable plasmalogin.service
  systemd enable plasmalogin.service


Строка 174: Строка 179:
==== Sway (устарело, требуется обновление части) ====
==== Sway (устарело, требуется обновление части) ====
  sudo pacman -S gdm sway
  sudo pacman -S gdm sway
  trizen -S libdisplay-info-git waybar rofi-lbonn-wayland-git xdg-desktop-portal-wlr slurp --noedit
  trizen -S libdisplay-info-git rofi-lbonn-wayland-git slurp waybar xdg-desktop-portal-wlr --noedit
  sudo systemctl enable --now gdm
  sudo systemctl enable --now gdm


Строка 180: Строка 185:
Тут необходимо решить проблему с тем, что русскоязычные папки уже могут быть созданы.
Тут необходимо решить проблему с тем, что русскоязычные папки уже могут быть созданы.


  mkdir -pv /home/$USER/{Desktop,Databases,Downloads,Documents,Pictures,Public,Sounds,Templates,VPNs,Work/Builds/ArchLinux}
  mkdir -pv /home/$USER/{Desktop,Databases,Downloads,Documents,Pictures,Public,Sounds,Templates,VPNs}
  mkdir -v /home/$USER/{Music,Videos} # Для нетбука или ноутбука
  mkdir -v /home/$USER/{Music,Videos,Work/Builds/ArchLinux} # Для устройства с одним накопителем
  ln -s ~/.local/share/Steam ~/Steam
  ln -s ~/.local/share/Steam ~/Steam
Если основной накопитель имеет малый размер и имеется возможность установки второго, то последний можно монтировать через <code>/etc/fstab</code> и создать симлинки на основной папки.
ln -s /mnt/storage/Music/ ~/Music
ln -s /mnt/storage/Videos/ ~/Videos
ln -s /mnt/storage/Work/ ~/Work


=== Импортирование конфигурации ===
=== Импортирование конфигурации ===
Строка 217: Строка 228:
=== Устаревшая секция ===
=== Устаревшая секция ===


  sudo pacman -S android-tools android-udev baobab chromium filezilla gimp gnu-netcat gvfs inkscape keepassxc libreoffice-fresh lib32-ncurses libreoffice-fresh-ru libva-utils minetest mesa-demos mpv neofetch nextcloud-client nomacs noto-fonts noto-fonts-cjk noto-fonts-emoji pavucontrol pcmanfm-qt pipewire-jack qbittorrent qt5-translations qt6-translations qutebrowser steam steam-native-runtime telegram-desktop tesseract tesseract-data-eng tesseract-data-rus ttf-liberation winetricks wine-gecko wine-mono
  sudo pacman -S android-tools android-udev baobab chromium filezilla gimp gnu-netcat gvfs inkscape keepassxc lib32-ncurses libreoffice-fresh libreoffice-fresh-ru libva-utils mesa-demos minetest mpv neofetch nextcloud-client nomacs noto-fonts noto-fonts-cjk noto-fonts-emoji pavucontrol pcmanfm-qt pipewire-jack qbittorrent qt5-translations qt6-translations qutebrowser steam steam-native-runtime telegram-desktop tesseract tesseract-data-eng tesseract-data-rus ttf-liberation wine-gecko wine-mono winetricks
Для компьютера на базе графического процессора от Intel: <code>sudo pacman -S intel-media-driver powertop xf86-video-intel</code>
Для компьютера на базе графического процессора от Intel: <code>sudo pacman -S intel-media-driver powertop xf86-video-intel</code>


Для компьютера на базе графического процессора от AMD: <code>sudo pacman -S vulkan-radeon lib32-vulkan-radeon libva-mesa-driver xf86-video-amdgpu</code>
Для компьютера на базе графического процессора от AMD: <code>sudo pacman -S lib32-vulkan-radeon libva-mesa-driver vulkan-radeon xf86-video-amdgpu</code>


Перечень Vulkan драйверов: <nowiki>https://wiki.archlinux.org/title/Vulkan</nowiki>
Перечень Vulkan драйверов: <nowiki>https://wiki.archlinux.org/title/Vulkan</nowiki>
Строка 226: Строка 237:
Для настройки тачпада ноутбука: <code>xorg-xinput</code>
Для настройки тачпада ноутбука: <code>xorg-xinput</code>


  trizen -S android-studio anydesk-bin chromexup webcord evhz-git godot lib32-gconf undistract-me-git --noedit
  trizen -S android-studio anydesk-bin chromexup evhz-git godot lib32-gconf undistract-me-git webcord --noedit
  echo -e "source /usr/share/undistract-me/long-running.bash\nnotify_when_long_running_commands_finish_install" >> ~\.bashrc
  echo -e "source /usr/share/undistract-me/long-running.bash\nnotify_when_long_running_commands_finish_install" >> ~\.bashrc


Строка 233: Строка 244:
=== Основные программы ===
=== Основные программы ===
  sudo pacman -Suy certbot-nginx composer cups ffmpeg gitea libreoffice-fresh mediawiki nextcloud nginx php-fpm php-gd php-imagick php-intl php-sodium qbittorrent-nox sane vlc vsftpd youtube-dl
  sudo pacman -Suy certbot-nginx composer cups ffmpeg gitea libreoffice-fresh mediawiki nextcloud nginx php-fpm php-gd php-imagick php-intl php-sodium qbittorrent-nox sane vlc vsftpd youtube-dl
  trizen -S gerbera samsung-unified-driver steamcmd minetest-git --noedit
  trizen -S gerbera minetest-git samsung-unified-driver steamcmd --noedit


=== Настройка принтера ===
=== Настройка принтера ===
Строка 273: Строка 284:
  ls -l /dev/disk/by-partuuid/ | grep 'sd[a-z][1-3]'
  ls -l /dev/disk/by-partuuid/ | grep 'sd[a-z][1-3]'
  echo -e 'title\t\tArch Linux Kernel\nlinux\t\t/vmlinuz-linux\ninitrd\t\t/intel-ucode.img\ninitrd\t\t/initramfs-linux.img\noptions\t\troot=PARTUUID=55d7a752-7da7-4a8f-aae7-a90b63614d83 rw resume=PARTUUID=4af468e0-0c92-4dab-9a21-738fd95875d3' >> /boot/loader/entries/arch.conf
  echo -e 'title\t\tArch Linux Kernel\nlinux\t\t/vmlinuz-linux\ninitrd\t\t/intel-ucode.img\ninitrd\t\t/initramfs-linux.img\noptions\t\troot=PARTUUID=55d7a752-7da7-4a8f-aae7-a90b63614d83 rw resume=PARTUUID=4af468e0-0c92-4dab-9a21-738fd95875d3' >> /boot/loader/entries/arch.conf
sed -i "s/#timeout 3/timeout 3/" /etc/sudoers
  sudo sed  -i '1i default @saved' /boot/loader/loader.conf # systemd-boot будет запоминать последнюю выбранную загрузочную запись
  sudo sed  -i '1i default @saved' /boot/loader/loader.conf # systemd-boot будет запоминать последнюю выбранную загрузочную запись


Строка 280: Строка 290:
  exit
  exit
  reboot
  reboot


===  Настройка fstab  ===
===  Настройка fstab  ===