First of all, I must say that I was referring OSTechNix for the installation guide.

But when I tried to install, I faced some minor issue, that's why I write this post. Also, I not follow everything from the guide (but most of the things)

Partition the disk

Just follow OSTechNix guide - Step 3: Partition Hard drive to create partitions.

If you don't want to use double of your RAM size to create the swap, you can refer to this.

Install base system

Mount the disk

1
2
3
$ mount /dev/sda1 /mnt
$ mkdir /mnt/home
$ mount /dev/sda5 /mnt/home

Install

1
2
3
# this step refer https://wiki.archlinux.org/index.php/Installation_guide
$ pacstrap /mnt base linux linux-firmware
$ genfstab -U /mnt >> /mnt/etc/fstab

Initial setup to the installed system

1
2
3
4
5
6
7
8
9
$ arch-chroot /mnt
$ pacman -S vim dhcpcd
$ vim /etc/locale.gen
$ locale-gen
$ vim /etc/locale.conf

# set your own timezone
$ ln -s /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime
$ hwclock --systohc --utc

Set root password

1
$ passwd

Set the hostname

1
$ vim /etc/hostname

Here I put my name as hostname

1
js

Set the hosts file

1
$ vim /etc/hosts

with content

1
2
3
127.0.0.1   localhost
::1 localhost
127.0.1.1 js.local js

Then setup network

1
$ systemctl enable dhcpcd

Install GRUB bootloader

1
2
3
$ pacman -S grub os-prober
$ grub-install /dev/sda
$ grub-mkconfig -o /boot/grub/grub.cfg

(For UEFI mode, refer this post)

Setup WiFi

If reboot the system now, you won't be able to connect to internet.

To setup WiFi connection, refer to this post

Reboot

Now let's exit from the system

1
$ exit

Unmount the disks

1
2
3
$ umount /mnt/home
$ umount /mnt
$ reboot

Post installation

After reboot, should be able to enter the system. Login as root

Let's update the package list

1
$ pacman -Syu

Add normal user account

I create an account, js

1
$ useradd -m -g users -G wheel,storageower -s /bin/bash js

Set the password

1
$ passwd js

Install sudo package

1
$ pacman -S sudo

Now, before we can add js to sudo, must create a symlink for vim (vi is not pre-installed in Arch)

1
$ ln -s /usr/bin/vim /usr/bin/vi

Then edit the sudoers file (/etc/sudoers)

1
$ visudo

Just uncomment this line

1
%wheel ALL=(ALL) ALL

Now, let's try login with js. Exit the root first

1
2
3
4
$ exit

Login: js
Password:

Install GNOME desktop environment

Now logged in as js, we need root privilege to install package

1
2
3
4
$ sudo pacman -S xorg xorg-server
$ sudo pacman -S gnome
$ sudo systemctl start gdm.service
$ sudo systemctl enable gdm.service

Reboot it.

1
$ sudo reboot

DONE

References: