Difference between revisions of "COSI Arch Build"

From CSLabsWiki
Line 1: Line 1:
The COSI Arch Build has been attempted in the past, with failures tending to cause people to resort to other operating systems.
The COSI Arch Build has been attempted in the past, with failures tending to cause people to resort to other operating systems.
In April 2016, a new lab image has been contemplated and we want to try and see if using Arch will solve the NFS problems.

Revision as of 01:55, 8 April 2016

The COSI Arch Build has been attempted in the past, with failures tending to cause people to resort to other operating systems.


Get the Arch Dual ISO CD and start it up.

To start, try pinging google or mirror. You will need to configure the network if that isn't working. That is beyond the scope of where we are now, use the official arch wiki to set that up.

Set HW Clock

Check that the system clock is set up right.

timedatectl set-ntp true

Configure Partitons

Determine what drive you want to use.


In this case it was /dev/sda

Start up parted and begin partitioning the disks.

parted /dev/sda
mklabel msdos
mkpart primary ext4 1M 280G

Format the disks. Say yes if it complains to continue to partition.

mkfs.ext4 /dev/sda1

And mount that partition.

mount /dev/sda1 /mnt

Set up Mirrors

If you are running x86 or x64, we run Arch on mirror. Otherwise you will need to find a mirror that does your architecture.

vim /etc/pacman.d/mirrorlist

Add this line:

Server = http://mirror.clarkson.edu/archlinux/$repo/os/$arch



Start up pacstrap and install the base system. Make sure that you have mounted the partition to start installing to.

pacstrap /mnt base base-devel vim htop grub nano

Now wait as the system is installed.

Generate FSTAB

genfstab -U /mnt > /mnt/etc/fstab

Change Root

arch-chroot /mnt /bin/bash


Set Timezone

Default timezone for COSI


Set up Grub

If you want to find other os's, use pacman to install os prober:

pacman -S os-prober

Install GRUB to the MBR.

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Set the Hostname

Set the hostname (ex, cosi-3)

vim /etc/hostname

If you want, you can skip below and set up the network interfaces while you still have access to the live cd, but I'm lazy and do it later.

Set the root password



pacman -Syu

More Fun!

At this point, if you haven't rebooted, you should. If you accidentally derped with the partitioning and such, you would rather know now before you install fancy stuff that takes a while than know after you try rebooting into the system only to discover that GRUB didn't work or something else along those lines and that you lost all of your precious time and effort.

Try not to get frustrated if this didn't work so far. Check out the Arch Linux beginners guide for help and instructions.

Here we go!

Network Stack

Let's make some network! If you try to network right now, you will fail.

ip link

This (above) is a list of the current NIC's

Now, pick one either at random or one that doesn't say NO-CARRIER (and that is not lo) and enable it! (If you only have lo, you have a problem)

systemctl enable dhcpcd@enp2s0
systemctl start dhcpcd@enp2s0

... and you should now have a link.

ip a

... should show you the IP and all that fun stuff. If you have an IP, you are done with the network stack!


Let's make a local user for CSGUEST!

useradd csguest
passwd csguest

Install sudo

pacman -S sudo

Edit the sudoers file and remove the comment in front of the %sudo so that the sudo group can sudo.

Add CSGUEST to sudo.

gpasswd -a csguest sudo

If the sudo group doesn't exist, create it.

groupadd sudo

X Server

This is another fun one!

pacman -Syu
pacman -S xfce4 xfce4-goodies lxdm

Select all prerequisites

Enable LXDM

systemctl enable lxdm

Edit the config file to enable capslock, change default session to startxfce4 and disable user listing.

vim /etc/lxdm/lxdm.conf

Get a browser (and arandr)

pacman -S firefox arandr

Important stuff

pacman -S wget

Active Directory

LDAP client

Get the COSI Certs!

Get this:


and then put it at /etc/ssl/certs and then add that into the nslcd.conf as the ca certificate directory


pacman -S nss-pam-ldapd openldap
vim /etc/nsswitch.conf

Add "ldap" (without quotes) to the end of the passwd, group, and shadow lines.

vim /etc/nslcd.conf


uri ldaps://


base dc=cslabs,dc=clarkson,dc=edu

And now..

systemctl enable nslcd.service
systemctl start nslcd.service


pacman -S pam-krb5

And edit the configuration file

Add these lines under their respective locations, and replace the default line at the top with CSLABS.

		kdc = talos.cslabs.clarkson.edu
		admin_server = talos.cslabs.clarkson.edu
		default_domain = cslabs.clarkson.edu
	.cslabs.clarkson.edu = CSLABS.CLARKSON.EDU
	cslabs.clarkson.edu = CSLABS.CLARKSON.EDU

	default_realm = CSLABS.CLARKSON.EDU


Modify this file to look exactly like this (baring updates to the system configuration)

vim /etc/pam.d/system-auth

auth      sufficient  pam_krb5.so
auth      sufficient  pam_ldap.so
auth      required  pam_unix.so     nullok
auth      optional  pam_permit.so
auth      required  pam_env.so

account   sufficient  pam_krb5.so
account   sufficient  pam_ldap.so
account   required  pam_unix.so
account   optional  pam_permit.so
account   required  pam_time.so

password  sufficient pam_krb5.so
password  sufficient pam_ldap.so
password  sufficient pam_unix.so     nullok
password  optional  pam_permit.so

session   required  pam_limits.so
session   required  pam_unix.so
session   optional  pam_krb5.so
session   optional  pam_ldap.so
session   optional  pam_permit.so

make sure to hardlink su-l to su before continuing

vim /etc/pam.d/su
auth		sufficient	pam_krb5.so
auth		sufficient	pam_ldap.so
auth		sufficient	pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth		sufficient	pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth		required	pam_wheel.so use_uid
auth		required	pam_unix.so use_first_pass
account		sufficient	pam_krb5.so
account		sufficient	pam_ldap.so
account		required	pam_unix.so
session		sufficient	pam_krb5.so
session		sufficient	pam_ldap.so
session		required	pam_unix.so


export EDITOR=nano

and add the following:

%admins ALL=(ALL) ALL
%maintainers ALL=(ALL) ALL
%users ALL=(ALL) ALL


pacman -S ntp nfs-utils


ktadd host/<machine-name>.cslabs.clarkson.edu

add this to fstab:	/mnt	nfs	vers=3,sec=krb5i,nolock,x-systemd.automount	0	0