Skip to content

Instantly share code, notes, and snippets.

@esobchenko
Last active January 16, 2017 18:21
Show Gist options
  • Save esobchenko/e16d5eb38123c28d4be4f30d1ab46429 to your computer and use it in GitHub Desktop.
Save esobchenko/e16d5eb38123c28d4be4f30d1ab46429 to your computer and use it in GitHub Desktop.
Arch Linux installation scenario for Primus
# In this tutorial, /dev/sda is the installation hard disk. Ensure this is correct for your situation using a tool like lsblk.
# Zero out the partition table to avoid any weirdness
dd if=/dev/zero of=/dev/sda bs=1M count=40
# Configure your disk layout
parted /dev/sda mklabel gpt
parted /dev/sda mkpart ESP fat32 1M 513M
parted /dev/sda set 1 boot on
parted /dev/sda mkpart primary ext4 513M 100%
# Create the filesystems
mkfs.vfat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
# Mount the root filesystem and create and mount the boot mountpoint
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
mkdir /mnt/data
mount /dev/sdb1 /mnt/data
# Strap on the base root filesystem
pacstrap /mnt base
# Create the fstab
genfstab -U -p /mnt >> /mnt/etc/fstab
# Chroot into the new Arch environment
arch-chroot /mnt /bin/bash
# Configure the new environment
sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
sed -i 's/#ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 >> /etc/locale.conf
echo LC_ALL=en_US.UTF-8 >> /etc/locale.conf
ln -s /usr/share/zoneinfo/Europe/Kiev /etc/localtime
# Set the hostname
echo primus > /etc/hostname
# Enable DHCP on your network interface (replace ethX with your interface name)
systemctl enable dhcpcd@eno1.service
# Create the initramfs
mkinitcpio -p linux
# Install and configure GRUB
#pacman -S grub grub-efi-x86_64 efibootmgr intel-ucode
#grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub_uefi --recheck
#grub-mkconfig -o /boot/grub/grub.cfg
# Exit the chroot, umount, and reboot
#exit
#umount /mnt/boot
#umount /mnt/data
#umount /mnt
#reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment