Network and Filesystem setup
- Connecting to WiFi
sudo wifi-menu # follow the steps to connect to a network (might be difficult in case of complex university networks)ping www.google.com # check if the packet loss is 0%
- Check the current partitions using
cfdisk(GUI enhancement tofdisk) - Delete existing partitions (if not dual-booting) and create new partitions. Create a new primary (and bootable) partition → SWAP partition → logical extended partition
💡
Keep in mind that SWAP partition is a core element for performance, especially on low-memory machines. It is generally kept 2x the memory (RAM) of the system.
- Check the partition id and if they are correctly created
fdisk -l - Format the partitions (primary, logical)
mkfs.ext4 /dev/sda<id> # process to format the partition /dev/sda<id> - Declare the swap partition
mkswap /dev/sda<id> swapon /dev/sda<id>
Copying the required files
- Mounting the primary and the logical partition
mount /dev/sda<primaryId> /mnt # home is where my personal files lie mkdir /mnt/home # home is where I mount the logical partition mount /dev/sda<logicalId> /mnt/home - Installing the base system
pacstrap /mnt base base-devel
Adding to fstab (auto-mounting)
- We add the primary, swap and home partition to
fstab. This means that these partitions will now be auto-mounted on boot.genfstab /mnt >> /mnt/etc/fstab # then, we verify if the details were successfully added cat /mnt/etc/fstab
New system setup (chroot-ed)
chrootinto the system. Specifying the shell in the command is optional.arch-chroot /mnt /bin/bash # the last shell argument can be skipped- Set the system location and language
nano /etc/locale.gen # uncomment the required locale that you need to be (e.g. en_US.UTF-8) locale-gen # generates according to this configuration file nano /etc/locale.conf echo "LANG=en_US.UTF-8" >> /etc/locale.conf - Set the timezone and the system time
# check out which all timezones are available ls /usr/share/zoneinfo/ # se the symlink ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime - Set up a new password and network connections
# the same info of the hosts file needs to added to these two files nano /etc/hostname nano /etc/hosts
Grub - the bootloader setup
- Install grub and its dependencies
pacman -S grub os-prober - Install grub for the system
# for a UEFI-based installation grub-install /dev/sda # for a DOS-based installation grub-install --target=i386-pc --recheck /dev/sda # generate the config file for grub grub-mkconfig -o /boot/grub/grub.cfg
Restarting to the installed system
- Close the
chrootexit - Unmount the mounted partitions
umount /mnt umount /mnt/home - Finally, reboot
reboot