- Download the ISO from https://archlinux.org/download/
- Create a live USB of Arch Linux, boot from the live USB
- See https://wiki.archlinux.org/title/USB_flash_installation_medium for details
- To boot Surface Pro from USB, press and hold the volume-down button. Press and release the power button until the Surface logo appears on screen.
- Connect to Wifi
- list network interface, enter
iwctl
interactive prompt$ ip link $ iwctl
- list all Wi-Fi devices, find the wireless device name
$ device list
- scan for networks, list all available networks, and finally, connect to a network
$ station device scan $ station device get-networks $ station device connect SSID
- check the internet connection
$ ping archlinux.org
- list network interface, enter
- Partition the disks
- List all the disk and partitions, select the disk for formatting and partitioning
$ fdisk -l $ fdisk /dev/nvme0n1
- Create an ESP partition (For UEFI systems only):
- enter
n
, it will ask you to choose a disk number, enter 1. Stay with the default block size, when it asks for the partition size, enter+512M
- change the type of the EFI partition to EFI System by enter
t
, enterL
to see all the partition types available and then enter its corresponding number to the EFI system
- enter
- Create root partition (no swap, no home)
- enter
n
to create a new partition. It will automatically give it partition number 2. Keep on pressing enter to allocate entire remaining disk space to the root partition.
- enter
- Finally, enter
w
command to write the changes and exit out offdisk
command
- List all the disk and partitions, select the disk for formatting and partitioning
- Create filesystem
- with two disk partitions (
nvme0n1p1
andnvme0n1p2
), create a FAT32 file system and create an Ext4 filesystem on the root partition$ mkfs.fat -F32 /dev/nvme0n1p1 $ mkfs.ext4 /dev/nvme0n1p2
- with two disk partitions (
- Install Arch Linux
- mount Arch Linux on the root directory and install the packages
$ mount /dev/nvme0n1p2 /mnt $ pacstrap /mnt base linux linux-firmware vim sudo #add more if needed
- mount Arch Linux on the root directory and install the packages
- Configure Arch Linux
- define how disk partitions, enter the mounted disk as root
$ genfstab -U /mnt >> /mnt/etc/fstab $ arch-chroot /mnt
- set up timezone
$ timedatectl list-timezones $ timedatectl set-timezone America/Chicago
- set up
Locale
- edit the flie
/etc/locale.gen
, uncommenten_US.UTF-8
. - generate the locale config
$ locale-gen $ echo LANG=en_US.UTF-8 > /etc/locale.conf $ export LANG=en_GB.UTF-8
- edit the flie
- set up network
- create
/etc/hostname
file and set the hostname (e.g. Camus)$ echo Camus > /etc/hostname $ touch /etc/hosts
- edit
/etc/hostname
by adding the following lines127.0.0.1 localhost ::1 localhost 127.0.1.1 Camus
- create
- set up bluetooth
- install
bluez
and enable the service$ pacman -S bluez bluez-utils $ systemctl bluetooth.service
- install
- set up root password
$ passwd
- define how disk partitions, enter the mounted disk as root
- Install Grub bootloader
- make sure that you are still using arch-chroot to perform the following commands
$ pacman -S grub efibootmgr $ mkdir /boot/efi $ mount /dev/nvme0n1p1 /boot/efi $ grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi $ grub-mkconfig -o /boot/grub/grub.cfg
- make sure that you are still using arch-chroot to perform the following commands
- Install desktop environment
- install X environment
Xorg
$ pacman -S xorg
- install GNOME and enable the display manager
$ pacman -S archlinux-keyring $ pacman -S gnome $ systemctl start gdm.service $ systemctl enable gdm.service $ pacman -S networkmanager $ systemctl enable NetworkManager.service
- install KDE Plasma
$ pacman -S xorg plasma plasma-wayland-session
- install X environment
- Create a sudo user
- create a home directory for the new user (e.g. Sicheng), setup password
$ useradd -m Sicheng $ passwd Sicheng
- give the user sudo access
$ EDITOR=vim visudo
- add the following line, save and exit
Sicheng ALL=(ALL) ALL
- add the following line, save and exit
- create a home directory for the new user (e.g. Sicheng), setup password
Finally, exit from chroot, restart the system.
Tip
- For KDE Plasma DE, disable
baloo file extractor
can free up CPU and memory$ balooctl monitor
- Install
linux-surface
kernel to enable touch screen. Seehttps://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup#Arch.
Back to Memo