You are not logged in.

#1 2021-12-30 23:59:57

YetAnotherArchNewbie
Member
Registered: 2021-12-30
Posts: 3

I Tried to Make my Own Arch Install Notes, I Would Like Some Feedback

Hello, I'm pretty new to Linux in general, I've tried Fedora briefly, but I would like to try Arch, but I would like to install it right, so I don't brick my new laptop. My concerns are mostly that I cannot try everything listed in a virtual machine and that the Arch Wiki is vague, so I wanted to try to make something I could follow to the letter and hopefully everything is well optimized here, but if it isn't, I really want to know. So without further ado, here are my notes:

Section 0: Hardware and Software Used

MSI GS75 Laptop, one 512GB SSD, 16GB RAM, Intel Core i7-10875H, Nvidia GeForce RTX 2060, 1080p 240Hz onboard display
Partitions: boot, swap, root, home
(U)EFI boot

NetworkManager, Xorg, KDE Plasma


Section 1: Starting the Process

1. Check boot type with ls /sys/firmware/efi/efivars

2. Make sure the internet connection is working with ping archlinux.org

3. Set clock with timedatectl set-ntp true

4. Use lsblk or fdisk -l to check the drive layout.

5. Make sure the drive intended to use Linux is formatted before the next step. If it isn’t, zap the drive in question with gdisk.

6. Go in cgdisk /dev/sda and create boot (512 or 1024MiB) (EF00) (sda1), swap (20GiB for 16gb of ram) (8200) (sda2), root (80GiB) (8300) (sda3), and home (remaining space) (8300) (sda4). Write changes and exit.

7. Format the root drive with mkfs.ext4 /dev/sda3, repeat with home drive, format the boot drive with mkfs.fat -F 32 /dev/sda1.

8. Turn the swap partition into swap space with mkswap /dev/sda2 and turn it on with swapon /dev/sda2

9. Mount the root drive with mount /dev/sda3 /mnt , create /mnt/boot and /mnt/home directories with mkdir and mount the boot and home drives to those locations

10. Make a backup of the mirror list before doing any modifications with cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup

11. Check for updates with sudo pacman -Syu and install the package with the rankmirrors tool with sudo pacman -S pacman-contrib

12. Rank the top 12 out of 20 mirrors in your area by using rankmirrors -n 12 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist Check the mirror list with nano /etc/pacman.d/mirrorlist

13. Use the pacstrap command like so pacstrap -i /mnt base base-devel linux linux-headers linux-firmware for the essential packages. linux-lts linux-lts-headers are recommended installs in case the latest kernel has issues.

14. Create an Fstab file by using genfstab -U /mnt >> /mnt/etc/fstab and verify by using nano /mnt/etc/fstab


Section 2: Root Settings

15. Change root into the new system with arch-chroot /mnt

16. Install nano by inputting pacman -S nano

17. Enable multilib by modifying the /etc/pacman.conf and uncomment the stable multilib lines.

18. Now is the time to install the rest of the software under the root folder, first make sure all is up to date with pacman -Syu, then run a command to install everything else you will need at this point in the process: pacman -S man-db man-pages texinfo intel-ucode networkmanager nvidia-dkms nvidia-utils libglvnd opencl-nvidia lib32-nvidia-utils lib32-libglvnd lib32-opencl-nvidia nvidia-settings

19. Set the time zone with ln -sf /usr/share/zoneinfo/Canada/Atlantic /etc/localtime

20. Run hwclock –-systohc --utc to generate /etc/adjtime

21. Set the system locale using nano /etc/locale.gen and uncomment en_US.UTF-8 UTF-8

22. Check the locale with locale-gen

23. Set the LANG variable using echo LANG=en_US.UTF-8 > /etc/locale.conf
and export LANG=en_US.UTF-8

24. Set the hostname by using echo “hostname” > /etc/hostname

25. Enable the system timer with systemctl enable fstrim.timer

26. Set the root password with passwd

27. Add new user by using useradd -m -g users -G wheel -s /bin/bash “username”

28. Give the username a password with passwd “username”

29. Set sudo permissions by first entering EDITOR=nano visudo , uncomment the first %wheel line and add at the bottom of the document Defaults rootpw

30. Check if the EFI system is mounted with mount -t efivarfs efivarfs /sys/firmware/efi/efivars/


Section 3: Boot Loader

31. Install systemd-boot with bootctl install

32. Create a default file for systemd-boot with nano /boot/loader/entries/default.conf

33. In this file you will write:
title “bootloader title”
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /iniramfs-linux.img

34. Force the boot process to always boot to the root drive by using echo “options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sda3) rw” >> /boot/loader/entries/default.conf

35. Enable NetworkManager with systemctl enable NetworkManager.service

