How to install Arch Linux on a UEFI system.
So, I think You've understood what I'm trying to convey here. I started with arch Linux coz I found very few guides on the web which are simple and updated. So let's start.
Here is what you'll need -
- Arch Linux iso
- Balena etcher - Depending on your current OS.
- A fast internet connection as net install method is used here.
- Patience
Warning - This is not as easy as other distros such as Debian and fedora. We'll work with the command line here. Do it at your own risk.
1. Get the ISO and create a bootable media for UEFI(GPT partitioned.
Get the iso and create your install media. I hope you know how to.( If you don't, then forget arch. It's probably not for you.) After this, we got to boot into the USB.
2. Installation
You got to select gpt here. In the next step, your disk will appear. Create three partitions in it. For demonstration, I'm using a VM here but you can do the same steps in your PC.
- The first partition should be ESP. (150 MB)
- The second should be your Linux filesystem. (Calculate it yourself)
- Third swap. (Depending on your RAM, 4 GB if you've 4 GB RAM. If you got 16, you don't need any swap.)
- mkfs.ext4 /dev/sda1
- mkfs.fat -F32 /dev/sda2
- mkswap /dev/sda3
- swapon /dev/sda3
- mount /dev/sda1 /mnt
- mkdir /mnt/boot/efi
- mount /dev/sda2 /mnt/boot/efi
Setting our mirrorlist
- pacman -S nano
- nano /etc/pacman.d/mirrorlist
System Install and configuration
Now it's the time to carry on the main stuff. So type -
- pacstrap /mnt base base-devel linux linux-firmware vim
- genfstab -U /mnt >> /mnt/etc/fstab
- arch-chroot /mnt (This step is very important when it comes to troubleshooting)
- timedatectl list-timezones
- timedatectl set-timezone US/Eastern (You should choose depending on your location)
- nano /etc/locale.gen (Uncomment the lang you prefer)
- locale-gen
- echo LANG=en_US.UTF-8 > /etc/locale.conf
- export LANG=en_US.UTF-8
- nano /etc/hostname
- nano /etc/hosts
- Follow this carefully.(Be sure to replace TechCS with your host name.)
- passwd
- (Enter your password)
GRUB Installation
Now this is very important. If you're dual booting, follow this from companion guide.
Type-
- pacman -S efibootmgr grub (This will install grub and efibootmgr.)
- grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
- grub-mkconfig -o /boot/grub/grub.cfg
3. Post-Install
So we're installing some packages to make our PC work smoothly.
Type-
- pacman -S xorg gnome (We're installing gnome as our desktop manager and xorg as server)
- systemctl start gdm.service
- systemctl enable gdm.service
- systemctl enable networkmanager.service
- exit
- shutdown now
Enabling sudo and adding user.
- su (Enter your passwd)
- pacman -S sudo
- sudo EDITOR=nano visudo
- sudo useradd -m -g users -G wheel username
- sudo passwd username



Comments
Post a Comment