Установка арч линукс uefi

Содержание
  1. Arch linux UEFI установка
  2. Подготовка
  3. 1. Разбиваем хард на разделы:
  4. 2. Создаем Файловые системы на созданных разделах
  5. 3. Монтируем Файловые системы
  6. 4. Поднимаем сеть WiFi
  7. 5. Разворачиваем систему из репозитория
  8. 6. Делаем снимок точек монтирования в файл fstab
  9. 7. Устанавливаем UEFI менеджер загрузки
  10. 8. Создадим загрузочную запись для UEFI менеджера загрузки
  11. 9. Завершение установки
  12. Как установить Arch с минимальной болью?
  13. Предисловие
  14. Итак, начнём с простого.
  15. Установка
  16. Начинаем с запуска
  17. Проверим соединение с интернетом:
  18. Разделы диска
  19. Установка
  20. Создадим fstab файл
  21. Настраиваем установленную систему
  22. Chroot
  23. Настройка файла локали
  24. Настраиваем временную зону
  25. Задаём время
  26. Имя хоста и адрес
  27. Сетевой менеджер
  28. Установка GRUB
  29. Перезагрузка
  30. Добавим пользователя и окружение
  31. Arch Linux Installation and Configuration on UEFI Machines
  32. Requirements
  33. Step 1: Create a Disk Partitions Layout
  34. Step 2: Install Arch Linux
  35. Step 3: Arch Linux System Configuration
  36. If You Appreciate What We Do Here On TecMint, You Should Consider:

Arch linux UEFI установка

Самый простой вариант установки Arch Linux рассчитанный на загрузку из под UEFI

Машина:
CPU Intel i5
VGA Nvidia GTX 660M
RAM 8Gb
HDD 750Gb
Сеть WiFi

Подготовка

  1. Качаем дистр Arch linux Yandex mirror
  2. Заливаем на флешку:
  3. Загружаем машину с флешки и по шагам:

1. Разбиваем хард на разделы:

На выходе необходимо получить примерно следующую структуру с указанными типами Ф.С.:

Порядок Описание Раздел Размер Тип
1 ESP /dev/sda1 1Gib EFI System
2 / /dev/sda2 340GiB Linux Filesystem
3 /home /dev/sda3 340GiB Linux Filesystem
4 SWAP /dev/sda4 16GiB Linux Swap

Примечание: Раздел UEFISYS может быть любого размера, который поддерживается файловой системой FAT32. В соответствии с документацией пресловутой Microsoft, минимальный размер раздела с FAT32 — 512Мб. В соответствии с вышесказанным рекомендуется устанавливать размер UEFISYS раздела больше 512Мб. Мы сделаем его размером в 1Gb Подробнее здесь: ArchWiki UEFI (Русский)

2. Создаем Файловые системы на созданных разделах

UEFI раздел FAT32:

Корневой раздел EXT4:

Домашний раздел EXT4:

Раздел подкачки: создаем его :

3. Монтируем Файловые системы

Примечание: Мы будем развертывать новую систему в директории /mnt

Монтируем корневой раздел в /mnt

Создаем директорию /boot и /home для загрузчика и домашнего раздела:

Монтируем UEFI раздел

Монтируем домашний раздел

Монтируем раздел подкачки :

Все вышеописанное можно сделать используя метки которые мы задали при создании файловых систем:

4. Поднимаем сеть WiFi

Выбираем свою точку доступа и подрубаемся к ней может быть например таким wlp0s21f0u7i2:

Если сети нет, то выясняем имя беспроводного интерфейса:

И поднимаем его принудительно:

5. Разворачиваем систему из репозитория

  1. В файле /etc/pacman.d/mirrorlist перемещаем адреса российский серверов в самый верх. Ну, или можно сделать как здесь: ArchWiki Mirrors (Русский)
  2. Выполняем скрипт инициализации системы, указав ему :
  3. Для поддержки беспроводной сети на мой взгляд лучше использовать NetworkManager ArchWiki NetworkManager (Русский) т.к он прост в обращении и под него реально найти апплеты для гуевого рабочего стола. Итак укажем установщику дополнительно установить пакеты: networkmanager, dialog, wpa_supplicant:

