By brandon - Sun, Jan. 21, 2024 ( Modified: Mon, Jan. 22, 2024 )
Arch Install
Objective
This file contains my notes for installing Arch Linux.
Notes
- Linx browser exists in Arch iso
Installation
Make bootable ISO
- I download the Arch iso and put it on a external hard drive with Ventoy setup
WiFi
-
Look for you network adaper
1 2
# displpay network adapter info ip link
-
Use
iwctl
to connect to your wireless access point1 2 3 4 5
# config network with iwctl iwctl station $DEVICE scan station $DEVICE get-networks station $DEVICE connect $SSID
Create Partitons
- Partitions needed
Partition | Mount Point | Size | |
---|---|---|---|
required | boot | /mnt/boot | 512MB |
required | root | /mnt | 8GB+ |
optional | home | /mnt/home | 1G+ |
-
I used
fdisk
to complete this part.1 2 3 4
# open disk up in fdisk fdisk /dev/sdX fdisk /dev/nvmeX fdisk $DEVICE
-
fdisk
options reference1 2 3 4 5 6
# options o - blank out partition table g - setup gpt scheme n - new partition t - change type w - write to partition table
-
If you want to use LVM, you will need to create the partitions
Encryption
-
After you are done partitioning your disks, you can encrypt your devices.
-
Encrypt before pv/vg/lv creation and filesystem creation
-
Use
cryptsetup
to encrypt devices1 2 3 4 5 6
# encrypt partition cryptsetup luksFormat -v -s 512 -h SHA512 $DEVICE cryptsetup luksFormat /dev/sdX1 # unlock encrypted partition cryptsetup open --type luks /dev/sdX1 lv_home
LVM
- Setup LVM on partitions after encryption
- TODO: LVM.md (needs updating)
Create Filesystems
-
Root Filesystem (/)
1 2 3 4 5 6
# create ext4 filesystem mkfs.ext4 $DEVICE mkfs.ext4 /dev/sdX # create btrfs filesystem mkfs.btrfs -L archlinux $DEVICE
-
boot partition (/boot)
1 2 3
# create vfat partition mkfs.vfat -F32 $DEVICE mkfs.vfat -F32 /dev/sdX1
-
Optional: home partition (/home)
btrfs
- Create btrfs
- Create btrfs root subvolume volume
- Create btrfs home subvolume
|
|
Note
- seems that you need to mount btrfs fillsystem at the device level first. anytime you decide to go back and create another subvolume (ie. swap) you will need to
- unmount the device before mounting the subolvumes
Mount filesystems
- Mount root filesystem to /mnt
- Mount the EFI System Partition (esp)
- mkdir /mnt/boot
- mount esp to /mnt/boot
- Mount home partition
|
|
Generate fstab
- Sanity check
|
|
Setup Mirrors
- Edit /etc/pacman.d/mirrorlist
- Top 6 mirrors will be used to intall system
Pacstrap
- Its a good idea to install some important software at this time.
|
|
Chroot
|
|
mkinitcpio
- edit /etc/mkinitcpio
|
|
- run mkinitcpio
|
|
Set locale
|
|
Set timezone
|
|
Networking
- Enable NetworkManager.service
- Start service
- nmtui to set up wifi or manage connections
Update
Create users and groups and set passwords
- Set root password
- Add your User
|
|
- change password
- visudo and edit the sudoer file to let users in the group wheel be able to execute with root priveleges
- Add your user to group wheel
Bootloader
systemd loader
grub
-
Encryption
- /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=“loglevl=3 cryptdevice=<dev>:<vg>:allow-discards queit”
-
enable corectrl to get full control of amdgpu
GRUB_CMDLINE_LINUX_DEFAULT="<other_params>… amdgpu.ppfeaturemask=0xffffffff"
-
Install groub to esp
|
|
-
mkdir /boot/grub/locale
-
Generate configuration
|
|
Optional: Create Swap File
btrfs swap
|
|
Graphical Enviroment
- Install xorg
- Install DE or Display Manager + Window Manager
- Configure