Archlinux Install

From gr0x0rd
Jump to navigation Jump to search

Installing ArchLinux

Install Prep

Review the documentation and download the boot media

Before getting started you'll probably want to review the ArchLinux install guide and download the latest iso image. I copied the image to a USB drive mounted as /dev/sdf:

$ sudo dd if=Downloads/archlinix_install_image.iso of=/dev/sdf

After this, the USB was inserted into the motherboard, the system powered and the USB selected as the boot device via BIOS. After startup of the live image, Arch offers up a root prompt.

Confirm networking

Confirm you have network access by pinging google or something else. Use ifconfig to determine the local IP.

Enable ssh daemon

There is really no need to do an install by typing out command after command, so an ssh session is necessary and sufficient. In order to get this set up, the first step is to set the root password

# passwd

And then start the sshd service

# systemctl start sshd

You can then ssh into the system from another computer on your network, preferably one with internet access so you can copy-and-paste commands from the install guide or this wiki.

Preparing the disks

One of the reasons for moving on from Gentoo was a lack of any definitive process in the community forums or documentation for setting up a RAID based system. When googling this, all of the related documentation seemed to generate hits from the Arch community docs.

This guide focuses on setting up a system using twin SSD drives in a RAID1 configuration. A step-by-step guide for doing this was found here. Other considerations include simplifying the configuration by dropping the /boot and /swap partitions required by Gentoo, expanding the UEFI partition for boot purposes, and using a swap file as opposed to a swap partition.

It should also be noted that this guide focuses on setting up the system using a single drive, then adding the second after the install is complete, in order to have both systems running at the same time and perform a migration.

Create partition schema using gdisk

Identify what device has been assigned to your primary disk (usually this is /dev/sda) and open it using gdisk.

# gdisk /dev/sda

Once in the gdisk interface, you can use p to show the existing partition schema. Since we are creating a new partition schema, it makes sense to delete the current schema using d. Once complete, the partition schema should be empty:

Command (? for help): p
Disk /dev/sda: 468862128 sectors, 223.6 GiB
Model: KINGSTON SH103S3
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 0356C9E8-4FEB-4F09-A617-54F462861ABD
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 2048-sector boundaries
Total free space is 468862061 sectors (223.6 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name

Command (? for help): 

Create the boot/UEFI partition using n. Use the default sector as its starting point (2048). I created a 1G partition using +1G when prompted. When prompted for the code for the partition, EF00 was entered as per the documentation.

Next, the primary root partition was created. The remainder of the disk was used for the partition as per defaults. The partition type also defaulted to a linux filesystem. The partition layout now appears as follows:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         2099199   1024.0 MiB  EF00  EFI System
   2         2099200       468862094   222.6 GiB   8300  Linux filesystem

w was used to write this partition table to the disk.