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 ovmfpackages 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
iwctldevice listto get wifi device such as wlan0station wlan0 scanstation wlan0 get-networksstation wlan0 connect WIFI_NAMEand input your passwordexitip ato ensure internet is on
- pacman-mirror
vim /etc/pacman.d/mirrorlistto get the right mirrors to the top the filepacman -Syyto update the packages cache
- create partion
lsblkto get the partion listgdisk /dev/sdato do action on /dev/sda device which is the hard drive to install Arch Linux intooif 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 spacewto save andexitto exit the gdisk
- create filesystems and mount them
lsblkto 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 mtoolsgrub-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-namepasswd your-nameEDITOR=vim visudo-- uncomment the "%wheel ALL=(ALL) ALL" line to make your-name use sudo command
- swapfile
fallocate -l 4G /swapfilechmod 600 /swapfilemkswap /swapfilevim /etc/fstaband append line of "/swapfile none swap sw 0 0"
- Last steps before finish
systemctl enable NetworkManagervim /etc/locale.gen-- uncomment "en_US.UTF-8" linelocale-genexitumount -areboot
- login into the new system, and install KDE Plasma
- login, username: root, password: just set previouly
nmtuito 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 sddmpacman -S --needed plasma kde-applications-- KDE Plasmapacman -S --needed xfce4 xfce4-goodies-- XFCE
reboot