To start off we need to download the Arch ISO. The ISO is the packaged version of the OS which will allow you to burn it on a USB drive and then also install packages from it. To do so, go to archlinux.org/download and select the download closest to your country. I will be using http://mirrors.aggregate.org/archlinux/iso/2016.06.01/ and will download the file entitled
Next, we need to prepare a USB device. There are a few ways to do this but if you are on Windows I would recommend Win32 disc imager from SourceForge. On SourceForge there is a video you can watch instructing you how to properly install the ISO to the USB drive. If you are on Linux you can do a GUI install with the
gnome-diskspackage. There are others ways to do it but these are the most convenient.
Now you need to boot from the USB drive by entering your BIOS. Every computer has a unique way of entering the BIOS. Typically you mash the delete key when powering on your PC. Once in your BIOS you will need to find a boot priority setting and move the USB drive to the top of the list. Now that you have booted from the USB drive we are ready to enter the installation process.
Once you've booted with your USB device through the BIOS, you should be confronted with this screen:
Now that you’re here, you need to decide if you want a 64 bit installation (Boot Arch Linux x86_64) or a 32 bit installation (Boot Arch Linux i686). I will be using the 64 bit version and after you select your choice you will end up with this:
For the rest of the installation connect to Ethernet. Using Ethernet is significantly easier than connecting to the internet wirelessly during this time. Go ahead and type
This will tell you if you are connected to the internet by checking your connection with Google. Assuming you are we will move on.
ping -c 3 google.com
Now we want to locate a drive for the installation. To do so run
We see that Disk
/dev/sdais a clean 30GB drive ready for installation. Now we are going to mount our drive. To do so run
and then perform
If you encounter an error indicating that the drive is in a read-only mode, chances are you need to format (completely erase) the drive. By doing so you will lose all data so be aware of that. To do this type
mount /dev/sda /mnt
/dev/sdawith the above command.
Next we need to specify a
mirrorlistto download packages. Go ahead and run
and you should see this:
Now you need to pick a server from the list. I'll be using the US server
Server = http://arch.localmsp.org/arch/$repo/os/$archSimply type this at the top of the list and exit by pressing
Control X. Now run
This will update your package list and allow you to install the most updated software.
Next we want to install the system. This step is very easy. Simply execute
In this command it is required to install the
pacstrap -i /mnt base base-devel
base-develis optional however. I am going to install it as it provides some packages I might need later down the road. Just press enter to select the packages and the installation process will begin.
Depending on your Internet connection speed this could go very quickly or quite slowly. In my case the file's size is roughly 800 MB so this could take some time. During the installation it will likely suggest 'recommended' packages for the ones it is downloading. You are not required to download any of them but do note that for some software you may download later these recommended package may contain necessary files to later implement a feature.
Now we need to create our File System table, or
Fstab. This file is very important and instructs the computer on how to run your partitions and drives. To create this file run
It is usually not necessary, but in the future you can edit this file with
genfstab -U -p /mnt >> /mnt/etc/fstab
nano /mnt/etc/fstabbut please know it should be ready to go and not require any additional setup.
If you get a Locale error while performing the pacstrap command do not worry. A locale error pertains to your operating system’s encoding and language. To get started we need to run
which allows us to start actually editing our new system. Now, go ahead and create our locale files by issuing
Once in the file you should see a long list of locales which looks something like this:
In this case I will be using the ,
en_US.UTF-8locale which requires you to scroll down and remove the ‘#’ in front of the locale. The ‘#’ tells the computer to ignore this line of code.
Continue by pressing
Control Xto save the changes. If, for example, your primary language is English and you live in the United States, then you should create a
locale.conffile (the following commands will place it in the correct location) with these commands
echo LANG=en_US.UTF-8 > /etc/locale.conf
If you speak a different language change this command with your locale of choice. You may also need to run
locale-genif the error persists but it might not be necessary for you.
Now we are also going to set the time/timezone. Run
to see a list of available times. Since I live in America, I will execute
I live in Los Angeles so I will be selecting the
Los_Angelesoption. To do this run
Then set the clock to your timezone with
ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
This creates a system link to your system's time and you should be ready to go.
hwclock -–systohc –-utc
Now we are going to enable our networking service. This process is fairly simple and works really well. We will use
systemctlto enable and add the process to startup for us. Simply run
Now we are going to configure Pacman, the tool you’ll be using to install all your packages. Run
systemctl enable dhcpcd.service
and look around. If you want to install Skype at one point enable the
Control Xagain to save. If you are into easter-eggs, add
IloveCandyunder the above
[options]field. This will make Pacman appear instead of a bunch of #'s when installing a package. Finish this up by running
and you're done with Pacman.
You probably don't want to continuously use the root account so now we are going to create a user with
sudocommand allows a normal user to execute software with root permission. First change/set the root user’s password by running
Please note that your password will not appear while entering it so do not worry. This is a standard Linux security feature created to protect your passwords.
Now we want to create a typical user. I will create the user alex by running
then I will set my password with
useradd -m -g users -G wheel,storage,power -s /bin/bash alex
With our new user we want the ability to run root commands. We are now going to install and configure
sudo. To install
Now we want to edit the
pacman -S sudo
sudofile by running
Scroll down until you find the wheel group.
Control Xto leave and you now have sudo available for your users.
Now we want to add a bootloader. I am going to use Grub as it’s my favorite and easy to setup. Install Grub with
Now to install it run
pacman -S grub-bios
in some cases you may need to add
grub-install –-target=i386-pc –-recheck /dev/sda
-forcein the grub install otherwise it may fail. Next specify the locale doing
If you have another Operating system, run
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
to get a boot entry in grub. Finally, run
pacman -S os-prober
Finally leave the chroot by typing
grub-mkconfig -o /boot/grub/grub.cfg
then unmount your drive with
Now go ahead and reboot. At this point remove your USB device.
Continued in the 2nd part.
by Alex Gaudino, Owner of HTML High 5