How to set-up boot manager, root password, and hostname
Install two packages, ‘grub’ and ‘os-prober’, here grub is boot manager and os-prober detects if there are other operating systems installed on the system.
pacman -S grub os-prober
If you are using GPT/UEFI then also install the efibootmgr
pacman -S grub efibootmgr os-prober
For BIOS/MBR
Run the following command:
# grub-install --recheck --target=i386-pc /dev/sdX
Here sdX will be the drive and not a partition, so in my case it was:
# grub-install --recheck --target=i386-pc /dev/sda
Generate grub.cfg:
# grub-mkconfig -o /boot/grub/grub.cfg
For UEFI/GPT
Run the following command:
# grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=grub
Replace ‘esp’ with the mount point for the EFI, which in this case was /boot
Run:
grub-mkconfig -o esp/grub/grub.cfg
In this case, it will be
grub-mkconfig -o boot/grub/grub.cfg
We are all set with the OS install, we have to now install other components and configure the system.
Set up hostname
Give our system a decent host name:
# echo swapnil > /etc/hostname
Create the password for the root. Run the following command:
# passwd
Leave the chroot environment:
# exit
And unmount the partition:
# umount -R /mnt
Then shutdown the system:
# shutdown
Remove the USB drive that you used to install Arch and reboot the system.






