Difference between revisions of "HowTo Install Arch Linux"

From Pumping Station One
Jump to navigation Jump to search
m (Bot: Cosmetic changes)
Line 3: Line 3:
 
* Boot from it
 
* Boot from it
  
== Initializing the Disk==
+
== Initializing the Disk ==
  
 
Install/reinitialize GPT (Guid Partition Table) on the disk`
 
Install/reinitialize GPT (Guid Partition Table) on the disk`
Line 20: Line 20:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Now that you have a partition, it will show as /dev/vda1. Format The partition as ext4
+
Now that you have a partition, it will show as /dev/vda1. Format The partition as ext4
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
mkfs.ext4 /dev/vda1 -F
 
mkfs.ext4 /dev/vda1 -F
Line 43: Line 43:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
== Change Root (chroot) to Arch ==
+
== Change Root (chroot) to Arch ==
  
 
Switch into the arch installtion.
 
Switch into the arch installtion.
Line 57: Line 57:
 
== Prepraring to Boot ==
 
== Prepraring to Boot ==
  
Create your initial ramdisk - The initial file system before the real one boots
+
Create your initial ramdisk - The initial file system before the real one boots
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
mkinitcpio -p linux
 
mkinitcpio -p linux
Line 67: Line 67:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
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.
+
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.
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
dd if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/vda
 
dd if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/vda
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Prepare the /boot folder with syslinux's modules. The .c32 files that ship with syslinux are for systems that use a bios to boot. Symlink the bios modules into syslinux's boot folder.
+
Prepare the /boot folder with syslinux's modules. The .c32 files that ship with syslinux are for systems that use a bios to boot. Symlink the bios modules into syslinux's boot folder.
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
ln -s /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
 
ln -s /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
Line 83: Line 83:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
By default, syslinux tries to boot /dev/sda3. Change it to boot /dev/vda1
+
By default, syslinux tries to boot /dev/sda3. Change it to boot /dev/vda1
 
<syntaxhighlight lang="bash">
 
<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

Revision as of 14:10, 27 April 2015

Installation Media

Initializing the Disk

Install/reinitialize GPT (Guid Partition Table) on the disk`

sgdisk --zap /dev/vda

Create partition 1, leave 2048 sectors blank for the syslinux bootloader, and don't specify an end size, so that it takes 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

Install Arch to /mnt

pacstrap /mnt


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

Prepraring to Boot

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

mkinitcpio -p linux

Install syslinux

pacman -S 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

Prepare the /boot folder with syslinux's modules. The .c32 files that ship with syslinux are for systems that use a bios to boot. Symlink the bios modules into syslinux's boot folder.

ln -s /usr/lib/syslinux/bios/*.c32 /boot/syslinux/

Run the syslinux extlinux installer.

  • extlinux is the filesystem variant of syslinux
extlinux --install /boot/syslinux

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

Once you are back in the Arch environment, Check the following:

  • You set the bootable flag on the partions
  • You setup the syslinux boot loader correctly.

PS:One Flavor

Salt

Some settings common to most of the computers at PS:One can be applied by running the following commands:

pacman -S salt-zmq
systemctl start salt-minion
salt-call state.highstate

Network Logins

Enable Network logins by joining the domain server. After this command is run, the machine will support network authentication.

net ads join -U <your user name>