This post will assume the following partition layout:
/ for system installation,
/home for user files,
/data for any other data. I usually keep all my development on this partition, so
when I need to reinstall the system, I will not be formatting this partition.
lsblk to identify the partirions that you will need. In my case, since I only
have one drive it will be:
mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda2
mount /dev/sda1 /mnt mkdir -p /mnt/home mkdir -p /mnt/data mount /dev/sda2 /mnt/home mount /dev/sda3 /mnt/data
There are few ways of foing it, but the most convinient for me is to execute the below, and just choose the network and type in the password
I tend to use
vi to edit text files, but you can also use
uncomment the closest mirror to you, and save file.
I also install
base-devel group, to include some additional packages
pacstrap /mnt base base-devel
We need to export the current partition table to
/etc/fstab so when we reboot, the
newely installed system boots.
genfstab - U -p /mnt >> /mnt/etc/fstab
We need to chroot into new installation to setup some basics before we reboot.
pacman -S grub-bios linux-lts linux-lts-headers iw wpa_supplicant dialog
Uncheck the required locale based on your language, and save file.
For some reason I need to manually specify
LANG variable, so first command adds it.
The second command forces the terminalsto have uk keymap
echo LANG=en_GB.UTF-8 > /etc/locale.conf echo KEYMAP=uk > /etc/vconsole.conf
rm /etc/localtime ln -s /usr/share/zoneinfo/Europe/London /etc/localtime hwclock --systohc --utc
echo arch > /etc/hostname
grub-install --target=i386-pc --recheck /dev/sda
pacman -S intel-unicode
grub-mkconfig -o /boot/grub/grub.cfg
We can now exit
chroot, unmount all partitions and reboot to our new installation.
exit umount -R /mnt reboot
In the following steps we will add system user and grant them with the administrative permissions.
Login as root (as it’s currently the only system user) and execute following commands, replacing
USERNAME with your actuall username:
useradd -m -G wheel,users -s /bin/bash USERNAME passwd USERNAME
This user was added to the
wheel group. We will now allow any users in that group to
perform any administrative system operations. Uncomment the following in
%wheel ALL=(ALL) NOPASSWD: ALL
If you will be installing programs that will require 32-bit package versions like Steam, enable them
by uncommenting in
[multilib] Include = /etc/pacman.d/mirrorlist
At this point we have base installation complete. In next parts, we will install graphical environment (i3) and prepare the system for Web Development using:
PHP in Docker LEMP stack