Difference between revisions of "HowTo Install Arch Linux"

From Pumping Station One
Jump to navigation Jump to search
Line 65: Line 65:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
Prepare the /boot folder with syslinux's init stuff.
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
cp -r /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
 
cp -r /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
Line 70: Line 71:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
Install the MBR to the root of MBR.  This will sit in the 2048 of reserved space from when we partitioned the drive.
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/vda
 
dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/vda
 +
</syntaxhighlight>
 +
 +
By default, syslinux tries to boot /dev/sda3.  Change it to boot /dev/vda1
 +
<syntaxhighlight lang="bash">
 
sed -i 's#/dev/sda3#/dev/vda1#' /boot/syslinux/syslinux.cfg
 
sed -i 's#/dev/sda3#/dev/vda1#' /boot/syslinux/syslinux.cfg
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
 +
== Flavor ==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
echo [archlinuxfr] >> /etc/pacman.conf
 
echo [archlinuxfr] >> /etc/pacman.conf

Revision as of 04:12, 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 bootloader, and consuming the rest of the drive.

sgdisk -n 1:2048: /dev/vda
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


systemctl enable dhcpcd
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 the MBR 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

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

enter your hostname

   echo ${hostname} > /etc/hostname


reboot

   exit
   reboot