Skip to content

Instantly share code, notes, and snippets.

@jimbarrett
Last active August 17, 2020 21:39
Show Gist options
  • Save jimbarrett/7717802dd133730cffdde081971dc265 to your computer and use it in GitHub Desktop.
Save jimbarrett/7717802dd133730cffdde081971dc265 to your computer and use it in GitHub Desktop.
Installing arch uefi
Install Arch on UEFI
(Assuming already booted into arch via usb)
-- connect to wifi (only if not connected via ethernet)
-- wifi-menu
-- (follow prompts)
# network connection is now handled using iwctl
iwctl
# prompt will change to [iwd]#
device list -- list all wifi devices
station device-name scan -- scan for networks
station device-name get-networks -- list available networks
station device-name connect SSID -- connect to found network
-- make sure you know which drive you're installing on
lsblk
(assuming /dev/sda from this point on)
-- create partitions
cfdisk /dev/sda
-- delete any existing partitions
-- create 3 new partitions
1. 300M type = EFI System (/dev/sda1)
2. 1G type = Linux swap (/dev/sda2)
3. (remainder) type = Linux filesystem (/dev/sda3)
[Write]
[Quit]
-- make sure looks correct with:
fdisk -l
-- format new partitions
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda3
mkswap /dev/sda2
-- prepare to install
mount /dev/sda3 /mnt
swapon /dev/sda2
-- edit mirrors for faster downloads
vim /etc/pacman.d/mirrorlist
-- move closest to top or comment others out.
-- do actual install
pacstrap /mnt base base-devel linux linux-firmware vim
-- can add any other packages you're sure you'll want here.
-- generate fstab
genfstab -U -p /mnt >> /mnt/etc/fstab
-- inspect with
cat /mnt/etc/fstab
-- system config
arch-chroot /mnt
-- make sure networkmanager is installed and enabled
pacman -S networkmanager
systemctl enable NetworkManager
echo "your-hostname" > /etc/hostname
vim /etc/locale.gen
-- uncomment 2 en_US entries (or whatever you need)
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
-- or whatever you need. browse with ls /usr/share/zoneinfo
passwd
-- enter password for root user
-- bootloader
pacman -S grub efibootmgr dosfstools os-prober mtools
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
exit
umount -a
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment