Blog / Portfolio 😀
the sections in this page cover:
this section covers partitioning and formatting the host computer. all existing data on the host computer will most likely unrecoverable upon completing the instructions in this section.
we will be partitioning the host computer as follows:
this partition shall be used by the UEFI bootloader to boot up the Arch Linux operating system on boot.
/dev/sda1
512 MB
EFI System
fat32
this partition shall be where the overflowing data from RAM is stored.
/dev/sda2
Linux Swap
linux swap
this partition shall be used to store the root file system (/
).
/dev/sda3
Linux Filesystem
ext4
cfdisk
this section has instructions for using cfdisk
to partition the host computer into the partitions mentioned in the previous section.
cfdisk
provides a pseudo graphical user interface for manipulating the system’s partition table. it actually uses fdisk
under the hood to manipulate system’s the partition table.
start cfdisk
; enter the command below into a Terminal:
# cfdisk
the cfdisk
interface should appear…
cfdisk
:
←
and →
arrow keys to select different operations to perform↑
and ↓
arrow keys to select which partition to perform the operation onenter
to execute the operation.Delete
operation to delete all existing partitions from the host computer.New
operation to allocate the three partitions discussed earlier with their appropriate sizes.Type
command to change the types of the allocated partitions to their appropriate types.use the Write
command to commit and apply your changes to the host computer’s partition table.
Quit
command to exit cfdisk
.mkswap
and mkfs
this section uses the mkswap
and mkfs
tools to format the partitions allocated in the previous section. (beware! partition device names used in the following steps may be different in your case):
format the EFI System Partition on /dev/sda1
to be fat32.
# mkfs.fat -F 32 /dev/sda1
format the Swap Partition on /dev/sda2
to be linux swap.
# mkswap /dev/sda2
finaly, format the Root Partition on /dev/sda3
to be ext4.
# mk.ext4 /dev/sda3
skip this section if you are already able to access the Internet. you can check whether or not you have access to the Internet by pinging Google with the command ping 8.8.8.8
.
if you do not already have an Internet connection, it is likely that you need to connect to a wireless network. this section uses the netctl
service to do just that; however, if this is not the case, the instructions in this section can still be useful!
follow the steps below to set up an Internet connection:
create a netctl profile in the /etc/netctl
directory. the name of the profile in our case is default
. use the command below to create the profile. an example profile is provided in the next section (Example Netctl Profile). more example profiles can be found in the /etc/netctl/examples
directory.
# nano /etc/netctl/default
have netctl attempt to establish a connection using your profile. this command can take a while:
# netctl start default
verify that you have an Internet connection:
# ping 8.8.8.8
/etc/netctl/default
)below is a sanitized version of the netctl profile I used for my network for reference.
Interface=wlp1s0
Connection=wireless
Security=wpa
IP=dhcp
ESSID='myHomeNetwork'
Key='superSecurePassword'
follow the instructions in this section to synchronize the host computer’s system clock with the Internet clock.
turn on network clock synchronization.
enter the command:
# timedatectl set-ntp true
verify that network clock synchronization has been enabled and acquired.
enter the command:
# timedatectl status
make sure that you have Network time on: yes
and NTP synchronized: yes
in the output of the command above.
this section assumes that:
/dev/sda1
/dev/sda2
/dev/sda3
follow the instructions below to install the Arch Linux base packages onto the host system:
mount the Linux Root Partition:
# mount /dev/sda3 /mnt
create a boot
directory for the EFI System Partition in the Linux Root Partition:
# mkdir /mnt/boot
mount the EFI System Partition onto the boot
directory:
# mount /dev/sda1 /mnt/boot
download the Arch Linux base packages into the mounted partitions:
# pacstrap /mnt base
generate the fstab file so the system will know how to mount the partitions:
# genfstab -U /mnt > /mnt/etc/fstab
change the root directory of the terminal:
# arch-chroot /mnt
set the locale of the system:
/etc/locale.gen
file to enable those localizations. we uncommented en_US.UTF-8
.generate the characters for the selected locales:
# locale-gen
create the file locale.conf
to set the localization of the host system. in this case, we are setting the localization of the host system to en_US.UTF-8
:
# echo "LANG=en_US.UTF-8" > /etc/locale.conf
create the /etc/hostname
file to set the name of the host computer by writing to the file:
# echo "hostname" > /etc/hostname
if the host system will be connecting to the LAN wirelessly, run the following command to install the appropriate packages:
# pacman -S -y iw wpa_supplicant dialog
set the password of the root user account:
# passwd
install and configure the systemd-boot bootloader:
install the systemd-boot bootloader:
# bootctl --path=/boot install
modify the /boot/loader/loader.conf
file to configure the bootloader to load the appropriate bootloader entries from the /boot/loader/entries
directory:
# cat << EOF > /boot/loader/loader.conf
> default arch
> timeout 3
> editor 0
> EOF
discover the partition UUID of the host system’s root partition (it is assumed that /dev/sda3
is the root partition in the command below):
# blkid -s PARTUUID -o value /dev/sda3
create a bootloader entry that loads Arch Linux:
# cat << EOF > /boot/loader/entries/arch.conf
> title Arch-Linux
> linux /vmlinuz-linux
> initrd /initramfs-linux.img
> options root=PARTUUID={partition UUID} rw
> EOF
replace {partition UUID}
in the command above with the UUID from the previous step.
exit the chroot environment:
# exit
unmount all mounted partitions:
# umount -R /mnt
reboot the system:
# reboot