Difference between revisions of "HowTo Install Arch Linux"

From Pumping Station One
Jump to navigation Jump to search
Line 49: Line 49:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Set time Timezonezo
+
Set time Timezone
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
 
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime

Revision as of 06:14, 3 April 2015

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 --new 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 /mnt >> /mnt/etc/fstab

Change Root (chroot) to Arch

Switch into the arch installtion.

arch-chroot /mnt

Set time Timezone

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.

ln -s /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 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

reboot

exit
reboot

When Something Goes Wrong

If something goes wrong with rebooting and you end up back on the live cd, you don't need to start over. Running the following 2 commands will bring you back to your Arch Linux Environment

mount /dev/vda1 /mnt
arch-chroot /mnt


Flavor

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