6. Делаем снимок точек монтирования в файл fstab

«Запечем» правила монтирования файловых систем в файл:

Далее переходим в оболочку новой системы:

И обновляем данные пакетного менеджера и установленные утилиты:

7. Устанавливаем UEFI менеджер загрузки

Установим systemd-boot — UEFI менеджер загрузки при помощи утилиты bootctl:

8. Создадим загрузочную запись для UEFI менеджера загрузки

Необходимо поправить файл загрузчика: /boot/loader/loader.conf что бы он принял следующий вид:

где timeout 4 это время задержки, а default arch указывает загрузить систему основываясь на записи в файле /boot/loader/entries/arch.conf. Его содержание:

Кстати этот файл в арче копируется с шаблона:

После можно проверить что наша запись с ArchLinux появилась:

Необходимо так же на случай обновления systemd разместить следующий pacman hook в каталоге /etc/pacman.d/hooks/:

Подробнее про описанное выше здесь: ArchWiki systemd-boot (Русский)

9. Завершение установки

Теперь можно задать пароль для рута

создать дополнительных пользователей и пр.

После этого выходим из окружения и перезагружаем систему

Вытаскиваем флешку, меняем устройство загрузки и грузим новую систему.

Источник

Как установить Arch с минимальной болью?

Предисловие

Слышал, что некоторые считают Arch сложным в установке. Отчасти они правы, но для любого человека, который способен разобраться в установке и настройке linux, установка Arch довольно проста. Также это самый гибкий дистрибутив, поэтому настроить под себя его получится лучше других дистрибутивов.

Данный гайд является сборной солянкой из всех гайдов, что я прочитал (как русскоязычные, так и иноязычные). Его цель просто и без лишней технической информации показать пошаговую установку Arch и сделать это на русском языке. Главное, что статья написана от непонимающего для непонимающих. Заранее скажу, что некоторые скрины будут уже с установленного Arch, но это никак не меняет работу команд и то, что вы увидите при их использование.

Итак, начнём с простого.

Идём на сайт и качаём ISO-файл:

Там ищем зеркало(скорее всего русское) и скачиваем образ:

Для упрощения дальнейшей жизни лучше скачать Etcher, прямо на сайте есть довольно понятная инструкция в картинках, так что справятся все.

Установка

// начну с настройки VirtualBox, если вы используете её, то выполните следующие действия

1.Идём в настройки машины:

2.Во вкладке система ставим галочку около пункта »Включить EFI»:

3.Далее идём во вкладку носители, там добавляем контроллер IDE и выбираем наш дистрибутив

Далее установка будет для всех одинакова.

Начинаем с запуска

Выбираем первую строку и жмём Enter

Проверим соединение с интернетом:

Это нужно, потому что Arch требует интернет для своей установки.

Такой командой можно проверить своё соединение и увидеть время ответа сайта.

Если вы используете wifi на своём ПК, то используйте утилиту :

Вы увидите примерно это:

Разделы диска

Для того, чтоб разбить наш диск на разделы, можно сначала узнать какие диски подключены. Скорее всего у вас будет USB флешка и HDD\SSD вашего ПК.

Команда для просмотра разделов (понадобится нам ещё много раз):

Если у вас несколько дисков, а вы хотите установить на какой-то конкретный, то можно посмотреть диски по размерам.

Время размечать наш диск. Используем команду cfdisk для этого и выбираем gpt формат :

Bажно! если во время использования команды lsblk и fdisk вы увидели что sda является не тем диском, что нужен вам, то вы дописываете в конец название другого диска, например sdb.

Используя стрелочки создаём 3 раздела на диске:

  • /dev/sda1 # размером 1G места под UEFI
  • /dev/sda2 # размером примерно 10-15 GB под root
  • /dev/sda3 # всё оставшееся место под директорию home

PS: Если вы решили переделать разметку диска, то через эту утилиту можно и удалять разделы

Для проверки используем lsblk снова. Если всё норм, что /dev/sda будет содежать в себе 3 раздела.

Далее форматируем наши разделы.

Форматируем тот раздел, который мы выделили под UEFi

Монтируем root и создаём папку home:

И снова lsblk для проверки

Установка

Начинается самая долгая часть, потому что нужно будет много скачать. Устанавливаем все основные пакеты, а также nano, чтоб редачить файлы системы. Если вдруг вы знакомы с vim можете скачать и его (дописать в конец).

Вам предложат что установить выбирайте all и далее yes. Встречался с проблемой, что можно было скачать первый или второй вариант, можно просто выполнить команду дважды выбирая вначале один пакет, а затем второй.

Создадим fstab файл

Настраиваем установленную систему

Chroot

Chroot (change root) нужен нам, чтобы мы могли сменить root пользователя (как и сказано в названии команды).

Настройка файла локали

Для начала идём в файл локали, чтоб настроить язык

Находим там #en_US.UTF-8 и стираем #, с русским языком так же. PS: можно использовать Ctrl + W для поиска языка в файле.

Чтобы всё сохранить Ctrl + O, затем Enter и Ctrl + X, затем Enter

Далее пишем команды, которые сгенерируют локаль и создаём locale.conf с нужными настройками языка.

Настраиваем временную зону

Далее жмём 2 раза на Tab и видим список регионов, после городов.

В моём случае было так:

Задаём время

Тут 2 команды. Одна ставит время для системы, а другая его показывает.

Имя хоста и адрес

Я решил назвать ПК ArchMe, поэтому используем следующую команду:

Далее идём в файл localhosts и записываем ip. Если у вас ip статический, используйте свой.

Сетевой менеджер

Качаем и включаем.

Установка GRUB

Для начала сменим пароль root пользователя :

GRUB — это загрузчик, который нужен, чтоб запускать нашу установленную систему (в режиме EFI). Далее будет куча команд, которые нужно выполнить.

Перезагрузка

Чтобы без потерь перезагрузить нашу систему используем эти команды:

После перезагрузки вы увидите следующее. Если это так, то наш GRUB установился правильно

Входим в root аккаунт и создаём swapfile (что-то вроде доп оперативки) и задаём ему размер как у вашей ОЗУ

Далее выполняем следующие команды:

И проверяем, работает ли swap:

Добавим пользователя и окружение

username замените на то имя, что хотите вы)

Также нужно дать ему права суперюзера:

там ищем и убираем #, а дальше Ctrl + O, затем Enter и Ctrl + X, затем Enter

Дрова

Вам будет предложен выбор, выбирайте исходя из своей графики.

Окружение

Вначале покажу как поставить довольно простое — XFCE

И моё любимое i3, там выбираем пакеты 2 4 5. Возможно вы увидите квадраты вместо символов, но это нормально, вам просто нужно будет скачать шрифт dejavu ( pacman -S ttf-dejavu ). Cписок горячих клавиш можно посмотреть тут

Если вы решите поменять своё окружение, то нужно будет менять запись в файле xinitrc.

Источник

Arch Linux Installation and Configuration on UEFI Machines

Arch Linux is one of the most versatile GNU Linux distribution due to its simplicity and cutting edge software packages due to its Rolling Release model, Arch Linux is not addressed for beginners in Linux world. It also provides a complicated command-line installer, with no Graphical Interface support. The command-line installation model makes the job of installing the system very flexible but also very difficult for Linux beginners.

On top of all, Arch Linux provides its own software packages repositories via Pacman Package Manager. Arch Linux also provides a Multiarch environment for different CPU Architectures, such as 32bit, 64bit, and ARM.

The software packages, dependencies, and security patches are mostly updated on a regular basis, making Arch Linux a cutting-edge distribution with a few solid tested packages for a production environment.

Arch Linux also maintains the AUR – Arch User Repository, which is a huge community-driven software repositories mirror. AUR repo mirrors allow users to compile software from sources and install it via Pacman and Yaourt (Yet Another User Repository Tool) package managers.

This tutorial presents a step by step basic Arch Linux installation process through a CD/USB bootable image on UEFI based machines. For other customizations or details visit the Official Arch Linux Wiki page at https://wiki.archlinux.org.

Requirements

