How To 

How to Install Arch Linux with UEFI

First of all I will give the reasons why would someone choose Arch Linux over an other distro. Installing Arch Linux is a kinda difficult task when you atempt to do it for your first time especially if you are not familiar with linux and generally with command line. Managing to install Arch Linux will give you a very good insight on how linux works. Arch linux is a minimal installation, you won't have unnecessary packages/drivers or whatever preinstalled. You choose the shape you need for your OS and its purpose. So let's get started the guide I am posting here is a bit simplified and assembled from many sources from wikis,forums and me and it's only for UEFI motherboards.

sources: ArchWiki,Wikipedia,me

1. Download the latest iso of Arch from Arch Linux and burn it to a bootable media like a cd or dvd. Boot with the installation media.

2. Select Arch Linux archiso x86_64 UEFI CD you will be now prompted into a command line black screen

3. Use the command
Code:
efivar -l
if the output is normal and lists the uefi variables properly then you have booted in UEFI mode

4. Now we need to establish internet connection. If you are using a wired connection type
Code:
ping -c 3 www.google.com
if you are getting response then you are connected.

For wireless connection type :
Code:
iw dev

Output should be :
phy#0
        Interface [b]wlp3s0[/b]
         ifindex 3
                wdev 0x1
                addr 00:21:6a:5e:52:bc
                type managed

The letters in bold should be the name of your wifi device
Then type
Code:
ip link set wlp3s0 up
And
Code:
wifi-menu wlp3s0

Plz note that wlp3s0 may have a different name in your pc or notebook.
Again type type
Code:
ping -c 3 www.google.com
if you are getting response then you are connected.

5. Partitioning this is maybe the hardest part for new users which are not used to using command line partitioning tools. I personally use gdisk , it's an Fdisk equilevant for GPT (GUID partition Table) which you need for UEFI boot. Partitioning is a personal choice but I will give these numbers as examples.

-Type: gdisk /dev/sda
-Type: o //This will create a new empty GUID partition table and destroy all your data and overwrite existing partitions

So now we need to create 4 partitions. the "/" partition also known as root, the /home partition the /var partition and the /boot partition.

(optional)Type
Code:
help
if you want to see the list of commands of gdisk.

For this partitioning example we gonna create an 20 GiB root partition
a 15GiB /var partition
a 1024MiB partition for /boot #boot is where the bootloader gonna be installed
and the rest space goes to /home #home is where you store your music/vidoes/files etc
Modern systems have a lot of ram. If you have 4 gigs of ram you won't be needing any swap (aka virtual memory) So I skip creating a swap for this tutorial.

So type "n" to create a new partition. When asked for type of partition use the code 8300, which means linux file system. Only for the /boot partition you will create use the code EF00. When asked about sectors just hit enter and leave it use its deffaults. In the end type "p" to see what you've made the output should be:

Code:
 Number Size        Code
            1          20Gib     8300
            2          15Gib     8300
            3          1024MiB EF00
            4          ~~GiB     8300           <----------- by ~~ I mean the size left for /home partition
            5          1007KiB 8300           <----------- don't worry about this one it will be created automatically

Please remember the number column from this table because it represents the name of your partitions. For example Root is @ /dev/sda1 /var is @ /dev/sda2 etc

If you are happy and satisfied with the partitions you made type "w" to make the changes final.
Exit gdisk.

6. Create filesystems

For all partitions except /boot we will use the ext4 file system. Type :

Code:
mkfs.ext4 /dev/sda1
          mkfs.ext4 /dev/sda2
          mkfs.ext4 /dev/sda4
          mkfs.fat -F32 /dev/sda3       <----- the /boot partition needs to be Fat32

7. Mounting partitions

Type
Code:
mount /dev/sda1 /mnt
                  mkdir /mnt/home
                  mount /dev/sda4 /mnt/home
                  mkdir /mnt/var 
                  mount /dev/sda2 /mnt/var
                  mkdir /mnt/boot
                  mount /dev/sda3 /mnt/boot

                 pacstrap -i /mnt base    <--------------- this will instal the base system gonna take some time
                 genfstab -U -p /mnt >> /mnt/etc/fstab


8. Configuring the System

Type : arch-chroot /mnt

8.1 Creathing the locale file

Type : nano /etc/locale.gen
This will enter you into a simple text editor, uncomment (remove the #) from the lines you want from example I use #en_US.UTF-8 UTF-8

Save and exit the file and then again at the command line type : locale-gen
and then:
Code:
 echo LANG=en_US.UTF-8 > /etc/locale.conf
           export LANG=en_US.UTF-8

8.2 Console font and keymap
Type
Code:
 loadkeys de-latin1
 setfont Lat2-Terminus16
To make them available after reboot, edit vconsole.conf (create it if it does not exist):
Type: nano /etc/vconsole.conf

and then change the values to:
KEYMAP=de-latin1
FONT=Lat2-Terminus16

8.3 Hostname
Choose your hostname, that's the name of your machine
Type:
echo myhostname > /etc/hostname

replace myhostname with your desired name.

8.4 Set the root password

Type: passwd

9. Install and configure a bootloader

As we are doing an UEFI installation of archlinux we gonna use Gummiboot as our boot manager.

Type
Code:
   mount -t efivarfs efivarfs /sys/firmware/efi/efivars              ignore if already mounted
                      pacman -S gummiboot
                      gummiboot install

Note: pacman is the package manager of archlinux, funny name yeah but you gonna love him.

You will need to manually create a configuration file to add an entry for Arch Linux to the gummiboot manager. Create /boot/loader/entries/arch.conf and add the following contents, replacing /dev/sdaX with your root partition

Type: nano /boot/loader/entries/arch.conf
and make the file:

Code:
title          Arch Linux
linux          /vmlinuz-linux
initrd         /initramfs-linux.img
options        root=/dev/sdaX rw

10. Unmount the partitions and reboot

Exit from the chroot environment
type : exit
then : umount -R /mnt
then : reboot <--------------remove the dvd/cd so it will now boot from your newely installed OS

11. Post Installation

Congrats you now have Arch Linux installed. At this point you have an awesome black screen command line and now starts the awesome part of Arch Linux, where you decide how your OS will be shaped. You will choose your login manager, windows manager, drivers etc.

Some steps you need to do before is installing the X windows system.

Type : pacman -S xorg-server xorg-server-utils xorg-xinit
Install mesa for 3D support: pacman -S mesa

Install a video driver: The vesa driver is a generic mode-setting driver that will work with almost every GPU, but will not provide any 2D or 3D acceleration. If a better driver cannot be found or fails to load, Xorg will fall back to vesa. To install it:
pacman -S xf86-video-vesa

or use the official drivers (better) from amd and nvidia depending the gpu you have.

Install input drivers : pacman -S xf86-input-evdev

and : pacman -S xf86-input-synaptics <-- only if you are a laptop user and need multitouch

At this point I can't really give you any more direction it's up to you to choose. You now need to select a Desktop enviroment: https://wiki.archlinux.org/index.php/Desktop_Environment

And also a Display manager (or Login Manager better) Display Managers

For more info on post installation read : Post Installation

A sample of Arch Linux with XFCE and the docky dock (looks like the Mac dock)
And themes/icons downloaded from http://xfce-look.org/ a site for free themes for the XFCE desktop manager.

Screenshot_08092011_12_46_32_PM.png
 
Status
Not open for further replies.
Status
Not open for further replies.