SkillAgentSearch skills...

G14Arch

Arch Linux on Asus ROG Zephyrus G14 (G401II)

Install / Use

/learn @k-amin07/G14Arch
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Table of contents

Arch Linux on Asus ROG Zephyrus G14 (G401II)

Guide to install Arch Linux with btrfs, disc encryption, auto-snapshots, no-noise fan-curves on Asus ROG Zephyrus G14. Credits to Unim8rix, this guide is a fork of their guide.

Screenshot_20240321_020632

Basic Install

Prepare and Booting ISO

Boot Arch Linux using a prepared USB stick. Rufus can be used on windows, Etcher can be used on Windows or Linux.

Networking

For Network i use wireless, if you need wired please check the Arch WiKi.

Launch iwctl and connect to your AP like this:

  • station wlan0 scan
  • station wlan0 get-networks
  • station wlan0 connect YOURSSID

Type exit to leave.

Update System clock with timedatectl set-ntp true

Format Disk

  • My Disk is nvme0n1, check with lsblk

  • Format Disk using gdisk /dev/nvme0n1 with this simple layout:

    • o for new partition table
    • n,1,<ENTER>,+1024M,ef00 for EFI Boot
    • n,2,<ENTER>,<ENTER>,8300 for the linux partition
    • w to save layout

Format the EFI Partition

mkfs.vfat -F 32 -n EFI /dev/nvme0n1p1

Create encrypted filesystem

cryptsetup luksFormat /dev/nvme0n1p2  
cryptsetup open /dev/nvme0n1p2 luks

Create and Mount btrfs Subvolumes

Create btrfs filesystem for root partition

mkfs.btrfs -f -L ROOTFS /dev/mapper/luks

Mount Partitions und create Subvol for btrfs. I dont want home, etc in my snapshots, so create subvol for them.

mount -t btrfs LABEL=ROOTFS /mnt
btrfs sub create /mnt/@
btrfs sub create /mnt/@home
btrfs sub create /mnt/@snapshots
btrfs sub create /mnt/@swap

Create a btrfs swapfile and remount subvols

btrfs filesystem mkswapfile --size ${SWAP_SIZE} /mnt/@swap/swapfile

Replace ${SWAP_SIZE} with the amount of swap space you want. Typically you should have the same amount of swap as RAM. So if you have 16GB of ram, you should have 16GB of swap space. Note that the size in GB is denoted with a G as a suffix and NOT GB.

(Source)

After that, just unmount with umount /mnt/ and remount with subvolumes

mount -o noatime,compress=zstd,space_cache=v2,commit=120,subvol=@ /dev/mapper/luks /mnt
mkdir -p /mnt/boot
mkdir -p /mnt/home
mkdir -p /mnt/.snapshots
mkdir -p /mnt/btrfs

mount -o noatime,compress=zstd,space_cache=v2,commit=120,subvol=@home /dev/mapper/luks /mnt/home/
mount -o noatime,compress=zstd,space_cache=v2,commit=120,subvol=@snapshots /dev/mapper/luks /mnt/.snapshots/
mount -o noatime,space_cache=v2,commit=120,subvol=@swap /dev/mapper/luks /mnt/swap/

mount /dev/nvme0n1p1 /mnt/boot/

mount -o noatime,compress=zstd,space_cache=v2,commit=120,subvolid=5 /dev/mapper/luks /mnt/btrfs/

Check mountpoints with df -Th and enable swap file

swapon swapfile

Install the system using pacstrap

pacstrap /mnt base base-devel linux linux-firmware btrfs-progs nano networkmanager amd-ucode

After this, generate the filesystem table using

genfstab -Lp /mnt >> /mnt/etc/fstab

Add swapfile

echo "/swap/swapfile none swap defaults 0 0" >> /mnt/etc/fstab

Chroot into the new system and change language settings

You can use a hostname of your choice, I have gone with zephyrus-g14.

