HowTo Install Arch Linux

From Pumping Station One
Revision as of 04:23, 3 April 2015 by Hef (talk | contribs) (→‎Flavor)
Jump to navigation Jump to search

Initializing the Disk

Install GPT (Guid Partition Table) on the disk`

sgdisk -z /dev/vda

Create partition one, leave 2048 sectors blank for the syslinux bootloader, and consuming the rest of the drive.

sgdisk -n 1:2048: /dev/vda

For Partition 1, set the bootable flag, (flag 2)

sgdisk --attributes=1:set:2 /dev/vda

Now that you have a partition, it will show as /dev/vda1. Format The partition as ext4

mkfs.ext4 /dev/vda1 -F

Mount The partiton, so that we can install arch onto it.

mount /dev/vda1 /mnt

Install Arch

  • Also install base-devel: compiler programs
  • openssh: remote access
  • syslinux: bootloader
pacstrap /mnt base base-devel openssh syslinux


Now that arch is isntalled, build a partition to mount point table, and write it to /mnt/etc/fstab

genfstab -p /mnt >> /mnt/etc/fstab

Jump into Arch

Switch into the arch installtion.

arch-chroot /mnt


Fix the timezone settings

unlink /etc/localtime
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime


Set dhcpd to start at boot

systemctl enable dhcpcd

Set sshd to start at boot.

systemctl enable sshd

Prepraring to boot

Create your initial ramdisk - The initial file system before the real one boots

mkinitcpio -p linux

Prepare the /boot folder with syslinux's init stuff.

cp -r /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
extlinux --install /boot/syslinux

Install syslinux's GPT MBR (Master Boot Record) to the root of MBR. This will sit in the 2048 of reserved space from when we partitioned the drive.

dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/vda

By default, syslinux tries to boot /dev/sda3. Change it to boot /dev/vda1

sed -i 's#/dev/sda3#/dev/vda1#' /boot/syslinux/syslinux.cfg

Flavor

pacman -Sy
pacman -S --noconfirm salt-zmq
systemctl enable salt-minion

enter your hostname

   echo ${hostname} > /etc/hostname


reboot

   exit
   reboot