How to Install Arch Linux27 January, 2021written by Bill

I have an old Laptop, it has 4GB of RAM and low spec CPU. So I decided to put Arch Linux in it. I was a bit struggle with the installation steps (I'm using Manjaro though :D) but I successfully installed it.

The installation steps is actually explained very well on arch linux official website. But in this post, I just want to share what I've done and maybe it'll be usefull for you in case you also want to try to install Arch Linux.

Let's get started

First, you need to download the ISO file from the Download page. I was using USB flash drive, please refer to Pre-installation section for more details. Be sure to disable Secure Boot on your machine, because Arch Linux installation images do not support Secure Boot.


I assume you've already logged in on the live environment. You need to connect to the internet to be able to install the packages, check set up a network connection in the live environment for the details.

Through the virtual console, set up the system time and date by typing timedatectl set-ntp true. Then we need to set up our Partitions. I'm using LVM in this example, so feel free to choose your own Partition type.

  • Partition the disks

    Select the block device, in this case X is an example like /dev/sdb, /dev/sdc, it might be different on your system.

    # lsblk              <== to identify a block device
    # fdisk /dev/sdX     <== don't forget to change the X
    n (to add a new partition)
    p (for primary partition)
    1 (default partition number)
    (accept default start)
    (accept default end)
    t (to change partition type)
    8e (for LVM partition when using MBR)
    i (to verify)
    w (save and quit)
  • Create LVM partition

    After you finished set up the partition, we need to create our LVM disk layout. I have 500GB of storage available, I'll use all of it as a single boot (Linux only). Run the following command step by step. (Again, don't forget to change the X)

    # pvcreate /dev/sdX1               <== create physical volumes
    # vgcreate vg1 /dev/sdX1           <== create volume groups (vg1 is my group name, you can change it)
    == Create logical volumes ==
    # lvcreate -L 260M -n boot vg1     <== 260MB of /boot mount point
    # lvcreate -L 100G -n root vg1     <== 100GB of /root system
    # lvcreate -L 4G -n swap vg1       <== 4GB of swap
    # lvcreate -l 100%FREE -n home vg1 <== the rest of available storage after allocation as /home partition
    == Format the partitions ==
    # mkfs.ext4 /dev/vg1/boot
    # mkfs.ext4 /dev/vg1/root
    # mkfs.ext4 /dev/vg1/home
    # mkswap /dev/vg1/swap
    # swapon /dev/vg1/swap
    == Mount the file systems ==
    # mount /dev/vg1/root /mnt
    # mkdir /mnt/boot
    # mount /dev/vg1/boot /mnt/boot
    # mkdir /mnt/home
    # mount /dev/vg1/home /mnt/home
  • Install packages

    We're ready to install our essential packages. Since we're still in the virtual console of the live boot environment, pacstrap is the only tool we have to install packages. Run the following command and wait until it finished.

    # pacstrap /mnt base base-devel vi lvm2 dhclient dhcp dhcpcd linux linux-firmware mkinitcpio
  • Configure the system

    We're almost finished, next step is go through the following steps and you'll safe.

    # genfstab -U /mnt >> /mnt/etc/fstab
    # arch-chroot /mnt /bin/bash
    # locale-gen
    # vi /etc/locale.gen
    LANG=en_US.UTF-8      <== uncomment this
    # tzselect
    # ln -s /usr/share/zoneinfo/Zone/SubZone /etc/localtime   <== change your zone
    # hwclock --systohc --utc
    # vi /etc/mkinitcpio.conf
    HOOKS="...lvm2 filesystems..."    <== put lvm2 inside HOOKS
    # mkinitcpio -p linux
    # pacman -S grub
    # grub-install --target=i386-pc /dev/sdX   <== change the X
    # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug     <== (optional) if you use efi boot mode
    # grub-mkconfig -o /boot/grub/grub.cfg
    # vi /etc/hostname
    # pacman -S iw wpa_supplicant dialog
    # passwd    <== set up root password
    # umount /run/lvm

Finally, we need to exit the chroot environment (remember arch-chroot /mnt /bin/bash command above) by typing exit or pressing Ctrl+d. Then unmount all the partitions with umount -R /mnt and restart the machine by reboot command. We're successully installed Arch Linux. The next step is choose your Graphical user interface maybe like GNOME, KDE, etc. If you have problems with the installation steps, feel free to hit me up or refer to Arch Linux installation guide.


Reading Time4 min

© Repodev - Muh Ibnu Habil Hanafi