💾 Archived View for mkl-wlod.srht.site › notes › uefi-arch.gmi captured on 2024-02-05 at 09:22:08. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-03-01)
-=-=-=-=-=-=-
-` .o+` `ooo/ `+oooo: `+oooooo: -+oooooo+: `/:-:++oooo+: `/++++/+++++++: `/++++++++++++++: `/+++ooooooooooooo/` ./ooosssso++osssssso+` .oossssso-````/ossssss+` -osssssso. :ssssssso. :osssssss/ osssso+++. /ossssssss/ +ssssooo/- `/ossssso+/:- -:/+osssso+- `+sso+:-` `.-/+oso: `++:. `-/+/ .` `
Basic Arch linux guide for uefi installation
Internet connection
Use
to connect your network. If you using LAN probably you don't need to do anything.
$ iwctl
Partitioning
Show current partitions and disk.
$ lsblk
We need to create
and
If you have already installed other system for EFI then, you don't need to create *ESP*, also check which partition is empty for linux, if you dont have, you need to resize ntfs by for example gparted if it's windows.
Prtitioning, replace sdx with your lsblk output disk
$ gdisk /dev/sdx
Create GPT partition table
Command: o
Create new partition
Command: n
Creating first partition as *ESP*
Partition number: 1
Set where is partition start, leave default press enter
First sector:
set size of the *ESP*
Last sector: +512M
Set partition type to *ESP*
Hex code or GUID: EF00
Create partition to Linux filesystem
Command: n
Create second partition
Partition number: 2
Leave default
First sector:
Set size of main partition, press enter for whole lefted space
Last sector:
Set partition type to Linux filesystem (you can leave that if you will use EFISTUB)
Hex code or GUID: 8300
Print your partition configuration
Command: p
Write your partition configuration (save)
Command: w
Format *ESP* to FAT32 (if you have this ESP from other os, dont do this step)
$ mkfs.fat -F 32 /dev/sdx1
Format Linux filesystem partition to Fourth Extended File System
$ mkfs.ext4 /dev/sdx2
Mount Linux filesystem to /mnt directory for prepare to install packages
$ mount /dev/sdx2 /mnt
Create directory for *ESP*
$ mkdir /mnt/boot
Mount *ESP* to /boot directory
$ mount /dev/sdx1 /mnt/boot
We will install the
package,
kernel and firmware,
,
,
. Use reflector to auto set servers
$ pacstrap /mnt linux linux-firmware base base-devel networkmanager vis efibootmgr
Generate
file.
$ genfstab -U /mnt >> /mnt/etc/fstab
Show disk and partitions with filesystems
$ lsblk -fs
Show fstab file for check of proprly done task
$ cat /mnt/etc/fstab
Change root to new file system
$ arch-chroot /mnt
Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8 and other needed locales. Generate the locales by running:
$ locale-gen
Create the /etc/locale.conf file, and set the LANG variable accordingly:
LANG=en_US.UTF-8
Create the hostname file:
/etc/hostname
myhostname
Enable network manager:
$ systemctl enable NetworkManager
Create user with home directory:
$ useradd -m username
Set passwords:
Create root password
$ passwd
Create username password
$ passwd username
Add your user to wheel group
$ usermod -aG wheel username
Make user usefull:
edit /etc/sudoers and uncomment
#%wheel ALL=(ALL) ALL
Boot loader. There is many options. I recommend two of them
and
. EFISTUB boot kernel directly, but systemd-boot is kinda better and more minimalistic grub replacement.
prepare for create boot entry, print lsblk for view on partitions
if you would not replace drives places you can replace root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw by root=/dev/sdxY.
now create boot entry:
$ efibootmgr --disk /dev/sdX --part Y --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw initrd=\initramfs-linux.img'
/dev/sdXY is ESP and root is your Linux file system partition
$ bootctl --path=/boot install
Create and edit file /boot/loader/entries/arch.conf
title Arch Linux linux /vmlinuz-linux initrd /initramfs-linux.img options root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw
This options should be in one column, here you can also replace root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw by root=/dev/sdxY rw
Edit
/boot/loader/loader.conf
default arch timeout 4 console-mode max editor no
And update systemd-boot:
$ bootctl --path=/boot update
After reboot to end configuration you need to set timezone:
$ ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
or
$ timedatectl set-timezone Region/City
Set hardware clock to UTC time
$ hwclock --systohoc
Set keyboard layout
$ localectl list-keymaps $ localectl set-x11-keymap us
Replace us for your need