Arch Linux Install With UEFI Boot: Minimal Instructions
Ever wanted to install Arch Linux? with UEFI boot? with minimal instructions? Lets go.
Requirements
- Bootable Arch Linux USB
- Some linux knowledge
If you haven’t installed linux ever before, be warned this could go sideways on ya. It’s written to be high level. Start by booting into Arch Linux.
Step 1: Partition Drives
Find the disk you want to partition (Most likely /dev/sda):
$ lsblk
Run cfdisk
to start partitioning:
$ cfdisk /dev/sda
Create 3 partitions:
500M EFI Boot (/dev/sda1) (make sure to enable boot flag)
30G Root Partition (/dev/sda2)
TheRest Home Partition (/dev/sda3)
If you want swap later just add a swap file.
Step 2: Format partitions
Note the drive letters from last step. Format the Root and Home partitions to
ext4
and the EFI partition fat32
:
$ mkfs.vfat -F32 /dev/sda1
$ mkfs.ext4 /dev/sda2
$ mkfs.ext4 /dev/sda3
Step 3: Mount Partitions
Mount partitions. Root -> /mnt, Home -> /mnt/home
$ mount /dev/sda2 /mnt
$ mkdir /mnt/home
$ mount /dev/sda3 /mnt/home
Step 4: Install Linux
- Modify
/etc/pacman.d/mirrorlist
if you want to change your mirrors. - Use
ifconfig
to check if you have an internet connection.dhclient <iface>
to get a wired IP.wifi-menu
to get wireless IP.
pacstrap /mnt base linux linux-firmware
for very basic installarch-chroot /mnt
to get into Arch Linux
Step 5: Setup Linux
ln -s /usr/share/zoneinfo/America/Edmonton /etc/localtime
to set timezoneecho en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen
to generate localeecho archbox > /etc/hostname
to set your hostnamepasswd
to set root password
Step 6: Configure Grub with EFI
Run the following commands to setup EFI
$ pacman -S grub efibootmgr
$ mkdir /boot/EFI
$ mount /dev/sda1 /boot/EFI
$ grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
$ grub-mkconfig -o /boot/grub/grub.cfg
If you are not installing with uefi and are just following these instructions, you can use the following for grub boot:
$ grub-install --target=i386-pc /dev/sda
$ grub-mkconfig -o /boot/grub/grub.cfg
Step 7: Create User
I also recommend setting up a separate user to user instead of root.
$ useradd -m -g users myusername
$ usermod myusername -a -G wheel,storage,power
$ passwd myusername
Then make sure to uncomment # %wheel ALL=(ALL) ALL
with visudo
Step 8: Install Goodies
From here on out you are installing additional packages according to your needs.
$ pacman -Syu netctl # for networking management
$ pacman -Syu dhclient,dhcpcd # for getting ip addreses
$ pacman -Syu iw wpa_supplicant # for wireless connections
$ pacman -Syu dialog # for 'wifi-menu' program
# X Server
$ pacman -Syu xorg # for display management
$ pacman -Syu i3 # for window management
$ pacman -Syu xterm # for terminal emulator
Step 9: Generate the fstab file
After this you will need to make sure you generate the fstab file. Exit the chroot and run:
genfstab -U /mnt >> /mnt/etc/fstab
Reboot and you should be good to go!