Home - lucastercas/arch-install GitHub Wiki

Welcome to the arch-install wiki!

Live ISO

Networking

$ iwctl
[iwd]# device list
[iwd]# station <device> scan
[idw]# station <device> get-networks

Disk

Cleaning Disk

Before formatting the disk, I always like to clear it first, using sgdisk:

$ lsblk # Check which disk to clear
$ sgdisk -o /dev/sdX # Clear the disk

Creating Partitions

To create the partitions, there is a number of programs you can use:

  • parted
  • fdisk
  • sgdisk

And for partitions, I usually make these:

Mount Point Type
/boot/efi efi (ef00)
/ ext4 (8300)
/home ext4 (8302)

So, using sgdisk, it would become something like this:

$ sgdisk -n 1:0:+300MiB -c 1:efi -t 1:ef00 /dev/sda
$ sgdisk -n 2:0:+71GiB -c 2:root -t 2:8300 /dev/sda
$ sgdisk -n 3:0:+4GiB -c 3:home -t 3:8302 /dev/sda

Then formatting the disks:

$ mkfs.ext4 /dev/sda2
$ mkfs.ext4 /dev/sda3
$ mkfs.fat -F32 /dev/sda1

Mounting Disks

# Mounting root partition
$ mkdir -p /mnt/
$ mount /dev/sda2 /mnt/
# Mounting home partition
$ mkdir -p /mnt/home
$ mount /dev/sda3 /mnt/home
# Mounting boot partition
$ mkdir -p /mnt/boot/efi
$ mount /dev/sda1 /mnt/boot/efi

Pacstrap

Then, before chrooting into the system, there needs to be some packages so you can use it, these packages are installed by the pacstrap command:

$ pacstrap -i /mnt base base-devel linux linux-firmware
$ genfstab -U /mnt >> /mnt/etc/fstab

Chroot

arch-chroot /mnt

Locale

$ ln -sf /usr/share/zoneinfo/America/Belem /etc/localtime
$ vim /etc/locale.gen
$ locale-gen
$ hwclock --systohc
$ echo LANG=pt_BR.UTF-8 >> /etc/locale.conf

Mirrors

$ pacman -S reflector rsync
$ reflector --verbose --latest 25 --sort rate --save /etc/pacman.d/mirrorlist

Users

$ passwd # root password
$ useradd -m  -G wheel,video -s /bin/zsh -c "Jose Antonio" $username
$ passwd $username # user password
$ visudo # Edit permissions for sudo (wheel group)

network

$ systemctl enable dhcpdc

Hostname

$ echo $hostname >> /etc/hostname

Bootloader

For bootloaders, I like using refind:

$ mkinitcpio -p linux
refind-install

But, if you like grub:

$ grub-mkconfig -o /boot/grub/grub.cfg
$ grub-install --target=i386-efi --efi-direcotory=/boot/efi --bootloader-id=GRUB /dev/sdX
# $ grub-install /dev/sdX

References

  1. https://wiki.archlinux.org/title/Reflector
  2. https://wiki.archlinux.org/title/Iwd

⚠️ **GitHub.com Fallback** ⚠️