Boot up your machine and ensure that the system will attempt to boot from the CD/USB first. Once successful, you should see the Arch Linux boot menu. Select “Boot Arch Linux (x86_64)”.The system will then load. If successful, you will be logged in as root. In the current directory, there will be a file called ‘install.txt’. This document is essential because it contains all of the instructions to install and configure Arch properly. Use ‘less’ to view it.
Next, we need to set up the partitions required. We will create four of them. One for the BIOS boot, one for the ‘/boot’ directory, a swap space, and the main partition where the system will be installed. You can have another partition for directories like ‘/home’ or ‘/usr’ etc, but to keep it simple, let’s use ‘fdisk’ to create the partition.First, find the target drive using ‘fdisk -l’. For my VM installation, it was ‘/dev/sda’ because it was the only one there, apart from the loop device.
If this is a brand new drive or image, it will create a DOS disklabel automatically. This was on my VM installation. If this occurs and you want to use GPT as your partition table, it is easy to change. Simply enter ‘g’ to replace the DOS table with GPT. WARNING, this will get rid of any partitions that were already there. Now we shall create 4 partitions (using the ‘n’ command in ‘fdisk’).
- Let’s create the BIOS boot section, which will take up about 128MB.
- Next, create the ‘/boot’ partition with a size of 128MB.
- Then make a swap partition 1GB in size.
- Finally, create the main partition that will occupy the rest of the drive.
As you will notice, each partition is marked as of the type ‘Linux filesystem’ (code 20). For the first partition, we should change the partition type to be ‘BIOS boot’ (4) (running ‘t’). Use ‘L’ to list the codes to enter for each type. Finally, for the third, we want to change it to be ‘Linux swap’ (19).The other two should remain ‘Linux filesystem’. Once the partitioning is complete, we must enter ‘w’ into fdisk to apply the partitions to the target drive.
Next, the locale settings need to be established. Open ‘/etc/local.gen’ using either ‘vim’ or ‘nano’ and you will see a list of locales. Uncomment the ones you wish to use (remove the ‘#’ at the start of each one), then run ‘locale-gen’ to generate them.Next, you need to set the ‘LANG’ variable in the file ‘/etc/locale.conf’ like this for example (check ‘/etc/locale.gen’ for more options):
$ mkinitcpio -p linux
Next we need to install it to the drive we installed Arch on using ‘grub-install /dev/sdX’. Then finally, create the configuration file using ‘grub-mkconfig > /boot/grub/grub.cfg’.Next, we should install dhcp using ‘pacman -S dhcp’. In the next guide, we will go through how to configure it so the system can have Internet access.