mkfs.ext4 / dev / sda2
Now, you are ready to mount the partitions and start setting up the system. Assuming your drives are '/ dev / sda1' and '/ dev / sda2, the setting will look like this:
mount / dev / sda2 / mnt
mkidr / mnt / boot
mount / dev / sda1 / mnt / boot
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
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.
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 local time of the system.
ln -sf / usr / share / zoneinfo / America / New_York / etc / localtime
Synchronize your system with hardware clock.
hwclock --systohc
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
locale-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
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
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
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!