This shows you the differences between two versions of the page.
linux:arch_workstation_setup [2018/06/15 02:11] bmiddha [nfs home dir] |
linux:arch_workstation_setup [2021/05/02 21:36] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Arch Workstation Setup ====== | ||
- | Boot into archiso | ||
- | ===== Partitions ===== | ||
- | |||
- | Need MBR partition scheme | ||
- | <code> | ||
- | mkfs.ext4 /dev/sdxy | ||
- | mount /dev/sdxy /mnt | ||
- | </code> | ||
- | |||
- | ===== UIUC mirror ===== | ||
- | <file|/etc/pacman.d/mirrorlist> | ||
- | ## UIUC | ||
- | Server = http://cosmos.cites.illinois.edu/pub/archlinux/$repo/os/$arch | ||
- | </file> | ||
- | |||
- | ===== Time ===== | ||
- | <code> | ||
- | timedatectl set-ntp true | ||
- | </code> | ||
- | |||
- | ===== Install arch ===== | ||
- | <code> | ||
- | pacstrap /mnt base base-devel | ||
- | </code> | ||
- | |||
- | ===== Swap ===== | ||
- | <code> | ||
- | fallocate -l 6G /mnt/swapfile | ||
- | chmod 600 /mnt/swapfile | ||
- | mkswap /mnt/swapfile | ||
- | swapon /mnt/swapfile | ||
- | </code> | ||
- | |||
- | ===== Generate fstab ===== | ||
- | <code> | ||
- | genfstab -U /mnt >> /mnt/etc/fstab | ||
- | </code> | ||
- | replace /mnt/swapfile with /swapfile in /etc/fstab | ||
- | <code> | ||
- | /swapfile none swap ........ | ||
- | </code> | ||
- | |||
- | ===== Chroot ===== | ||
- | <code> | ||
- | arch-chroot /mnt | ||
- | </code> | ||
- | |||
- | ===== Timezone ===== | ||
- | <code> | ||
- | ln -sf /usr/share/zoneinfo/Region/City /etc/localtime | ||
- | </code> | ||
- | Set clock to localtime for Windows dualboot | ||
- | <code> | ||
- | hwclock --systohc --localtime | ||
- | </code> | ||
- | |||
- | ===== Locale ===== | ||
- | uncomment en_US.UTF-8 in /etc/locale.gen | ||
- | create /etc/locale.conf | ||
- | <file|/etc/locale.conf> | ||
- | LANG=en_US.UTF-8 | ||
- | </file> | ||
- | |||
- | ===== Genereate Locale ===== | ||
- | <code>locale-gen</code> | ||
- | |||
- | ===== Hostname from DHCP ===== | ||
- | append to /etc/dhcpcd.conf | ||
- | <code> | ||
- | env force_hostname=YES | ||
- | </code> | ||
- | |||
- | ===== Auto DHCP on boot ===== | ||
- | create /etc/netctl/lan | ||
- | <file|/etc/netctl/lan> | ||
- | Interface=enp6s0 | ||
- | Connection=ethernet | ||
- | IP=dhcp | ||
- | </file> | ||
- | enable lan | ||
- | <code> | ||
- | netctl enable lan | ||
- | </code> | ||
- | |||
- | ===== Hosts file ===== | ||
- | <file|/etc/hosts> | ||
- | 127.0.0.1 localhost | ||
- | ::1 localhost | ||
- | </file> | ||
- | |||
- | ===== Create acmadmin ===== | ||
- | <code> | ||
- | useradd -d /opt/acmadmin -m -G wheel acmadmin | ||
- | passwd acmadmin | ||
- | </code> | ||
- | |||
- | ===== Sudo access to wheel ===== | ||
- | /etc/sudoers | ||
- | uncomment this line | ||
- | <code> | ||
- | %wheel ALL=(ALL) ALL | ||
- | </code> | ||
- | |||
- | ===== Pacman conf ===== | ||
- | /etc/pacman.conf | ||
- | uncomment the lines | ||
- | <code> | ||
- | [multilib] | ||
- | Include = /etc/pacman.d/mirrorlist | ||
- | </code> | ||
- | <code> | ||
- | pacman -Sy | ||
- | </code> | ||
- | |||
- | ===== Install bootloader ===== | ||
- | <code> | ||
- | mkinitcpio -p linux | ||
- | pacman -S grub ntfs-3g os-prober intel-ucode | ||
- | grub-install /dev/sdx | ||
- | grub-mkconfig -o /boot/grub/grub.cfg | ||
- | </code> | ||
- | |||
- | ===== Reboot ===== | ||
- | <code> | ||
- | exit | ||
- | umount -R /mnt | ||
- | reboot | ||
- | </code> | ||
- | |||
- | ===== Install openssh ===== | ||
- | <code> | ||
- | sudo pacman -S openssh | ||
- | sudo systemctl enable sshd | ||
- | </code> | ||
- | |||
- | ===== Create acmguest user ===== | ||
- | <code> | ||
- | sudo useradd -m -d /opt/acmguest acmguest | ||
- | sudo passwd acmguest | ||
- | </code> | ||
- | <file|/etc/sudoers.d/acmguset-sudo> | ||
- | acmguest ALL=(root) NOPASSWD: /usr/bin/guestd | ||
- | </file> | ||
- | |||
- | ===== LDAP Setup ===== | ||
- | [[linux:arch_ad_backend]] | ||
- | ===== mount home dir ===== | ||
- | Install nfs-utils | ||
- | <code> | ||
- | sudo pacman -S nfs-utils | ||
- | </code> | ||
- | <file|/etc/fstab> | ||
- | . | ||
- | . | ||
- | 172.29.0.6:/acm-home /home nfs noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0 | ||
- | 172.29.0.7:/pkgs-64 /var/cache/pacman/pkg nfs noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0 | ||
- | </file> |