Home - lucastercas/arch-install GitHub Wiki
Welcome to the arch-install wiki!
$ iwctl
[iwd]# device list
[iwd]# station <device> scan
[idw]# station <device> get-networks
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
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 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
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
arch-chroot /mnt
$ 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
$ pacman -S reflector rsync
$ reflector --verbose --latest 25 --sort rate --save /etc/pacman.d/mirrorlist
$ 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)
$ systemctl enable dhcpdc
$ echo $hostname >> /etc/hostname
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