We’ve all strugled with installing Linux systems from scratch such as Arch or Gentoo, specially the first time we do so.
Up next is the most basic Arch Linux install you can achieve on a system without things breaking. While using an UEFI partition of course.
Requirements
Before anything starts you need to have an USB Drive with the Arch ISO on it. You can use whatever tool you want for this, including but not exclusively: Etcher, UNetbootin or even LiLi.
In case you’re doing this on a virtual machine, just have the ISO on hand as the virtualizer will need it.
Formatting
First off, boot the machine with the ISO or the USB drive.
You should take into account that this is going to format the drive on the machine you’re booting. I’ll say it again:
Caution, the following commands will erase the drive you’re using for the install, any data inside of them might be unrecoverable.
EFI Partition
After the machine has been booted we’ll be presented with a prompt, from there we can use gdisk
to do the disk formatting. In this case you’re presented with the drive /dev/sda
gdisk /dev/sda
From gdisk delete any content that might be on the drive:
o
Create a new partition, in this case the EFI partition which will allow you to boot the machine with UEFI:
n
Press enter until you’re prompted with the size of the "Last Sector" and input the following:
+512M
Then select the type of filesystem that will be on the partition, since this is an EFI partition the code is:
EF00
Boot Partition
Afterwards we just create the main root partition for the system install:
n
To write these changes just press:
w
These steps will create two partitions:
- /dev/sda1 -> EFI Partition
- /dev/sda2 -> Root Partition
Filesystem
After the partition table has been created you can define the filesystems for the installation, for the EFI partition you need a vFAT filesystem, you can define it as follows:
mkfs.vfat /dev/sda1
As for the root partition, lets run things a little classic with ext4:
mkfs.ext4 /dev/sda2
Then mount them for the OS install, the /boot directory is created so the EFI has a place to be mounted on:
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
Actual Installation
The fun part, you first need to select a mirror, the pacman repos have a lot of mirror worldwide, you can select the one that suits you the most, I won’t go into detail on how to decide since it depends on a lot of factors. Usually the one within your own country or the one closest to you should work best. You can find the repo list and edit it with:
vi /etc/pacman.d/mirrorlist
Strap it!, you can install the actual OS with the following command:
pacstrap /mnt base base-devel
This step will take a bit, depending on the type of drive you’re installing to, the speed of the machine and the speed of the USB drive, go and grab a cup of cofee on the meantime.
It’ll be done soon enough, you still need to install the bootloader for the machine to be able to boot into your new and shiny Arch installation.
Installing the bootloader
Installing the bootloader is pretty straightforward, in the case of Arch it’s kind of more hands-on than the other more user-friendly Linux distros such as ubuntu or other Arch derivatives such as Mandriva but it’s not as hard the old days… anyhow:
arch-chroot /mnt
bootctl install
And edit the bootloader’s configuration file with: vi /boot/loader/loader.conf
and just leave the following entries (delete everything else):
default arch
timeout 4
For the final bootloader configuration we need to get the PARTUUID for the partition, do this with blkid
and set it up on the entry for the Arch boot:
vi /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=PARTUUID="YOUR_/dev/sda2_PARTUUID" rw
Again, YOUR_/dev/sda2_PARTUUID = The PARTUUID you got from the command: blkid
Finishing up
For the final step, and as a recommendation to avoid future lack of basic software components, just install some basic dependencies for the machine:
pacman -S linux linux-headers linux-firmware netctl dhcpcd mkinitcpio wpa_supplicant
aaaaaaaand reboot:
reboot
There you go. You just installed a base Arch system, now go ahead and hack it up so it resembles whatever you want and whatever you want to use it for.
Good luck!
Spot on with this write-up, I actually feel this website needs a lot more attention. I’ll probably be
back again to read more, thanks for the advice!
I just like the helpful info you provide to your articles.
I will bookmark your blog and take a look at again here frequently.
I’m somewhat certain I’ll be told many new stuff right here!
Good luck for the next!
Like!! Really appreciate you sharing this blog post.Really thank you! Keep writing.
Can I simply say what a comfort to uncover someone who actually knows what they are talking about online.
You certainly realize how to bring an issue to light and
make it important. More people should check this out and understand this side of
the story. I was surprised that you are not more popular given that you surely have the gift.
Excellent post. I was checking continuously this blog and I’m impressed!
Very useful information particularly the last part 🙂 I care for
such information much. I was seeking this certain information for a
long time. Thank you and good luck.
Hello, this weekend is good in favor of me, as this point in time i am
reading this great educational post here at my residence.
Touche. Sound arguments. Keep up the great work.
Hello there! This is my first comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading
your blog posts. Can you recommend any other blogs/websites/forums that
deal with the same topics? Thanks for your time!
Valuable information. Lucky me I found your website
by chance, and I am surprised why this coincidence didn’t took place
in advance! I bookmarked it.
Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to far added agreeable from you! By the way, how can we
communicate?
A motivating discussion is definitely worth comment.
I believe that you need to publish more on this issue, it may not be a taboo matter but generally folks don’t speak about these topics.
To the next! Many thanks!!
If some one needs expert view about running a blog after that i recommend him/her
to visit this web site, Keep up the nice job.
I read this post completely on the topic of the comparison of newest and earlier technologies, it’s awesome article.
Hi, I think your blog might be having browser compatibility issues.
When I look at your blog site in Firefox, it looks fine
but when opening in Internet Explorer, it has some
overlapping. I just wanted to give you a quick heads up! Other then that,
terrific blog!
You made some decent points there. I looked
on the web for more information about the issue and found most individuals will go
along with your views on this website.
Great blog here! Also your website loads up fast! What web host are you using?
Can I get your affiliate link to your host? I wish my website
loaded up as fast as yours lol
Now I am going away to do my breakfast, afterward having my breakfast coming over again to read additional news.
This article presents clear idea for the new viewers of blogging, that genuinely how
to do blogging and site-building.
It’s enormous that you are getting ideas from this post as well
as from our discussion made here.
Hey! I know this is kinda off topic but I was wondering if
you knew where I could find a captcha plugin for my comment form?
I’m using the same blog platform as yours and I’m having difficulty finding one?
Thanks a lot!
Hey There. I found your blog using msn. This is an extremely well written article.
I’ll be sure to bookmark it and return to read more of your useful info.
Thanks for the post. I will certainly comeback.
I think that what you posted made a bunch of sense.
However, consider this, suppose you typed a catchier title?
I mean, I don’t wish to tell you how to run your blog, but suppose you added
a post title that grabbed people’s attention? I mean Installing
Arch Linux base (with UEFI inside!) » Vectops is a little plain.
You ought to peek at Yahoo’s front page and note how they create news titles to grab people to click.
You might add a video or a related pic or two to grab readers interested about everything’ve
got to say. In my opinion, it would bring
your posts a little livelier.
Generally I don’t read post on blogs, but I wish to say that this write-up very forced me to try
and do it! Your writing taste has been surprised me. Thank you, very nice article.
constantly i used to read smaller posts that also clear their motive,
and that is also happening with this post which I am reading at
this place.
Hey there! Would you mind if I share your blog with my zynga
group? There’s a lot of people that I think would really appreciate your content.
Please let me know. Many thanks
This is a very good tip especially to those
fresh to the blogosphere. Brief but very accurate
information… Many thanks for sharing this one. A must read article!
Everything is very open with a precise description of the challenges.
It was truly informative. Your site is useful. Thanks for sharing!