pwsh1996 / LinuxSetup

A guide for my setup in Linux, and some config files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install Arch

Prerequisites

Boot into Arch using the ISO https://archlinux.org/download/ (I'm using version 2022.08.05) (MD5:0e9943a96f8298abb0db5e64f76ad0be)

To check if you are using UEFI run efivar -l if your output is efivar: error listing variables: Function not implemented then you are not in UEFI mode and are using Legacy BIOS. This was only tested in UEFI without SecureBootVerify the boot mode | ArchWiki

Check your network connection 'ping 1.1.1.1'

Update the clock using timedatectl set-ntp true

Format Drives

List disks lsblk

image

To get info on on the drives use hdparm -i /dev/sdb it should output something like this

image

Note: This wasn't working in my Gen 1 Hyper-V VM, it's output was HDIO_GET_IDENTITY failed: invalid argument

Wipe the disk using gdisk if there are already partitions on it

image

x goes into expert mode, z for zap, then y for yes.

Formating the disk use cgdisk

Boot

Select New
For the sector hit enter
For the size I'd use 300MiB BIOS Installation | GNU
For the code EF00 For the name boot

Swap

Select New
For the sector hit enter
For the size At least 512MiB
For the code 8200
For the name swap

Root

Select New
For the sector hit enter
For the size 30GiB
For the code 8300
For the name root

Home

Select New
For the sector hit enter
For the size The rest of the space
For the code 8300
For the name home

Go down to Write then type yes

image

Format the boot partition as fat32 mkfs.fat -F 32 /dev/sda1

Format the swap partition mkswap /dev/sda2

To enable it use swapon /dev/sda2

To see if it is enabled

image

Then format the others as EXT4

mkfs.ext4 /dev/sda3

mkfs.ext4 /dev/sda4

Mounting the Partitions

Mount the root partition mount /dev/sda3 /mnt

Then mount --mkdir /dev/sda1 /mnt/boot

Then mount --mkdir /dev/sda4 /mnt/home

Checking your mirrors

Backup your pacman mirrors file cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak

pacman -Sy to update the database

pacman -S pacman-contrib for the rankmirrors tool

rankmirrors -n 6 /etc/pacman.d/mirrorlist.bak > /etc/pacman.d/mirrorlist

Installing

pacstrap -i /mnt base base-devel linux linux-firmware linux-headers nano bash-completion man-db intel-ucode dhcpcd networkmanager

genfstab -U -p /mnt >> /mnt/etc/fstab

arch-chroot /mnt to change root into the mount

Setting a few more preferences

nano /etc/locale.gen and the uncomment the line en_US.UTF-8 UTF-8

Run locale-gen

image

echo LANG=en_US.UTF-8 > /etc/locale.conf

export LANG=en_US.UTF-8

create a symbolic link ln -sf /usr/share/zoneinfo/America/Chicago > /etc/localtime

hwclock --systohc

Set the hostname echo computer > /etc/hostname to name it computer

Edit the /etc/pacman.conf to allow 32 bit applications, uncomment the lines about multilib

image

If it is an SSD enable trim service systemctl enable fstrim.timer

Users

passwd to create the root password

Create your user useradd -m -g users -G wheel,storage,power -s /bin/bash jmin then make them a password passwd jmin

Modify suders file by EDITOR=nano visudo to view the file /etc/sudoers

Uncomment the line %wheel ALL=(ALL) ALL and add the line Defaults rootpw

Boot Loader and Junk

bootctl install then nano /boot/loader/entries/arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img

blkid /dev/sda3 >> /boot/loader/entries/arch.conf

Then edit the last line to look like this

options root="UUID=xxxxxx-xxxxxxx-xxx-xxx" rw

Create the loader.conf nano /boot/loader/loader.conf loader.conf | ArchWiki

timeout 3
console-mode 0
editor no
default arch.conf

Network Junk

systemctl enable dhcpcd@enp0s25.service where enp0s25 is the interface you get on ip link

systemctl enable NetworkManager.service

KDE

install mesa xorg-server xorg-apps xorg-xinit xorg-twm xorg-xclock xterm plasma sddm

sudo systemctl enable sddm.service

reboot

Sources

Some Ordinary Gamers | YouTube

Mental Outlaw | YouTube

Luke Smith | YouTube

Nice Micro | YouTube

About

A guide for my setup in Linux, and some config files