5.9 KiB
On Connecting to Your Wireless Network From the ISO The first time
The handbook doesn't cover exactly how to connect wirelessly the first time. It can't solely be done via dhcpcd.
Firstly find your wireless card interface reference:
ip addr
Or:
ifconfig
It will look like wlps60 or something like that.
The ISO comes with wpa_supplicant for connecting. First configure wpa_supplicant with your WIFI SSID and password:
wpa_passphrase "SSID" "PASSWORD" > /etc/wpa_supplicant/wpa_supplicant.conf
Then configure wpa_supplicant to recognize this wifi network:
wpa_supplicant -B -i wlps60 -c /etc/wpa_supplicant/wpa_supplicant.conf
Then use dhcpcd to grab an IP address:
dhcpcd wlps60
And use ping to test:
ping 8.8.8.8
You might still have trouble downloading the stage 3 tarball if your DNS does
not resolve. In which case simply edit /etc/resolv.conf directly:
# /etc/resolv.conf
# Quad 9
nameserver 9.9.9.9
nameserver 149.112.112.112
# Alternatively:
# Cloudflare
nameserver 1.1.1.1
nameserver 1.0.0.1
On mirrorselect
At some point during the installation process, you'll be asked to select your mirrors. Instead of using the handbook's method, use this instead to get the fastest available mirrors:
mirrorselect -s3 -b10 -D
This will take a bit of time, but will ping and download 100KB from each mirror
and then choose the fastest 3 and append it to your /etc/portage/make.conf
file.
On fstab
There is a way to automate fstab population using a package.
emerge -av sys-fs/genfstab
Then simply invoke it:
genfstab
Double check it:
cat /etc/fstab
General Notes
Here is a general speedrun guide to installing gentoo
Install a basic distribution-bin kernel first, then you can:
You can get your current compiler flags from:
zcat /proc/config.gz
You can just output it and then save it as a default that you have.
Also, you can find these same compiler flags in:
/usr/lib/modules/$(uname -r)/build/.config
You actually can use this in the /usr/src/linux-kernel-version
But you just want to make sure to run: make olddefconfig to update with new
options/safe defaults before running the compiling make commands documented in
the Gentoo Handbook.
Watch mental outlaws videos on configuring the kernel (one is more in depth than the others). Make notes on the options he changes and actually research the specific flags he configures in the handbook.
At some point you can adjust the number of threads the kernel can use, which apparently defaults to a high number. Your Ryzen has 24 threads, but you can find out specifically by running
grep -c processor /proc/cpuinfo
Or:
lscpu
And looking at the "Thread(s) per core" section.
Note on Krita/Cuda/obs-studio:
Don't bother installing krita/cuda, the process is too in depth and time consuming, if you really need krita/obs-studio, just use flatpak. If you really need Cuda, consider using Vulkan instead (for llama.cpp).
After Installation
There's a lot to do after installation, but one of the first things you should do is:
Create a New SuperUser
adduser $USER &&
useradd -aG wheel $USER
In package.use add:
app-admin/doas persist
Then install doas:
emerge -av app-admin/doas
Edit /etc/doas.conf:
permit persist :wheel
Test it:
su $USER
doas emerge -av <some-package>
Install openrc-init as PID 1
By default, while Gentoo does use openrc as the service manager, it does not use it as init, rather wrapping SysVInit instead. OpenRC does have an init package however that can be used as init, it just has some caveats.
See The Gentoo Wiki For Full Details
Make sure your system is running fine under sysvinit before proceeding.
Openrc-init is installed by default, no need to emerge.
You just need to change this line in your /etc/default/grub:
#GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX_DEFAULT="init=/sbin/openrc-init"
And, of course, regenerate:
grub-mkconfig -o /boot/grub/grub.cfg
You'll need to reinstantiate the tty's though:
cd /etc/init.d
for n in $(seq 1 6); do ln -s agetty agetty.tty$n; rc-update add agetty.tty$n default; done
Then reboot to have it take effect.
reboot
Note that some aliases for shutting down and rebooting in your .aliases file
are helpful here:
alias shutdown="doas openrc-shutdown -p 0"
alias reboot="doas openrc-shutdown -r 0"
Common packages
There are tons of packages I like, but a few that will be necessary once X11 is installed are:
Matcha Themes Papirus Icon Theme Gobble Window Swallower
You can easily find the rest on Gentoo Wiki or Github.
- LXAppearance
- PAVUControl (audio)
- Gcolor3
- XFCE4-Screenshooter
- difftastic (make sure to configure for use with git)
- ripgrep
- espanso (bring your own)
- neovim (bring your own)
- bspwm/sxhkd (bring your own)
- btop (bring your own catpuccin themes)
- st (bring your own, but install official first so libs are available, then
uninstall and put your own in
/usr/bin) - pipewire/pipewire-pulse/wireplumber (see
.xinitrc) - xbanish
- dunst
- sxiv (pic viewer)
- ripdrag
- pcmanfm
- gimp
- inkscape
- krita (flatpak)
- libreoffice (flatpak ?)
- obs-studio (flatpak!!)
- wine
- vulkan
- ufw (kernel params)
- docker (kernel params)
- nvidia-drivers (see wiki)
- llama.cpp (compile with vulkan, not cuda)
You'll also need fonts:
emerge -av media-fonts/fonts-meta media-fonts/corefonts media-fonts/symbols-nerd-font