Step 1: Create a Disk Partitions Layout

1. First of all, go do the Arch Linux download page and grab the latest CD image (i.e. current stable version: 2020.05.01), create a bootable CD/USB then plug it into your system CD/USB drive.

2. IMPORTANT STEP! Also, make sure your system has an Ethernet plugged in cable with internet connectivity and also an active DHCP server enabled.

3. After the CD/USB boots up you will be presented with first Arch Linux Installer options. Here, select Arch Linux archiso x86_64 UEFI CD and press Enter key to continue.

Arch Linux Boot Menu Booting Arch Linux

4. After the installer decompresses and loads the Linux Kernel you will be automatically thrown to an Arch Linux Bash terminal (TTY) with root privileges.

A good step now is to list your machine NICs and verify internet network connection by issuing the following commands.

Check Arch Linux Network

In case you don’t have a DHCP server configured at your premises to dynamically allocate IP addresses to clients, issue the below commands to manually configure an IP address for Arch Live media.

Replace the network interface and IP addresses accordingly.

Configure IP Address on Arch Linux

On this step, you can also list your machine hard disk by issuing the following commands.

Check Arch Linux Disk

In case your machine is a virtual based machine, the hard disks can have other names than sdx, such as xvda, vda, etc. Issue the below command to list virtual disk if you’re unaware of the disk naming scheme.

Check Virtual Disks

Important to note is that the name convention for Raspberry PI drive storage usually is /dev/mmcblk0 and for some types of hardware RAID cards can be /dev/cciss.

5. On the next step, we’ll start to configure the Hard Disk partitions. For this stage you can run cfdisk, cgdisk, parted or gdisk utilities to perform a disk partition layout for a GPT disk. I strongly recommend using cfdisk for its wizard-driven and simplicity in use.

For a basic partition, the layout table uses the following structure.

  • EFI System partition ( /dev/sda1 ) with 300M size, FAT32 formatted.
  • Swap partition ( /dev/sda2 ) with 2xRAM recommended size, Swap On.
  • Root partition ( /dev/sda3 ) with at least 20G size or rest of HDD space, ext4 formatted.

Now let’s actually start creating disk layout partition table by running cfdisk command against machine hard drive, select GPT label type, then select Free Space then hit on New from the bottom menu, as illustrated in the below screenshots.

Select Arch Linux Label Type Select Arch Linux Installation Disk

6. Type the partition size in MB (300M) and press enter key, select Type from the bottom menu and choose EFI System partition type, as shown in the following screenshots.

EFI System Size EFI System Type Select EFI System

You’ve finished configuring the EFI System partition.

7. Next, let’s create the Swap partition using the same procedure. Use down arrow key and select again the remaining Free Space and repeat the steps above: New -> partition size 2xRAM size recommended (you can safely use 1G) -> Type Linux swap.

Use the below screenshots as a guide to creating the swap partition.

Create Swap Partition Set Swap Partition Size Select Partition Type Select Swap Partition

8. Finally, for /(root) partition use the following configuration: New -> Size: rest of free space -> Type Linux filesystem.

After you review Partition Table select Write, answer with yes in order to apply disk changes and then, type quit to exit cfdisk utility, as shown in the below images.

Create Root Partition Set Root Partition Size Select Type for Root Partition Select Linux Filesystem Partition Table Summary Confirm Partition Changes Quit Disk Management Console

9. For now, your partition table has been written to HDD GPT but no file system was yet created on top of it. You can also review the partition table summary by running fdisk command.

10. Now, it’s time to format the partitions with the required file systems. Issue the following commands to create a FAT32 file system for EFI System partition (/dev/sda), to create the EXT4 file system for the root partition (/dev/sda3) and create the swap partition for /dev/sda2.

Create Arch Linux Filesystem

Step 2: Install Arch Linux

11. In order to install Arch Linux, the /(root) partition must be mounted to /mnt directory mount point in order to be accessible. Also, the swap partition needs to be initialized. Issue the below commands to configure this step.

Mount Root Partition

12. After the partitions had been made accessible, is time to perform Arch Linux system installation. To increase installation packages download speed you can edit /etc/pacman.d/mirrorlist file and select the closest mirror website (usually choose your country server location) on top of the mirror file list.

