This gist serves as an installation guide for Arch Linux on Michael's UK X220 with the following characteristics
- GPT partition table
- UEFI booting
Download the latest archlinux ISO and create a bootable USB stick
dd if=archlinux.img of=/dev/sdX bs=16M && sync
See https://www.archlinux.org/download/ and https://wiki.archlinux.org/index.php/USB_flash_installation_media
Boot from the USB stick in UEFI mode.
A few steps to carry out before running the installation script...
An ethernet cable connection should be detected automatically. If not ethernet connection is available, you can connect to a wifi network with wifi-menu
.
We create three partitions as follows:
Purpose | Size | Hex code |
---|---|---|
ESP | 512MB | EF00 |
boot partition (unencrypted) | 512MB | 8300 |
Encrypted drive | The rest | 8300 |
For more information on ESP, see https://wiki.archlinux.org/index.php/EFI_System_Partition
For more information on the boot partition, see https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Simple_partition_layout_with_LUKS.
We can use gdisk
to create a GPT partition table. Launch gdisk with the appropriate device filename, e.g. gdisk /dev/sda
.
The following gdisk commands are useful:
p
print the partition table- 'o' create a new partition table
n
create a new partition (use + when specifying the last sector)w
write table to disk and exitq
quit without saving changes
First download the install script with something like
wget https://git.io/v9WkH -O install.sh
or
wget https://gist.githubusercontent.com/michaelmcandrew/06e875873399675d7584087c4cbbf99a/raw/install.sh
Once it has downloaded successfully, run it with bash install.sh
.
Based on, inspired by, and written with the help of:
- https://wiki.archlinux.org/index.php/installation_guide and related pages (noted below)
- https://gist.github.com/mattiaslundberg/8620837