HowTo Install Arch Linux

From PS:1 Wiki Dev
Revision as of 04:05, 3 April 2015 by Hef (talk | contribs) (Created page with "== Installing == Install GPT (Guid Partition Table) on the disk` <syntaxhighlight lang="bash"> sgdisk -z /dev/vda </syntaxhighlight> Create partition one, leave 2048 sectors...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Installing

Install GPT (Guid Partition Table) on the disk` <syntaxhighlight lang="bash"> sgdisk -z /dev/vda </syntaxhighlight>

Create partition one, leave 2048 sectors blank for the bootloader, and consuming the rest of the drive. <syntaxhighlight lang="bash"> sgdisk -n 1:2048: /dev/vda sgdisk --attributes=1:set:2 /dev/vda </syntaxhighlight>

Now that you have a partition, it will show as /dev/vda1. Format The partition as ext4 <syntaxhighlight lang="bash"> mkfs.ext4 /dev/vda1 -F </syntaxhighlight>

Mount The partiton, so that we can install arch onto it. <syntaxhighlight lang="bash"> mount /dev/vda1 /mnt </syntaxhighlight>

Install Arch.

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

<syntaxhighlight lang="bash"> pacstrap /mnt base base-devel openssh syslinux </syntaxhighlight>


Now that arch is isntalled, build a partition to mount point table, and write it to /mnt/etc/fstab <syntaxhighlight lang="bash"> genfstab -p /mnt >> /mnt/etc/fstab </syntaxhighlight>

Chroot

Switch into the arch installtion. <syntaxhighlight lang="bash"> arch-chroot /mnt </syntaxhighlight>


Fix the timezone settings <syntaxhighlight lang="bash"> unlink /etc/localtime ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime </syntaxhighlight>


<syntaxhighlight lang="bash"> systemctl enable dhcpcd systemctl enable sshd </syntaxhighlight>

Prepraring to boot

Create your initial ramdisk - The initial file system before the real one boots <syntaxhighlight lang="bash"> mkinitcpio -p linux </syntaxhighlight>

<syntaxhighlight lang="bash"> cp -r /usr/lib/syslinux/bios/*.c32 /boot/syslinux/ extlinux --install /boot/syslinux </syntaxhighlight>

<syntaxhighlight lang="bash"> dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/vda sed -i 's#/dev/sda3#/dev/vda1#' /boot/syslinux/syslinux.cfg </syntaxhighlight>

<syntaxhighlight lang="bash"> echo [archlinuxfr] >> /etc/pacman.conf echo SigLevel = Never >> /etc/pacman.conf echo Server = http://repo.archlinux.fr/\$arch >> /etc/pacman.conf pacman -Sy pacman -S --noconfirm salt-zmq systemctl enable salt-minion </syntaxhighlight>

enter your hostname

   echo ${hostname} > /etc/hostname


reboot

   exit
   reboot