You can also enable Arch Multilib support for the live system by uncommenting the following lines from /etc/pacman.conf file.

Enable Arch Multilib

13. Next, start installing Arch Linux by issuing the following command.

Install Arch Linux Arch Linux Installer in Progress

Depending on your system resources and internet speed the installer can take from 5 to 20 min to complete.

14. After the installation completes, generate fstab file for your new Arch Linux system by issuing the following command.

Subsequently, inspect fstab file content by running the below command.

Generate fstab File

Step 3: Arch Linux System Configuration

15. In order to further configure Arch Linux, you must chroot into /mnt the system path and add a hostname for your system by issuing the below commands.

Set Hostname for Arch Linux

16. Next, configure your system Language. Choose and uncomment your preferred encoding languages from /etc/locale.gen file then set your locale by running the following commands.

the locale.gen file excerpt:

Set Arch Linux Language

Generate your system language layout.

Set Arch Linux Language

17. The next step is to configure your system time zone by creating a symlink for your sub time zone (/usr/share/zoneinfo/Continent/Main_city) to /etc/localtime file path.

Set Arch Linux Timezone

You should also configure the hardware clock to use UTC (the hardware clock is usually set to the local time).

18. Like many famous Linux distributions, Arch Linux uses repo mirrors for different world locations and multiple system architectures. The standard repositories are enabled by default, but if you want to activate Multilib repositories you must uncomment [multilib] directives from /etc/pacman.conf file, as shown in the below excerpt.

Enable Arch Multilib

19. If you want to enable Yaourt Package Tool support (used for downloading and building AUR packages) go to the bottom of the /etc/pacman.conf file and add the following directives.

Activate Yaourt Package Tool

20. After the repository file has been edited, synchronize and update database mirrors and packages by running the below command.

Synchronize and Update Database

21. Next, set up a password for the root account and create a new user with Sudo privileges in the Arch box by issuing the commands below. Also, expire the user password in order to force the new user to change the password at first login.

Create Arch Linux User

22. After the new user has been added you need to install the sudo package and update the wheel group line from /etc/sudoers file in order to grant root privileges to the newly added user.

Add this line to /etc/sudoers file:

Enable Sudo Privileges

24. On the last step, install the Boot Loader in order for Arch to boot up after restart. The default boot loader for Linux distributions and Arch Linux also is represented by the GRUB package.

To install the GRUB boot loader in UEFI machines on the first hard-disk and also detect Arch Linux and configure the GRUB boot loader file, run the following commands as illustrated in the following screenshots.

Install Grub Boot Loader in Arch Linux Configure Grub Boot Loader in Arch Linux

25. Finally, create the GRUB configuration file by issuing the following command.

Create Grub Configuration file

Congratulations! Arch Linux is now installed and configured for your box. The last steps needed now are to exit the chroot environment, unmount the partitions and reboot system by issuing the below commands.

26. After reboot, remove the installation media image and the system will boot directly into the GRUB menu as shown below.

Arch Linux Grub Menu

27. When the system boots-up into Arch Linux, log in with the credentials configured for your user during the installation process and change the user account password as shown below.

Arch Linux Login

28. You will lose the internet network connection because no DHCP client is running by default in the system. In order to overcome this problem, issue the following command with root privileges in order to start and enable the DHCP client.

Also, check if the network interface is up and has an IP address allocated by the DHCP server and if the internet connection works as expected. Ping a random domain to test the internet connection.

For now, the Arch Linux system contains only the basic software packages needed to manage the system from Command-Line, with no Graphical User Interface.

Due to its high-portability, rolling release cycles, source packages compilation, granular control over installed software and processing speed, Arch Linux resembles in many ways with Gentoo Linux, but cannot rise to Gentoo complex architectural design.

However, the process of managing an Arch Linux system is not recommended for Linux beginners. Linux beginners that want to operate an Arch-like Linux system should first learn Arch Linux principles by installing the Manjaro Linux distribution.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Читайте также:  Удаление пользователя linux ubuntu терминал
Оцените статью