arch-install/README.md

157 lines
4.2 KiB
Markdown
Raw Permalink Normal View History

2023-11-17 18:30:06 -08:00
# Personal Arch Linux Install Guide
I'm using this repo to record the steps I take to install and personalize arch linux.
Hopefully I can automate some of the later steps over time.
# Part 1 - Installation
Generally following the steps on the arch
[install guide](https://wiki.archlinux.org/title/Installation_guide) to
get to a chrooted environment.
- Verify we booted as x64 UEFI `cat /sys/firmware/efi/fw_platform_size`
## Network
- Check device with `ip link`
- Auth wifi with `iwctl station wlan0 connect $AP_NAME`
- `ping archlinux.org` to verify
## Partitioning
Use fdisk to partition:
/boot : 1G partition, type=1 (EFI), bootable (press M then a)
/ : remainder of the disk, default type
For /boot (/dev/sda1) call `mkfs.fat -F 32 /dev/sda1`
Follow the steps
[here](https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#LUKS_on_a_partition)
to encrypt the root partition. Consider increasing the cryptographic parameters as mentions.
Mount the partitions at /mnt and /mnt/boot.
## Install
Install the base:
`pacstrap -K /mnt base linux linux-firmware`
Followed by important packages:
`pacstrap /mnt grub efibootmgr e2fsprogs networkmanager vim man-db man-pages texinfo sudo`
Either pacstrap `intel-ucode` or `amd-ucode` for the processor. It will be automatically loaded by grub.
2023-11-17 18:30:06 -08:00
# Part 2 - Configure
Generally follow the configure the system steps in the
[install guide](https://wiki.archlinux.org/title/Installation_guide#Configure_the_system).
`genfstab -U /mnt >> /mnt/etc/fstab`
`arch-chroot /mnt`
- Set the time as described.
- Set the localization as described.
- Enable NetworkManager `systemctl enable NetworkManager.service`
- Update the initramfs as described
[here](https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#Configuring_mkinitcpio)
- Add `encrypt` after `block` in HOOKS in /etc/mkinitcpio.conf
- Run `mkinitcpio -P`
2023-11-17 18:30:06 -08:00
- Set the root password
- Run `grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB`
- Update `/etc/default/grub` to have the line:
`GRUB_CMDLINE_LINUX="cryptdevice=UUID=device-UUID:root root=/dev/mapper/root"`
2023-11-20 12:58:39 -08:00
(Get the UUID using `blkid -s UUID -o value /dev/sda2`, can be inserted into vim using `:r!CMD`).
2023-11-17 18:30:06 -08:00
- Run `grub-mkconfig -o /boot/grub/grub.cfg`
- Reboot sucessfully(?) into the new system.
## In the new system
Connect to wifi
- `nmcli device wifi list`
- `nmcli device wifi connect --ask $SSID`
- `nmcli c modify $SSID connection.autoconnect true`
Create a user:
- `useradd -m -G wheel drew`
- `passwd drew`
2023-11-17 18:30:06 -08:00
- `EDITOR=vim visudo` and uncomment the line starting %wheel
Install helpful utilities:
- `pacman -S git`
TODO: Install graphics driver pagckages?
## Update DNS
Set in /etc/systemd/resolved.conf
```
DNS=66.42.73.247#itramisu.one
DNSOverTLS=yes
```
`ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf`
`systemctl enable systemd-resolved`
## Create a swapfile (optional)
https://wiki.archlinux.org/title/swap#Swap_file
For laptops: Check suspend method -> https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Changing_suspend_method
Configure hibernation: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation
Set /etc/systemd/sleep.conf parameters for timed sleep/hibernate.
Set /etc/systemd/logind.conf to HandleLidSwitch to SuspendThenHibernate
2023-11-17 18:30:06 -08:00
# Part 3 - Desktop
Reboot and login as the new user.
Clone this git repo at /home/drew/install.
2023-11-20 12:58:39 -08:00
- `sudo ./install_packages.sh`
- Run `sudo ./install_desktop.sh`
- Run `./install_usr.sh`
2023-11-17 18:30:06 -08:00
May have to add a udev rule to allow brightness keys to work.
https://wiki.archlinux.org/title/Backlight#ACPI
2023-11-17 18:30:06 -08:00
# Part 4 - Applications
`mkdir Documents/ Downloads/ Pictures/`
Log into firefox w/ sync (installs bitwarden.)
Set firefox to search with kagi.
2023-11-17 18:30:06 -08:00
# Part 5 - Dev environment
Run `nvim -u nvim-bootstrap.lua` to install plugins as nvim won't start up until they are.
2023-11-17 18:30:06 -08:00
Add ssh keys to gitea and gitlab.
mkdir prog and clone a c++ code base, a python code base, and a rust code base to test the language server.
# Part 6 - Optional
Steam?
2023-12-05 17:04:23 -08:00
## Setup Syncthing
`systemctl enable syncthing@drew`
`systemctl start syncthing@drew`
`ssh -L 8385:localhost:8384 tiramisu.one`
Use the GUIs at `localhost:8384` and `localhost:8385` to enable sync.
2023-11-17 18:30:06 -08:00