36. Modify /etc/mkinitcpio.conf by inserting nvidia nvidia_modeset nvidia_uvm nvidia_drm into the MODULES=() section

37. Go to /boot/loader/entries/default.conf and at the end of the options line, insert nvidia-drm.modeset=1

38. Make a directory for hooks with mkdir /etc/pacman.d/hooks and make a file with nano /etc/pacman.d/hooks/nvidia

39. Write the following script in nano:
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia-dkms
Target=linux

[Action]
Depends=mkinitcpio
When=PostTransaction
Exec=/usr/bin/mkinitcpio -P
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'

40. Exit out of root mode with exit and reboot the system using reboot If all was done correctly the system should reboot and land you straight at the login screen.


Section 4: Post-Install

41. Login and check if there were any errors with systemctl –failed

42. ping archlinux.org to verify that the dns is working. Also run timedatectl to verify that the system clock is in sync.

43. Install xorg-server xorg-apps xorg-xinit xorg-twm xorg-xclock xterm

44. Exit from the Xorg window manager and run startx as a normal user. If the command works, it means basic X functionality works.

45. Install plasma sddm and enable SDDM with sudo systemctl enable sddm.service

46. Reboot. If all worked well, Arch should reboot with KDE Plasma running as the Desktop Environment.

47. Change the swappiness from the default 60 to 22 by creating
/etc/sysctl.d/99-sysctl.conf

and writing the following inside the file:
vm.swappiness=22
vm.vfs_cache_pressure=50

Check if the swappiness value is correct with cat /proc/sys/vm/swappiness

48. Check for updates with sudo pacman -Syu

49. Reboot.

50. Enjoy your new computer!

Last edited by YetAnotherArchNewbie (2022-01-01 21:19:33)

Offline

#2 2021-12-31 00:44:06

loqs
Member
Registered: 2014-03-06
Posts: 18,987

Re: I Tried to Make my Own Arch Install Notes, I Would Like Some Feedback

24 needs to come before 16 as 16 includes packages from multilib

23 Is pointless at that stage in the process.

28 Why the groups storage and power?  Users_and_groups#Pre-systemd_groups

35 Is not related to security

43 Why would you reinstall mesa?  Why are you installing those apps if you intend to use plasma?

Offline

#3 2021-12-31 00:53:55

YetAnotherArchNewbie
Member
Registered: 2021-12-30
Posts: 3

Re: I Tried to Make my Own Arch Install Notes, I Would Like Some Feedback

loqs wrote:

24 needs to come before 16 as 16 includes packages from multilib

23 Is pointless at that stage in the process.

28 Why the groups storage and power?  Users_and_groups#Pre-systemd_groups

35 Is not related to security

43 Why would you reinstall mesa?  Why are you installing those apps if you intend to use plasma?

Fixed these things in the guide. Thank You for pointing them out.

Offline

#4 2021-12-31 12:58:55

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,268

Re: I Tried to Make my Own Arch Install Notes, I Would Like Some Feedback

42a run startx as user and verify basic X functionality works

somewhere in section 4 add

- "ping archlinux.org" to verify dns is working

- rune timedatectl to verify system clock will be sync'ed

(I know you did do those in section 1, but that was when booted into the iso, not the installed version)

I also advise to add a Section 0 - hardware & software targeted by these notes .

example how it could look for my desktop system :

AMD processor , one NVME2 SSD , one sata SSD, AMD polaris videocard, cd/dvd writer, DP monitor
partitions : root , home , EFI boot on fastest SSD . data on second ssd

ReFind, dhcp, ntp, mesa, X , lxqt/openbox , firefox, krusader, thunderbird, k3b, cdemu, wine


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2021-12-31 17:09:52

YetAnotherArchNewbie
Member
Registered: 2021-12-30
Posts: 3

Re: I Tried to Make my Own Arch Install Notes, I Would Like Some Feedback

Lone_Wolf wrote:

42a run startx as user and verify basic X functionality works

somewhere in section 4 add

- "ping archlinux.org" to verify dns is working

- rune timedatectl to verify system clock will be sync'ed

(I know you did do those in section 1, but that was when booted into the iso, not the installed version)

I also advise to add a Section 0 - hardware & software targeted by these notes .

example how it could look for my desktop system :

AMD processor , one NVME2 SSD , one sata SSD, AMD polaris videocard, cd/dvd writer, DP monitor
partitions : root , home , EFI boot on fastest SSD . data on second ssd

ReFind, dhcp, ntp, mesa, X , lxqt/openbox , firefox, krusader, thunderbird, k3b, cdemu, wine

Added the startx and the ping in Section 4. I tried to make my own version of Section 0, hopefully it's good. Thank You.

Offline

Board footer

Powered by FluxBB