techne/freebsd.org
2024-09-23 16:24:54 -05:00

64 lines
1.2 KiB
Org Mode

#+title: FreeBSD
** Install the ports tree
Source: [[https://docs.freebsd.org/en/books/handbook/ports/#ports-using-installation-methods][Chapter 4. Installing Applications: Packages and Ports | FreeBSD Documentation Portal]]
*** Ensure the FreeBSD source code is checked out
#+BEGIN_SRC shell
sudo git clone -o freebsd -b releng/14.1 https://git.FreeBSD.org/src.git /usr/src
#+END_SRC
*** Check out the ports tree
#+BEGIN_SRC shell
sudo git clone --depth 1 https://git.FreeBSD.org/ports.git -b 2024Q3 /usr/ports
#+END_SRC
To switch to a different quarterly branch:
#+BEGIN_SRC shell
sudo git -C /usr/ports switch 2024Q4
#+END_SRC
** drm-61-kmod
Install from the ports tree.
#+BEGIN_SRC shell
cd /usr/ports/graphics/drm-61-kmod
sudo make install clean
#+END_SRC
Alternatively, for Alderlake GPUs:
#+BEGIN_SRC shell
sudo pkg install drm-kmod
#+END_SRC
Edit ~/etc/rc.conf~:
#+BEGIN_SRC shell
kld_list="i915kms"
#+END_SRC
Add user to ~video~ group:
#+BEGIN_SRC shell
sudo pw groupmod video -m jas
#+END_SRC
** Mount filesystems in single-user mode
When booted into single-user mode.
#+BEGIN_SRC shell
fsck
mount -u /
mount -a -t zfs
zfs mount -a
#+END_SRC
You should now be able to edit files, add/remove packages, etc.