💾 Archived View for darknesscode.xyz › linux › arch-linux-install.gmi captured on 2023-07-22 at 16:17:57. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-05)
-=-=-=-=-=-=-
Set keyboard layout, the default is US:
ls /usr/share/kbd/keymaps/**/*.map.gz
Verify the boot mode:
ls /sys/firmware/efi/efivars
Or
efivar -l
If the command shows the directory without error, then the system is booted in UEFI mode.
Update the system clock:
date
timedatectl set-ntp true
Check disk list
lsblk
Do Partitions with:
If there is just one drive
cfdisk
If there are more than one drive
cfdisk /dev/sdb
And do three partitions:
sda1 600M (ufi) sda2 50GB (root) sda3 4GB (swap if needed, can be more) sda4 180GB (home)
This partitions are for 256 GB ssd.
EFI partition
mkfs.fat -F32 /dev/sda1
Make the swap partition
mkswap /dev/sda3
Activating swap
swapon /dev/sda3
Formatting root, home and other partitions
mkfs.ext4 /dev/sda2 -> (root) mkfs.ext4 /dev/sda4 -> (home)
Root Partition
mount /dev/sda2 /mnt
Home Partition
mkdir /mnt/home mount /dev/sda4 /mnt/home
UEFI Partition
mkdir /mnt/boot mkdir /mnt/boot/efi mount /dev/sda1 /mnt/boot/efi
Check the mirror list and chose the mirrors in local zone:
nano /etc/pacman.d/mirrorlist
Install base system:
pacstrap /mnt base base-devel linux linux-firmware vim git
Create fstab:
genfstab -U /mnt >> /mnt/etc/fstab
Change to chroot:
arch-chroot /mnt
Switch local time:
ln -sf /usr/share/zoneinfo/RegionCity /etc/localtime
Setup local clock:
hwclock --systohc
Localization, open and uncomment en_US.UTF-8 UTF-8:
vim /etc/locale.gen
Generate the locales:
locale-gen
Create the locale.conf:
vim /etc/locale.conf
And add:
LANG=en_US.UTF-8
Hostname, add the machine name
vim /etc/hostname
Hosts
vim /etc/hosts
Add:
127.0.0.1 localhost ::1 localhost 127.0.0.1 Archlinux.localdomain Archlinux
pacman -S networkmanager
systemctl enable NetworkManager
Set password for root user:
passwd
Add user (where USER change it for your username):
useradd -m -g users -G audio,video,network,wheel,storage,rfkill -s /bin/bash USER
Add password for the new user:
passwd USER
Visudo, search and uncomment:
EDITOR=vim visudo
%wheel ALL=(ALL) ALL
First install:
pacman -S grub efibootmgr
After the installations is finish install grub uefi:
grub-install --target=x86_64-efi --efi-directory=/boot/efi
Then configure grub:
grub-mkconfig -o /boot/grub/grub.cfg
Exit the chroot environment:
exit
Unmount all partitions:
umount -R /mnt
At last:
reboot
----------
----------
© DarknessCode