Sources:
- https://www.youtube.com/watch?v=QMBE5Kxb8Bg
- https://www.youtube.com/watch?v=a00wbjy2vns
- https://www.youtube.com/watch?v=jLJO-PKyDAk
- Burn the ISO into USB drive if installing it into drive directly
dd if=archlinux.iso of=/dev/sda bs=4M status=progress && sync
- Install
libvirt ovmf
packages and reboot if installing it into KVM NOTE: ovmf package and reboot step ensure that boot from UEFI instead of BIOS, otherwise, it would fail during the process when you try togrub-install
(install bootloader)
-
choose Fireware of "UEFI x86_84: ... OVMF_CODE.fd" from Overview in VM details of KVM
-
Video XML: choose Virtio
If using other Virtual Machines sush as VirtualBox, please ensure EFI option is enabled
- Boot from USB drive or ISO in KVM
- If no auto internet connection such as when trying to install it into drive directly, to get WIFI connected
iwctl
device list
to get wifi device such as wlan0station wlan0 scan
station wlan0 get-networks
station wlan0 connect WIFI_NAME
and input your passwordexit
ip a
to ensure internet is on
- pacman-mirror
vim /etc/pacman.d/mirrorlist
to get the right mirrors to the top the filepacman -Syy
to update the packages cache
- create partion
lsblk
to get the partion listgdisk /dev/sda
to do action on /dev/sda device which is the hard drive to install Arch Linux intoo
if trying to erase all partion and create a new GPT partionn
-> enter -> enter -> +500M ->EF00 -- EF00 is EFI partion for /boot/efin
-> enter -> enter -> enter -> enter -- for / partion to use the rest of the disk spacew
to save andexit
to exit the gdisk
- create filesystems and mount them
lsblk
to get the partion listmkfs -t fat -F 32 /dev/sda1
-- sda1 is the EFI partionmkfs -t ext4 /dev/sda2
-- sd2 is the / partionmount /dev/sda2 /mnt
-- mount / firstmkdir -p /mnt/boot/efi && mount /dev/sda1 /mnt/boot/efi && lsblk
-- mount EFI
- install base and linux kernel and other packages
pacstrap /mnt base base-devel linux linux-headers linux-firmware linux-lts linux-lts-headers vim
- save filesystems into config file
genfstab -U /mnt >> /mnt/etc/fstab
- switch into the new system
arch-chroot /mnt
- install pacakges such as grub and install boot loader
pacman -S --needed grub efibootmgr efivar networkmanager intel-ucode wpa_supplicant wireless_tools dialog dosfstools os-prober mtools
grub-install /dev/sda
-- NOTE sdagrub-mkconfig -o /boot/grub/grub.cfg
- username and password
passwd
-- set password for root useruseradd -m -g users -G wheel your-name
passwd your-name
EDITOR=vim visudo
-- uncomment the "%wheel ALL=(ALL) ALL" line to make your-name use sudo command
- swapfile
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
vim /etc/fstab
and append line of "/swapfile none swap sw 0 0"
- Last steps before finish
systemctl enable NetworkManager
vim /etc/locale.gen
-- uncomment "en_US.UTF-8" linelocale-gen
exit
umount -a
reboot
- login into the new system, and install KDE Plasma
- login, username: root, password: just set previouly
nmtui
to access to wifipacman -S --needed xorg xf86-video-intel libgl mesa nvidia nvidia-utils
- if both intel+nvidia GPUs are enabled and some problems such as external monitor occur, need to disable intel GPU in BIOS, and do not install "xf86-video-intel" package
pacman -S --needed lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings && systemctl enable sddm
pacman -S --needed plasma kde-applications
-- KDE Plasmapacman -S --needed xfce4 xfce4-goodies
-- XFCE
reboot