Arch Linux USB Installation

Arch Linux Installation from a USB flash media
This installation procedure is for:
Arch Linux Release 2015.12.01
MBR drive partition

Download Arch Linux iso from:
https://www.archlinux.org/download/

To find out the name of the USB drive:
# lsblk

Run dd to transfer iso to usb in another Linux system:
# dd bs=4M if=/path/to/archlinux.iso of=/dev/sdX && sync
where sdX is the USB drive

1. Boot the system using the Arch USB flash installation media.

2. Verify the system have internet connectivity.
If needed export proxy server
# export http_proxy=http://proxyserver:port
# export https_proxy=http://proxyserver:port

3. Use parted to partition the hard drive
# parted /dev/sda

Create a new MBR partition:
(parted) mklabel msdos

Partition scheme example:
/             –  20GiB
Swap    –  4GiB
/home  –  all remaining space

(parted) mkpart primary ext4 1MiB 20GiB
(parted) set 1 boot on
(parted) mkpart primary linux-swap 20GiB 24GiB
(parted) mkpart primary ext4 24GiB 100%

Quit parted and make the file systems:

List the new partitions to verify
# lsblk /dev/sda

Make the file systems and swap
# mkfs.ext4 /dev/sda1
# mkswap /dev/sda2
# swapon /dev/sda2
# mkfs.ext4 /dev/sda3

Mount the root partition to the /mnt directory of the live system:
# mount /dev/sda1 /mnt

# mkdir -p /mnt/home
# mount /dev/sda3 /mnt/home

4. Install base and base-devel
# pacstrap /mnt base base-devel

5. Configure the partition
Generate the fstab file
# genfstab -U /mnt > /mnt/etc/fstab

Change root
# arch-chroot /mnt /bin/bash

6. Locale
Uncomment en_US.UTF-8 UTF-8 in /etc/local.gen
Generate the new locals:
# locale-gen

Create /etc/locale.conf and add the following:
LANG=en_US.UTF-8

Time and Time Zone
Select a Time Zone:
# tzselect
Create the symbolic link:
# ln -s /usr/share/zoneinfo/Zone/SubZone /etc/localtime

It is recommended to adjust the time skew, and set the time standard to UTC:
# hwclock -w -u

7. Install a boot loader
Install the grub package:
# pacman -S grub os-prober

Install the bootloader to the drive Arch was installed to:
# grub-install –recheck /dev/sda

Generate grub.cfg:
# grub-mkconfig -o /boot/grub/grub.cfg

8. Configure the network
Set Hostname, edit /etc/hostname

Enable dhcpcd service
# systemctl enable dhcpcd@deviceName.service
where deviceName is your connected network
To see the devices:
# ip link

9. Change the root password
# passwd

10. Exit and return to Archiso
# exit

11. Unmount the partitions and reboot
# umount -R /mnt
# reboot