If using Proxmox:
Use cfdisk
:
cfdisk /dev/sda
Confirm with lsblk
to see the partitions.
Format the partitions with the following commands:
mkfs.fat -F 32 /dev/sda1 # Boot partition
mkswap /dev/sda2 # Swap partition
mkfs.ext4 /dev/sda3 # Root partition
Mount the root partition and enable swap:
mount /dev/sda3 /mnt
swapon /dev/sda2
Create mount points for boot and EFI:
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
Verify the mounts with lsblk
.
Install the base system and essential packages:
pacstrap /mnt base linux linux-firmware vim networkmanager base-devel grub efibootmgr
Generate /etc/fstab
file:
genfstab -U /mnt >> /mnt/etc/fstab
Change root into the new system:
arch-chroot /mnt
Set the time zone:
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
hwclock --systohc
Edit /etc/locale.gen
and uncomment the desired locale:
en_US.UTF-8 UTF-8
Generate the locale:
locale-gen
Set the locale in /etc/locale.conf
:
echo "LANG=en_US.UTF-8" > /etc/locale.conf
Set the hostname:
echo "archbtw" > /etc/hostname
Create password for root:
passwd
Create a new user:
useradd -m -G wheel -s /bin/bash luke
passwd luke
Edit the sudoers file:
EDITOR=vim visudo
Uncomment the line:
%wheel ALL=(ALL) ALL
Enable NetworkManager to start at boot:
systemctl enable NetworkManager
Install Grub:
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfgq
Exit the chroot environment:
exit
Unmount the partitions:
umount -a
Reboot the system:
reboot
Enable SSH:
sude pacman -S openssh
sude systemctl enable sshd
Install and enable Avahi:
sudo pacman -S avahi nss-mdns
sudo systemctl enable avahi-daemon.service
Enable mDNS by edditing /etc/nsswitch.conf
and modifying the hosts
line to look like this:
hosts: mymachines mdns4_minimal[NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns mdns4