Home Linux Instructions for installing basic Arch Linux

Instructions for installing basic Arch Linux

0 comment 145 views
Instructions for installing basic Arch Linux
Instructions for installing basic Arch Linux

Unlike Ubuntu or Linux Mint, Arch Linux is a distributed Linux distribution in a continuous format (Rolling release). This means you only need to install once and keep getting the latest version updates. It is also a barebone distribution that gives complete control over what you want to install on your system.

This article will guide you through the basic steps of installing Arch Linux. One thing to note is that the installation of Arch Linux is a bit complicated, you need to carefully follow the instructions below

Before installing Arch Linux, you need to download the ISO file and burn it to a USB drive or DVD.

Step 1 . Visit the download page of Arch Linux at the address below and download the ISO file (in the HTTP Direct Downloads section).

https://www.archlinux.org/download/

Step 2 . Using a bootable USB creation software , create a USB boot .

Step 3 . After creating the USB boot, plug in the computer and start it.

Note : To install Arch Linux, you should use a wired network because the wireless connection requires more configurations not covered in this tutorial.

Initial setting

Choose to boot into Arch in the initial boot menu, usually the first option. You will be taken to the Command prompt and logged in as root.

Instructions for installing basic Arch Linux
Instructions for installing basic Arch Linux

To get started, make sure the clock is on time with the following command:

timedatectl set-ntp true

Hard drive configuration

It’s time to set up your hard drive . There are several ways to configure the hard drive, but using cfdisk is the simplest way.

cfdisk

If the hard drive does not have a partition table, you will be asked to set up a table. Choose DOS although this is not the latest option but easier to work with.

  • Advantages and disadvantages of hard drive partitioning

Next, you will see the hard drive partition table or free space listed. If your hard drive has been partitioned, you can skip this step and go to the next step. If you want to repartition, select them and select Delete at the bottom of the screen.

Select the free space you want to create the partition, then select New at the bottom of the screen, press Enter . Then enter the partition size you want to use. Repeat these steps for each partition. If you are unsure of the partition size, you can create a 512MB partition for / boot and use the remaining disk space for root (/).

When finished, select Write from the bottom menu. Enter yes to confirm changes. Click qto exit.

Create file systems for your new partitions. In fact, this part is very easy, you just need to run the following commands, assuming your drive is “/ dev / sda.”.

mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2

Mount partition

Now, you are ready to mount the partitions and start setting up the system. Assuming your drives are “/ dev / sda1” and “/ dev / sda2, setup will look like this:

mount /dev/sda2 /mnt
mkidr /mnt/boot
mount /dev/sda1 /mnt/boot

Set up the basic system

You can edit the mirror list of CDs here to select the latest downloaded mirrors. This operation is not really necessary and can be time consuming. If you want to do this, leave the mirrors closest to you at the top of the list. “/Etc/pacman.d/mirrorlist.

Use the pacstrap utility to boot your system on a newly mounted drive.

pacstrap / mnt base

This process will take some time, you don’t need to worry because the basic Arch will set up for you. When the process is complete, you can create Arch’s fstab file. This file will monitor file systems (partitions) to mount to the system.

genfstab -U /mnt >> /mnt/etc/fstab

Set up inside the new system

It’s time to switch to the new Arch system by changing the root (chroot) into the system. Chroot is a way to “piggyback” a Linux system onto another running system. Arch has a tool to implement this process. 

arch-chroot /mnt

As soon as you press Enter , the command prompt will change to reflect your new location in the Arch settings.

Set time zone

Next, you need to set the time zone for the system. You need to look at “/ usr / share / zoneinfo” to determine your region and city, then link it to the system’s local time.

ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

Synchronize your system with hardware clock.

hwclock --systohc

Language setting 

You will need to set up the language and everything else related to it correctly. Open /etc/locale.gen and do not take notes (by deleting # in front of the line) the location you choose.

Run the following command to create your location

local - gen

Create a file at /etc/locale.conf and place the location you selected in this file as the example below.

LANG = en_US . UTF - 8

Network setup 

Next we will configure the basic network. You will first install the hostname of the computer in / etc / hostname.

yourhostname

Add the hostname to the “/ etc / hosts” file so your computer can link to itself.

127.0.0.1 localhost
::1 localhost
127.0.0.1 yourhostname

Finally, in order to have a network connection when booting, enable DHCP service at startup.

systemctl enable dhcpcd

Set up user accounts

From the beginning, you’re working as a root user. For security, change the root user password by running the passwd command and entering a new password.

passwd

Next, you need to create user accounts for daily use.

useradd -m -G users,audio,input,optical,storage,video -s /bin/bash username

Providing a new password performs as root user but needs to specify the username in the passwd command.

passwd username

System task

You will need to create an initramf for your system to handle some common tasks like LVM, disk encryption and RAID.

mkinitcpio -p linux

Before restarting, install the bootloader, GRUB with Pacman.

pacman -S grub

Install GRUB on your hard drive so it can boot before Arch.

grub-install --target=i386-pc /dev/sda

Finally, set up GRUB’s configuration on the “/ boot” partition.

grub-mkconfig -o /boot/grub/grub.cfg

When done, type exit to exit chroot. Disconnect your partitions and reboot into Arch.

exit 
umount - R / mnt
Reboot

I wish you all success

Leave a Comment

Tips and Tricks

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More