Skip to content

Instantly share code, notes, and snippets.

@marcusziade
Created January 25, 2025 11:22
Show Gist options
  • Save marcusziade/373b5a9394c8ea7f959a469e736cfbda to your computer and use it in GitHub Desktop.
Save marcusziade/373b5a9394c8ea7f959a469e736cfbda to your computer and use it in GitHub Desktop.
Deepseek+sonnet-3.5 Arch install tutorial
# Complete Arch Linux Installation Guide
## Introduction
This guide provides step-by-step instructions for installing Arch Linux. The installation process requires careful attention to detail and basic familiarity with command-line interfaces. Plan for approximately 1-2 hours for the complete installation.
## Prerequisites
- A 64-bit (x86_64) compatible computer
- Minimum 2GB RAM (4GB+ recommended)
- Minimum 20GB storage space
- Internet connection
- USB drive (8GB or larger)
- Basic knowledge of Linux commands
- Patience and attention to detail
## Pre-Installation Steps
### 1. Back Up Your Data
Before proceeding, back up ALL data from the target installation drive. The installation process will erase existing data.
### 2. Download and Verify the ISO
1. Download the latest ISO from https://archlinux.org/download/
2. Verify the ISO's integrity using the provided SHA256 checksum:
```bash
sha256sum path/to/archlinux.iso
```
### 3. Create Installation Media
Using Rufus (Windows):
1. Download Rufus from https://rufus.ie
2. Insert your USB drive
3. Select the Arch Linux ISO
4. Choose these specific settings:
- Partition scheme: GPT
- Target system: UEFI
- File system: FAT32
5. Click Start and wait for completion
## Installation Process
### 1. Boot Preparation
1. Disable Secure Boot in BIOS/UEFI settings
2. Set boot priority to USB
3. Save changes and restart
4. When the Arch boot menu appears, select "Arch Linux install medium"
### 2. Verify Boot Mode
```bash
ls /sys/firmware/efi/efivars
```
If this directory exists, you're in UEFI mode (correct). If not, you need to boot in UEFI mode.
### 3. Connect to the Internet
For wired connections:
```bash
ip link
dhcpcd
```
For wireless:
```bash
iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect SSID
# Enter password when prompted
exit
```
Verify connection:
```bash
ping -c 3 archlinux.org
```
### 4. Update System Clock
```bash
timedatectl set-ntp true
timedatectl status
```
### 5. Partition the Disk
First, identify your target disk:
```bash
lsblk
```
For a modern UEFI system with a single disk, create these partitions using gdisk:
```bash
gdisk /dev/nvme0n1 # or /dev/sda for SATA drives
```
Create the following partition layout:
1. EFI System Partition (ESP):
- Size: 550MB
- Type code: ef00
- Command sequence: n, 1, default, +550M, ef00
2. Root partition:
- Size: Remaining space
- Type code: 8300
- Command sequence: n, 2, default, default, 8300
Write changes: w
### 6. Format Partitions
Format the EFI partition:
```bash
mkfs.fat -F 32 /dev/nvme0n1p1
```
Format the root partition:
```bash
mkfs.ext4 /dev/nvme0n1p2
```
### 7. Mount Partitions
Mount root first:
```bash
mount /dev/nvme0n1p2 /mnt
```
Create and mount EFI directory:
```bash
mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
```
### 8. Install Essential Packages
Install base system:
```bash
pacstrap /mnt base base-devel linux linux-firmware intel-ucode \
vim networkmanager grub efibootmgr
```
Note: Use `amd-ucode` instead of `intel-ucode` for AMD processors
### 9. Generate fstab
```bash
genfstab -U /mnt >> /mnt/etc/fstab
```
### 10. Configure Base System
Change root into the new system:
```bash
arch-chroot /mnt
```
Set timezone:
```bash
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
```
Configure locale:
```bash
vim /etc/locale.gen
# Uncomment en_US.UTF-8 UTF-8
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
```
Set hostname:
```bash
echo "myhostname" > /etc/hostname
```
Configure hosts file:
```bash
vim /etc/hosts
```
Add:
```
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
```
### 11. User Configuration
Set root password:
```bash
passwd
```
Create user account:
```bash
useradd -m -G wheel,audio,video,optical,storage username
passwd username
```
Configure sudo:
```bash
EDITOR=vim visudo
# Uncomment %wheel ALL=(ALL:ALL) ALL
```
### 12. Configure Boot Loader
Install GRUB:
```bash
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
--bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
```
### 13. Enable Essential Services
```bash
systemctl enable NetworkManager
systemctl enable fstrim.timer
```
### 14. Exit and Reboot
Exit the chroot environment:
```bash
exit
```
Unmount all partitions:
```bash
umount -R /mnt
```
Reboot:
```bash
reboot
```
## Post-Installation
After rebooting and logging in:
1. Connect to network:
```bash
nmtui
```
2. Update system:
```bash
sudo pacman -Syu
```
3. Install basic desktop environment (optional):
```bash
sudo pacman -S xorg-server xorg-xinit
# Then install your preferred desktop environment
```
## Troubleshooting
### Common Issues:
1. No bootloader entry:
- Verify EFI partition is mounted correctly
- Ensure GRUB installation path is correct
- Check if Secure Boot is disabled
2. No network after reboot:
- Start NetworkManager: `sudo systemctl start NetworkManager`
- Connect using: `nmtui`
3. Black screen after install:
- Boot with kernel parameter: `nomodeset`
- Install appropriate graphics drivers after booting
## Maintaining Your Installation
1. Regular system updates:
```bash
sudo pacman -Syu
```
2. Clean package cache periodically:
```bash
sudo pacman -Sc
```
3. Check system logs for issues:
```bash
journalctl -p 3 -xb
```
Remember to consult the Arch Wiki (https://wiki.archlinux.org) for detailed information about any specific issues or additional configuration needs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment