2. Linux Installation
Installation
Prime the USB
sudo dd if=$PWD/archlinux-t2-2024.07.13-t2-x86_64.iso of=/dev/rdisk2 bs=4M;
Pree chroot
wipefs /dev/sda2 passwd dhcpcd fdisk /dev/sda mkfs.ext4 /dev/sda3 mount /dev/sda3 /mnt/ mkswap /dev/sda2 swapon /dev/sda2
Bootstrap
t2strap /mnt base linux-firmware iwd grub nano sudo htop sudo wget networkmanager tbtools gptfdisk iperf3 rdma-core iproute2 nfs-utils git base-devel which emacs-nox gcc autoconf cmake dkms openssl man-db man-pages openssh inetutils intel-compute-runtime hwloc ipv6calc tree thermald screenfetch lm_sensors ntp cronie slurm-llnl mount /dev/sda1 /mnt/boot genfstab -U -p /mnt >> /mnt/etc/fstab arch-chroot /mnt
Emacs config
;;#cat .emacs ;; Basic emacs (setq backup-inhibited t) (setq auto-save-default nil)
configs
passwd ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime hwclock --systohc emacs /etc/locale.gen # localectl set-locale LANG="en_US.UTF-8" # Booted USB with systemd, can't operate export EDITOR=emacs visudo
#+end_src
Services
systemctl enable t2fanrd systemctl enable thermald.service systemctl enable NetworkManager.service systemctl enable sshd.service systemctl enable ntpd.service systemctl enable cronie.servicea
Mkinitcpio
emacs /etc/mkinitcpio.conf MODULES=(apple-bce)
hostname
emacs /etc/hostname
disable ssh pass
emacs /etc/ssh/sshd_config
Thunderbolt udev /etc/udev/rules.d/99-local.rules
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
IPV6 address mode for proper roce
I'll touch on IP config later.
/etc/sysctl.d/ emacs /etc/sysctl.d/99-sysctl.conf net.ipv6.conf.default.addr_gen_mode = 1 net.ipv6.conf.thunderbolt0.addr_gen_mode = 1 net.ipv6.conf.thunderbolt1.addr_gen_mode = 1 net.ipv6.conf.thunderbolt2.addr_gen_mode = 1 net.ipv6.conf.thunderbolt3.addr_gen_mode = 1
makepkg -j6
emacs /etc/makepkg.conf
Grub
emacs /etc/default/grub GRUB_CMDLINE_LINUX="quiet splash intel_iommu=on iommu=pt pcie_ports=compat" emacs /boot/grub/grub.cfg /etc/fstab
# Setup grub-install --no-nvram --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB ls /boot/EFI/GRUB/grubx64.efi mv /boot/EFI/GRUB/grubx64.efi /boot/System/Library/CoreServices/boot.efi rm -rf /boot/EFI/
Rebuild kernel
pacman -S linux-t2 linux-t2-headers Required for proper mkinitcpio
pacman.conf
/mnt/etc/pacman.conf [arch-mact2] Server = https://mirror.funami.tech/arch-mact2/os/x86_64 SigLevel = Never #+begin_example
Grub
grub-install --no-nvram --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg mkdir -p System/Library/CoreServices/ rmdir EFI/GRUB/ rmdir EFI/
NFS mount
emacs /etc/makepkg.conf
ZFS
git clone https://aur.archlinux.org/zfs-linux-git.git cd zfs-linux-git makepkg -si echo zfs > /etc/modules-load.d/zfs.conf
Building Kernel
emacs /etc/makepkg.conf
git clone https://github.com/NoaHimesaka1873/linux-t2-arch cd linux-t2-arch makepkg -si # Edit parameters # Dev runs: --noextract --nobuild
Example /etc/fstab
# Static information about the filesystems. # See fstab(5) for details. # <file system> <dir> <type> <options> <dump> <pass> # /dev/sda2 UUID=8a9e5242-556d-4f78-905f-d06d7b8d0dc9 / ext4 rw,relatime,stripe=8191 0 1 # /dev/sda1 UUID=AFCB-12E5 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
#+end_example
Disable hyperthread
cmd-r boot: nvram SMTDisable=%01