arch-chroot /mnt
echo zephyrus-g14 > /etc/hostname
echo LANG=en_US.UTF-8 > /etc/locale.conf
echo LANGUAGE=en_US >> /etc/locale.conf
ln -sf /usr/share/zoneinfo/Asia/Karachi /etc/localtime
hwclock --systohc

Modify /etc/hosts and add these entries. For static IPs, remove 127.0.1.1. Replace zephyrus-g14 with your hostname.

127.0.0.1		localhost
::1				localhost
127.0.1.1		zephyrus-g14.localdomain	zephyrus-g14

Edit /etc/locale.gen and uncomment the following line

en_US.UTF-8

Execute locale-gen to create the locales now

Add a password for root using passwd root

Add btrfs and encrypt to Initramfs

Edit /etc/mkinitcpio.conf and add encrypt btrfs to hooks between block/filesystems.

HOOKS="base udev autodetect modconf block encrypt btrfs filesystems keyboard fsck

Also include amdgpu in the MODULES section and run mkinitcpio -P

Install Systemd Bootloader

bootctl --path=/boot install installs bootloader

Edit the bootloader config using nano

nano /boot/loader/loader.conf

Replace the existing text with the following lines.

default	arch.conf
timeout	3
editor	0

Then, replace the contents of /boot/loader/entries/arch.conf with the following

title	Arch Linux
linux	/vmlinuz-linux
initrd	/amd-ucode.img
initrd	/initramfs-linux.img

Finally, copy boot-options with

echo "options	cryptdevice=UUID=$(blkid -s UUID -o value /dev/nvme0n1p2):luks root=/dev/mapper/luks rootflags=subvol=@ rw" >> /boot/loader/entries/arch.conf

Blacklist Nouveau

Edit /etc/modprobe.d/blacklist-nvidia-nouveau.conf using nano and add the following lines to it

	blacklist nouveau
	options nouveau modeset=0

Leave Chroot and Reboot

Type exit to exit chroot and unmount all the volumes using

umount -R /mnt/

and reboot the system.

Finetuning after first Reboot

After a successful reboot, we will perform some necessary initial setup.

Enable Networkmanager

To connect to WiFi using nmcli, enable the network manager

systemctl enable NetworkManager
systemctl start NetworkManager
nmcli device wifi connect YOURSSID password SSIDPASSWORD

Install Zsh

I prefer zsh as my default shell. Install it with pacman if not already installed

sudo pacman -S zsh zsh-completions

Create a new user

Create a new local user, add it to relevant groups and point it to zsh.

useradd -m -g users -G wheel,power,audio -s /usr/bin/zsh MYUSERNAME
passwd MYUSERNAME

Now enable root access for the user by adding it to sudoers. Edit /etc/sudoers and uncomment

`%wheel ALL=(ALL) ALL`

Now exit and relogin as the newly created user.

Update the system

Ensure that the system is up to date by running

sudo pacman -Syu

Install acpid and dbus and reboot the system.

sudo pacman -S acpid dbus 
sudo systemctl enable acpid

Install a Desktop Environment

Get X.Org and KDE Plasma

Install xorg and kde packages. I prefer wayland over X, however, it is a good idea to have X installed as well.

sudo pacman -S xorg plasma plasma-workspace sddm 

Enable SDDM login manager

sudo systemctl enable sddm

Reboot and login to your new Desktop.

Oh-My-ZSH

I like to use zsh with oh-my-zsh with Powerlevel10K theme. To install that, first install the required dependencies.

sudo pacman -S git curl wget

Get the necessary fonts

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mkdir .local/share/fonts
cd .local/share/fonts
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
fc-cache -v

Clone Powerlevel10K repo

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc

Run zsh and it should prompt you to set up the `Powerl

View on GitHub
GitHub Stars89
CategoryDevelopment
Updated16d ago
Forks13

Languages

Shell

Security Score

80/100

Audited on Mar 19, 2026

No findings