Difference between revisions of "HowTo Install Arch Linux"
Line 53: | Line 53: | ||
+ | Set dhcpd to start at boot | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
systemctl enable dhcpcd | systemctl enable dhcpcd | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Set sshd to start at boot. | ||
+ | <syntaxhighlight lang="bash"> | ||
systemctl enable sshd | systemctl enable sshd | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 04:13, 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
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 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