- This is based on the offical wiki
- This will install Arch, KDE and Grub.
- This is just a minimal example with no real special customizations. The point is to remove some of the extra info the typical user likely won't need to worry about (yet)
- This assumes you've alrady downloaded the Arch iso.
- Some things may look a bit different for you; trying this on a Hyper-V virtual machine in Windows first.
- Secure boot will need to be disabled during install. On Hyper-V I'm not sure what the right way is to re-enable but if you're doing an actual install, these are the provided notes
All in all, despite what you may have heard, installing Arch isn't actually that bad as long as you have a basic understanding of the terminal, there's just a lot of things to do to get a basic setup working which you should "hopefully" have at the end of this.
These directions should be working as of 10/13/2024.
First task is partitioning with FDisk...
-
Probably the easiest thing to use since it's preinstalled on the iso. "Parted" also appears to be installed as well. I just went with fdisk since I'm somewhat familiar with it and all the options have simple(ish) explanations.
-
fdisk -l
brings up the available disks on the system -
fdisk <drive path>
to run fdisk for the drive.
Making partition sizes
- We're going to follow the recommended partition layout for UEFI found here
- Select the command to add a new partition
- You need to specify start and end sectors. Note that "sectors" are the unit of measurement (there is another called "cylinder" but it's marked as deprecated)
- sectors can be specified in normal terms like "1mb" for megabytes
- as you make partitions, fdisk should be helping you calculate where to begin the next partition.
- Make sure to set each partition to the appropriate type(Fat32, EFI, etc)
-
You should have the following
/dev/sda1
- boot (aka /dev/efi_system_partition)/dev/sda2
- swap (aka /dev/swap_partition)/dev/sda3
- main (aka /dev/root_partition)
-
Run
mkfs.fat8 -F 32
to setup Fat32 filesystem on system partition -
Run
mkswap /dev/sda2
to setup the swap space with a filesystem. -
Run
mkfs.ext4
to setup root partition with Ext4 filesystem
- Mount root partition to
/mnt
withmount /dev/sda3 /mnt
- Mount boot to
/mnt/boot
withmount /dev/sda1 /mnt/boot --mkdir
- enable the swap partition with
swapon /dev/sda2
- Run
pacstrap -K /mnt/base linux linux-firmware
- Note you can append any additional packages you might need to the end of the command
- You can install other packages if you forget by running
pacman -S <package name>
sof-firmware
- this will get default audio workingkde-utilities-meta
- should allow for Konsole(terminal access). There are apparently keybindings to switch between KDE gui/terminal mode too.
- Probably should do this before the next step cause command doesn't work in arch-chroot
timedatectl list-timezones
- America/Los_Angeles is me- Use
timedatectl set-timezone <zone>
to set. - You may have to do this again after completing setup; first time I tried it didn't take until I did it again. (I think I ran hwclock later on which would reset things to UTC)
- generate fstab file by running
genfstab -U /mnt >> /mnt/etc/fstab
- root into the new system by running
arch-chroot /mnt
- Edit
/etc/locale.gen
and uncomment the locales to support. en_US is for american english - run
locale-gen
- create a locale.conf file at /etc/locale.conf with the value
LANG=<locale name>
, in our case en_US.UTF-8
- create hostname file at /etc/hostname. This basically gives your system a name when on a network.
- ensure network interface exists by typing
ip link
. This will list all available network interfaces - You can enable/disable interfaces by running `ip link set <up|down>
- In Hyper-V things should already be setup but you may still have to enable the interface.
- Add a network configuration; for this example I added a file at
/etc/systemd/network/20-wired.network
using the sample here https://wiki.archlinux.org/title/Systemd-networkd#Wired_adapter_using_DHCP - docs are here https://wiki.archlinux.org/title/Network_configuration
- set the root password by running passwd
- Root into main disk (
arch-chroot /mnt
after mounting your root partition to/mnt
by runningmount <partition> /mnt
) and install grub and efibootmgr. - Mount boot drive (
/dev/sda1
) to /boot (mount /dev/sda1 /boot
) - run
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
(remember to change target to correct procssor architecture but for the vast majority of people this should be correct) - Generate the main configuration file. by running
grub-mkconfig -o /boot/grub/grub.cfg
- Reboot
- You should be presented with the Grub manager and an option to boot into Arch.
- enable systemd-networkd and systemd-resolved
systemctl enable <name>
- To make sure settings take effect, may as well restart systemd-networkd
useradd -m <username>
passwd <username>
to set a password- A home directory "should" be automatically created at
/home/<username>
. If not, you can manually create it.
- Install a display manager. SDDM is recommended for KDE which we'll use for this example.
- Install
pacman -S sddm
. Optionally installsddm-kcm
which provides GUI options for settings andqt5-declarative
for QT5 theme support. See https://wiki.archlinux.org/title/SDDM for more details. - Once thats installed, add a new configuration at
/etc/sddm.conf.d/autologin.conf
. The file should look something like
// from https://wiki.archlinux.org/title/SDDM#Autologin
[Autologin]
User=john
Session=plasma
- With KDE, you must have a user setup other than root.
- By default, KDE will try to use Wayland. It does work on Hyper-V but performance is noticably worse so I switched to X11.
- Install
xinit
and follow the directions here https://wiki.archlinux.org/title/KDE#From_the_console if you don't have a compatible GPU. - If you use X11, you can use this to ensure that KDE autoloads https://wiki.archlinux.org/title/Xinit#Autostart_X_at_login
- Once you login as your non root user, you may not have acess to the
arch-chroot
command anymore. Installingarch-install-scripts
should fix this. See https://wiki.archlinux.org/title/Chroot#Using_arch-chroot - For the "Discover App", you will likely need to install a backend for it. See here for more details https://www.baeldung.com/linux/discover-software-manager-backend
I've been thinking it's time to make Linux my main system and keep Windows on a separate drive for gaming / stuff that doesn't work super well on Linux. While I decide on a distro, I thought it'd be a good idea to go through a few of them using Window's Hyper-v before taking the plunge.
These are just some notes from my experience from installing Arch Linux. The wiki is EXTREMELY detailed, almost to a fault; it's not a bad thing but there's a of stuff that the typical person may not need so I thought it'd be a good idea to take notes.
Still need to make a few edits but for the most part, following this should get you a basic Arch install up and running.