If you’re reading the plain text or Asciidoc version, see the generated PDF in this gist for a nice version of this guide.
Congrats on wanting to install KDE on Gentoo! In total, this guide may take you up to 12 hours to complete. Only 2 - 4 of those hours will be actively completing tasks. The other 8 - 10 could be waiting for the various packages to install, especially KDE itself, which will take the longest. Make a lunch, grab a coffee, and let’s begin!
I put some effort into simplifying the guide into tasks. You’ll notice those in the green boxes. Those are meant to simplify the current step, so it is very clear as to what the goal is.
This guide was run on a Thinkpad X1 Carbon (Gen 9). Nothing truly fancy (intel based), so I believe that steps here can be adapted to most systems out there. There’s some hardware combinations that require further work from you, and, guess what? Yes, go read the Gentoo wiki when you need more information.
Ensure that:
-
Your machine has safe boot disabled (turn off in your BIOS)
-
You have a UEFI-capable machine (verify with a non-empty result of
find /sys/firmware/efi/efivars
) -
You have at least 50G of storage (more is better), and more than 4G of RAM (less than this, and you’ll have a hard time running KDE, internet browsing, etc.)
This guide will give you:
-
An EFI-stub bootloader
-
dist-kernel
-
openrc as the default init system
-
doas
(instead ofsudo
) -
KDE with defaults (wayland session)
You will not get:
-
Dual boot (with Windows)
-
Encryption
Also, I’m assuming you know how to create your own USB drive with an image of
the LiveCD or minimal Gentoo install system. You can use lots of methods for
this. On Windows, that would be rufus
and on Linux, Ventoy
works really
well.
You just booted in to the LiveCD or Minimal Gentoo install environment. You’ll need access to an internet connection to install Gentoo.
Some common ways to connect are:
-
Ethernet. If you can plug an Ethernet cord into your computer for internet access, there’s no steps you need to take: you’ll have an internet connection immediately (barring some unique network situations - please see the networking part of the Handbook).
-
Wifi systray. In the LiveCD (gui) connect to the internet via the Wifi system tray utility, or again, use your ethernet connection (if available)
-
net-setup. Use
net-setup
to connect to wifi:-
Check your interfaces (cards) with
ifconfig -a
. You should see a device likewlan0
orwlp2s0
. Note the name. -
Connect with:
net-setup YOURDEVICENAME
(from the step above). You can usually select automatic IP (with DHCP) in the dialogs that follow. You’ll need to know your network name, and passkey. -
Back in the terminal, wait up to 30 seconds, then check if you have an IP (you’ll see it in under your device with
ifconfig -a
).
-
-
USB-tether / hotspot. You can even connect your phone to your PC, provided your phone allows for USB-tethering. In that case, plugging your phone in, and waiting a few moments should get you a connection as well (if your phone uses wifi, it will use that - be aware that the PC will use data on your phone if there’s no wifi available.)
Once booted into the Live environment, connect to the internet using one of the methods above.
Next, we make sure that we have superuser privileges as we install the system.
In the terminal or konsole
on the LiveCD,
-
Change your password:
sudo passwd
-
(LiveCD only) Elevate your terminal to superuser with
su -
Lastly,
Synchronize the time with your machine for safety and performance: chronyd -q
In the steps that follow, it is assumed that you are running the commands as a superuser. You shouldn’t have to put "sudo" or "doas" in front of any commands, as the above steps should have elevated your shell to superuser.
Next, we partition the storage to prepare it for install.
I’ll assume you have one single storage device, but you can easily use other drives to create partitions, if desired.
Confirm the storage drive that Gentoo will be installed on with lsblk
.
This should show something like the following:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 1000M 0 part
├─nvme0n1p2 259:2 0 150G 0 part
└─nvme0n1p3 259:3 0 326G 0 part
Instead of nvme0n1
you may have sda
or vda
, etc.
It is quite important to ensure that you know which storage device you will be installing Gentoo on.
Warning
|
If you’re not careful in the next step, it may cause you to permanently lose data. |
If you understand this, and you’re happy to continue, let’s get to it!
-
- Create the GPT Partition Table
-
-
Run
gdisk /dev/nvme0n1
(replacenvme0n1
with your device name) -
Type o and follow the prompts to create a new GPT partition table.
-
Type p to confirm the new partition layout. Confirm that the name of the storage device as displayed matches your intended target.
-
-
- Create the EFI Partition
-
-
Type n to create a new partition.
-
Partition number: Press Enter (defaults to 1).
-
First sector: Press Enter to use the default.
-
Last sector: Type +1000M to create a 1000 MiB EFI partition.
-
Hex code or GUID: Type EF00 (EFI System Partition).
-
-
- Create the root partition
-
-
Type n to create a new partition.
-
Partition number: Press Enter (defaults to 2).
-
First sector: Press Enter to use the default.
-
Last sector: Type +150G to create a root partition (you can change this).
-
Hex code or GUID: Press Enter to use the default (8300 for Linux Filesystem).
-
-
- Create the home partition
-
-
Type n to create a new partition.
-
Partition number: Press Enter (defaults to 3).
-
First sector: Press Enter to use the default.
-
Last sector: Press Enter to use the rest of the disk.
-
Hex code or GUID: Press Enter to use the default (8300 for Linux Filesystem).
-
-
- Write the changes to the disk
-
-
Type w to write the partition table.
-
Create a GPT partition table with an EFI, root, and home partitions. Use the steps above as a guide. Keep in mind that the sizes of each partition should reflect your storage capacity.
Note that this scheme is written to the partition table only. It does not reflect the actual on-disk truth. To that end, we format the partitions with:
Format the partitions with:
mkfs.vfat -F 32 /dev/nvme0n1p1
mkfs.xfs /dev/nvme0n1p2 (1)
mkfs.ext4 /dev/nvme0n1p3 (2)
-
You could certainly use
mkfs.ext4
here. We’re choosingxfs
as it is the recommended filesystem for Gentoo. -
xfs
doesn’t allow for shrinking (as of writing) so we choseext4
. In the future, if you decide that your root partition is too small, you can always increase its size. In that case, you can shrink your home partition as needed.
And finally, mount the partitions:
Mount the partitions:
mkdir -p /mnt/gentoo/{,efi,home}
mount /dev/nvme0n1p2 /mnt/gentoo
mount /dev/nvme0n1p1 /mnt/gentoo/efi
mount /dev/nvme0n1p3 /mnt/gentoo/home
This will result in something like (again, run lsblk
):
...
├─nvme0n1p1 259:4 0 1000M 0 part /mnt/gentoo/efi (1)
├─nvme0n1p2 259:5 0 150G 0 part /mnt/gentoo (2)
└─nvme0n1p3 259:6 0 326G 0 part /mnt/gentoo/home
-
Your ESP partition
-
We’ll call
/dev/nvme0n1p2
ROOTPART
in the article (this may be different for you)
We will create the swap as /swapfile
when
we chroot into our system in the steps that follow.
The Gentoo stage 3 tarball is a boilerplate bundle of a small Linux-based system. We will grab the desktop-openrc archive from the distfiles repo, and unpack it into our newly-mounted system.
Get the tarball and related checksum files:
cd /mnt/gentoo
wget -r -np -nd --accept "stage*" \
"https://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-desktop-openrc/" (1)
-
Ensure that your downloaded archive is the desktop-openrc variety and that the URL is exactly as shown!
You could theoretically skip this small step, but I highly recommend that you take a few minutes to ensure that your copy of the tar.xz file is not compromised:
Verify the tarball:
sha256sum --check stage3-amd64-*.tar.xz.sha256
If successful, you will see a message similar to:
stage3-amd64-desktop-openrc-20241220T192248Z.tar.xz: OK
.
Unpack the tarball:
tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner -C /mnt/gentoo
After this command, /mnt/gentoo
will contain the skeleton of your new Linux system.
chroot
(Change root) is a Unix system utility used to change the apparent root
directory to create a new environment logically separate from the main system’s
root directory (source)
Ensure that networking works even after entering our new environment:
cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
Mirror the mount state of the current system to the chroot system:
mount --types proc /proc /mnt/gentoo/proc && \
mount --rbind /sys /mnt/gentoo/sys && \
mount --make-rslave /mnt/gentoo/sys && \
mount --rbind /dev /mnt/gentoo/dev && \
mount --make-rslave /mnt/gentoo/dev && \
mount --bind /run /mnt/gentoo/run && \
mount --make-slave /mnt/gentoo/run
And finally:
chroot /mnt/gentoo /bin/bash
Congratulations, you’re now in your new system! Let’s make sure our environment is properly loaded:
env-update && source /etc/profile && export PS1="(chroot) ${PS1}"
Set the root password:
passwd
At this point, we add common flags, rust flags, use flags, any video cards,
license acceptance, and finally, binary packages to make.conf
.
Whenever this guide mentions adding or editing a file, you can use
nano
as the editor. It’s a simple text editor that will get the
job done. To save and exit a file, simply press Ctrl+x and
follow the prompts to save.
/etc/portage/make.conf
COMMON_FLAGS="-march=native -O2 -pipe" (1)
RUSTFLAGS="${RUSTFLAGS} -C target-cpu=native" (2)
USE="-gtk -gnome dist-kernel qt5 kde" (3)
VIDEO_CARDS="intel" (4)
ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE" (5)
FEATURES="${FEATURES} getbinpkg" (6)
FEATURES="${FEATURES} binpkg-request-signature"
Change your /etc/portage/make.conf
file to reflect the above changes.
For more modern systems (>1GB), your swap space should be at a minimum be equal to your physical memory (RAM) size "if you use hibernation", otherwise you need a minimum of round(\$sqrt(RAM)\$) and a maximum of twice the amount of RAM. source
From the handbook, we learn:
RAM size | Suspend support? | Hibernation support? |
---|---|---|
2 GB or less |
2 × RAM |
3 × RAM |
2 to 8 GB |
RAM amount |
2 × RAM |
8 to 64 GB |
8 GB minimum, 16 maximum |
1.5 × RAM |
64 GB or greater |
8 GB minimum |
Hibernation not recommended! |
The lesson is, you really do have to take into account your needs. When selecting the size, doubling the size of your RAM is a very safe amount, especially if you think you will use very RAM-intensive applications and/or system hibernation.
For the purposes of simplicity, we can create a decently-sized swap file, the same size as the RAM:
cd /
mkswap -U clear --size 16G --file /swapfile (1)
swapon /swapfile
-
Assuming you have 16G of RAM
Because we created a swapfile that can be resized, feel free to monitor your
system as you use it: you can always adjust the size in the future. Simply
turn swap off with swapoff
, delete the swapfile, and repeat the steps above.
In order for EFI stub boot to work, and hence uefi-mkconfig, we verify that PARTTYPE, etc. are not blank:
lsblk -o NAME,PARTTYPE
PARTTYPE
s should contain a UUID similar to:
NAME PARTTYPE
nvme0n1
├─nvme0n1p1 c12a7328-f81f-11d2-ba4b-00a0c93ec93b
├─nvme0n1p2 0fc63daf-8483-4772-8e79-3d69d8477de4
└─nvme0n1p3 0fc63daf-8483-4772-8e79-3d69d8477de4
Verify that the lsblk
printout shows non-empty PARTTYPES
Ensure packages sync with fast mirrors:
emerge-webrsync
Optionally, you can also pick faster mirrors:
emerge --ask --verbose --oneshot app-portage/mirrorselect
mirrorselect -c USA -s3 -b10 -o >> /etc/portage/make.conf
The fstab (file system table) file (/etc/fstab) is a configuration file that defines how and where the main filesystems are to be mounted, especially at boot time source.
Simply, in the fstab file we tell the system how to mount devices at boot time. This can be done by pointing to the partitions we created at the beginning of this guide. However, systems that have multiple storage devices can rename their partitions unexpectedly. The safest way to refer to these partitions is by declaring their UUIDs, and that’s the method we use next.
We’ll use the handy-dandy genfstab that autogenerates the fstab entries for us.
emerge --ask --verbose --oneshot sys-fs/genfstab
To get a sneak-peak at what will generate, we run genfstab
on the root filesystem /
:
genfstab -U / (1)
-
-U
tells genfstab to generate UUIDs
This will produce something like:
# /dev/nvme0n1p2
UUID=f8c5e2ea-2a11-4fd3-8d92-2e8839bad58a / xfs [...]
# /dev/nvme0n1p3
UUID=be80f048-7b36-47d1-9a44-df535f052767 /home ext4 [...]
# /dev/nvme0n1p1
UUID=B009-5181 /efi vfat [...]
/swapfile none swap [...]
If genfstab
did not generate an output similar to this (i.e. your partitions
are not visible), perhaps you did not mount the partitions properly before the chroot.
Exit the chroot system with exit
, mount the systems properly, and come back
to this step to see if genfstab
generates the required entries.
If this seems correct to you, we can apply the changes with:
genfstab -U / >> /etc/fstab
To install KDE, we will select the desktop/plasma profile.
Running eselect profile list
should produce a list similar to:
...
[23] default/linux/amd64/23.0/desktop (stable) * (1)
[24] default/linux/amd64/23.0/desktop/systemd (stable)
[25] default/linux/amd64/23.0/desktop/gnome (stable)
[26] default/linux/amd64/23.0/desktop/gnome/systemd (stable)
[27] default/linux/amd64/23.0/desktop/plasma (stable) (2)
[28] default/linux/amd64/23.0/desktop/plasma/systemd (stable)
[29] default/linux/amd64/23.0/no-multilib (stable)
[30] default/linux/amd64/23.0/no-multilib/systemd (stable)
[31] default/linux/amd64/23.0/no-multilib/hardened (stable)
...
-
This is probably the profile that is currently selected
-
This is our target
Change to this profile with:
eselect profile set 27 (1)
-
Replace 27 with the correct number from the printout in your terminal
List the available locales with ls -l /usr/share/zoneinfo
.
Link your preferred region and locale to localtime.
ln -sf /usr/share/zoneinfo/REGION/LOCALE /etc/localtime
Assuming your locale is en_US
,
Add these lines to /etc/locale.gen
:
en_US ISO-8859-1
en_US.UTF-8 UTF-8
Even if your locale is not en_US
, add it in addition to your own.
Some software relies on the en_US
locale to be present in order to run correctly.
Now, generate the locales:
locale-gen
If you use a different keyboard (like de
) layout you can edit /etc/conf.d/keymaps
or with a command like:
echo keymap="de" >> /etc/conf.d/keymaps
See this wiki page for more info.
Finally, we tell our system which locale we want to use. List the options with:
eselect locale list
and make a note of your locale with the utf8
postfix (for me that
would be en_US.utf8
):
Available targets for the LANG variable:
[1] C
[2] C.utf8
[3] POSIX
[4] en_US
[5] en_US.iso88591
[6] en_US.utf8 (1)
[7] C.UTF8 *
[ ] (free form)
-
This is our target
Set the number accordingly:
Select your locale from eselect locale list
:
eselect locale set 6
and reload the environment:
env-update && source /etc/profile && export PS1="(chroot) ${PS1}"
There’s actually quite a few options for booting your system.
Some common choices are GRUB
and systemd-boot
(which works on openrc
init systems, despite its name).
However, we’ll keep it simple , and elect to
boot with EFI stub. It’s
fast, gets out of the way nicely, and relatively easy to setup.
Let’s go ahead and prep the system to use the EFI stub bootloader.
Add the following lines to the installkernel
file:
Add the following to /etc/portage/package.accept_keywords/installkernel
:
sys-kernel/installkernel
sys-boot/uefi-mkconfig
app-emulation/virt-firmware
The above needs to exist because EFI stub is somewhat experimental, and there’s no guarantee that your motherboard will support it. But! If you’re installing on hardware that does not accept EFI stub as a bootloader, then you’re probably already prepared to do your own customized booting. In any case, GRUB handles many different situations, and I highly recommend it if something goes awry.
Let’s tell installkernel
to be efistub-aware and make sure dracut
creates the
initramfs we need to load a functional system:
Add the following to /etc/portage/package.use/installkernel
:
sys-kernel/installkernel efistub dracut
and emerge installkernel
:
emerge --ask sys-kernel/installkernel
Finally, create the necessary EFI location:
mkdir -p /efi/EFI/Gentoo
Customizing a kernel can be done on any Linux system, but Gentoo and its handbook is particularly attuned to what settings you need. There are many articles which include the necessary kernel settings required to enable a feature.
You can’t go wrong with the distribution kernel, gentoo-kernel-bin
, and that’s the one we’ll install.
In the future, once you have a working kernel installed, feel free to try and
compile your own!
Install the kernel with:
emerge --ask sys-kernel/gentoo-kernel-bin (1)
-
You will see warnings about missing firmware - we will install these soon
Because it’s the only kernel on our system, the next step is optional, but helpful to see what kernel your system is aware of:
eselect kernel list
You should see only one option, and it’s already selected.
Add your [rootpart] to the uefi-mkconfig file.
KERNEL_CONFIG="... ; root=/dev/ROOTPART" (1)
-
Ensure that you replace
ROOTPART
with the partition that you created previously (for example/dev/sda2
)
Alternatively, you can also choose to designate this with a UUID, similar to our method for ensuring our fstab correctly reflects our system. In that case you would instead add:
KERNEL_CONFIG="... ; root=UUID=YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY" (1)
-
Replace the YYYY … with the UUID for your
ROOTPART
partition
Add your ROOTPART
to /etc/default/uefi-mkconfig
using either of the methods listed above.
We should ensure that our UEFI sees our kernel image, and that it’s set as the default.
Run efibootmgr
. You should get something like:
BootOrder: 01FF,0200,001A,001B,001C,001D,001E,001F,0020,... (1)
...
...
<other entries>
...
...
Boot01FF* UMC 1 Gentoo Linux 6.6.62 HD(1,GPT,82421fb4-0630-4d66-bc7d-4f196c3ece9e,0x800,0x1f4000)/\EFI\Gentoo\vmlinuz-6.6.62-gentoo-dist.efi (2)
-
Note that
01FF
will boot first, as confirmed by … -
… the entry here
Using efibootmgr
, check that your kernel is selected to boot, as described above.
It’s time to configure your hardware.
Add your CPU capabilities:
emerge --ask --oneshot app-portage/cpuid2cpuflags
echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags
Install linux firmware and sound firmware:
emerge --ask \
sys-kernel/linux-firmware \
sys-firmware/sof-firmware (1)
-
Sound Open Firmware binaries - see this table to verify that your CPU supports it (with most modern-ish CPUs, it will).
Further, for intel architectures,
emerge --ask \
sys-firmware/intel-microcode \
x11-drivers/xf86-video-intel
Microcode updates for AMD processors are provided by the
sys-kernel/linux-firmware
package (installed above).
Please read the Gentoo NVIDIA article for more info on NVIDIA cards.
Now, regenerate the initramfs to ensure your system will boot properly:
emerge --ask --config sys-kernel/gentoo-kernel-bin
USE flags are a big topic and are one of the big reasons Gentoo is reputable for supporting fine-grained control over your Linux system.
Simply put, USE flags tell software what kind of features should be enabled or disabled.
Managing USE flags can be daunting at first, but at its simplest, it is adding or removing flags from a set of files in the /etc/portage/package.use
directory.
We added a set of flags for your CPU above.
These should be in /etc/portage/package.use/00cpu-flags
.
Let’s add some more USE flags to a file called general
(note that any valid
filename will work):
Add the following to /etc/portage/package.use/general
:
app-admin/doas persist media-gfx/gimp heif jpeg2k webp
In a little while, we will install doas
to enable a regular user to run
programs as another user (read: usually as root). The persist
USE flag just
tells doas to compile with that feature enabled (it extends the time that
subsequent doas invocations can be run without entering a password). On gimp
,
we enable support for different media types (there are more), such as heif
and webp
.
Gentoo is a system that respects you. It does not assume / assert on how you want to use your computer. You tell it how you want to use it.
-
Run
equery uses package/name
for your target package and read through the list of options. -
Add each package name and USE flags to a file in your
package.use
directory (as we did above). -
Install the package with
emerge --ask package/name
.
equery
is provided by the app-portage/gentoolkit
package (you can install this now, or later).
There are some caveats to the note above. Namely, sometimes it is necessary to do a @world update, or perhaps add additional USE flags as reported by an unsuccessful emerge attempt. As always, the section in the wiki on emerge is your friend.
You should visit the Gentoo wiki page on USE flags as soon as you’re done with this guide. For instance, setting the desktop profile to plasma enabled some USE flags automatically, and these are the kinds of details you’ll miss out on if you don’t read the wiki (so go read it already!)
Use the method above to discover what USE flags the gimp
package has.
Run the following commands to get a variety of useful system services going:
emerge --ask app-admin/sysklogd && \
rc-update add sysklogd default
emerge --ask sys-process/cronie && \
rc-update add cronie default
rc-update add sshd default
emerge --ask net-misc/chrony
rc-update add chronyd default
emerge --ask \
sys-block/io-scheduler-udev-rules \
sys-fs/xfsprogs \
sys-fs/e2fsprogs \
sys-fs/dosfstools
Add system utilities using instructions above.
For CPU usage profiles, install power-profiles-daemon
:
emerge --ask sys-power/power-profiles-daemon && \
rc-update add power-profiles-daemon default
and enable battery saving options with tlp
:
emerge --ask sys-power/tlp && \
rc-update add tlp default
If you have intel, you can monitor temperature with:
emerge --ask sys-power/thermald && \
rc-config add thermald
Set your hostname and networking routes (replace majatux
with
whatever name you desire):
echo majatux > /etc/hostname
echo hostname="majatux" > /etc/conf.d/hostname (1)
-
This step may be necessary with openrc: it explicitly sets the hostname during boot to override any runtime changes.
Add the following to /etc/hosts
:
127.0.0.1 localhost
::1 localhost
127.0.1.1 majatux
and enable Network Manager:
rc-update add NetworkManager default
We’re ready to install KDE. Congratulations!
This will take a long time (2 - 18 hours, depending on your hardware). Go to sleep, go for a long walk, or just take a break while it runs:
emerge -aq kde-plasma/plasma-meta kde-apps/kde-apps-meta
We need a display manager to manage our sessions. Ok, technically you don’t need a display manager to run KDE, but I think most people will appreciate having a login screen after their computer boots.
emerge --ask gui-libs/display-manager-init
Set SDDM as the display manager.
Add the following content to ./etc/conf.d/display-manager
:
CHECKVT=7
DISPLAYMANAGER="sddm"
Add dbus, activate elogind, and sddm to start-up services:
rc-update add dbus default
rc-update add elogind boot
rc-update add display-manager default
Enable configuring SDDM from KDE:
emerge --ask kde-plasma/sddm-kcm
The first time you boot into the SDDM display manager, you may be a bit underwhelmed by the look. Fear not! You can set the theme for SDDM through KDE settings after your first log in (in fact, you can set it to your current theme - Breeze, etc.)
Add a regular user (here, marian) to the system:
useradd -m -G wheel,video,plugdev marian
passwd marian
Let’s use the simpler doas
for superuser elevation:
emerge --ask app-admin/doas
To let anyone in the wheel
group to run privileged commands:
Add the following to /etc/doas.conf
permit persist :wheel
Exit chroot:
exit
unmount the system,
umount -R /mnt/gentoo
and …
reboot
With this, let’s take a look at a few tasks that you may need to do after the first reboot.
Login as your regular user that you created in the steps above.
Open konsole
. Let’s make sure we have the current emerge packages and update @world:
doas emerge --sync
doas emerge --ask --changed-use --deep @world
Here’s some follow up things I will add soon. Please note that any notes here are incomplete, wrong, and should not be followed ad verbatim. User beware!
emerge --ask --verbose --update --deep --newuse --getbinpkg @world
emerge -av \
media-fonts/liberation-fonts \
media-fonts/libertine \
media-fonts/noto \
media-fonts/dejavu \
media-fonts/droid \
media-fonts/sil-gentium \
media-fonts/ubuntu-font-family \
media-fonts/urw-fonts \
media-fonts/corefonts \
media-fonts/unifont \
media-fonts/inter
View all available (system) fonts:
eselect fontconfig list
Enable the ones you want en masse:
for i in {35,36,37,40,57,58,59,63,65}; do eselect fontconfig enable $i ; done
emerge -aquDU @world media-fonts/terminus-font
eselect fontconfig list
eselect fontconfig enable 63 (1)
nvim /etc/conf.d/consolefont
rc-update add consolefont boot
-
change this number
GTK-based software can use Breeze (or Breeze-like):
emerge -av kde-plasma/breeze-gtk kde-gtk-config
Then, select Settings > Colors & Themes > Global Themes > Configure GNOME/GTK Application Styles
Probably don’t need this here. The user will know what they want.
app-admin/doas app-admin/pass app-admin/stow app-admin/sysklogd app-editors/neovim app-eselect/eselect-repository app-misc/tmux app-misc/wayland-utils app-office/libreoffice app-portage/gentoolkit app-portage/pfl app-shells/fzf app-shells/gentoo-zsh-completions app-shells/zsh app-shells/zsh-completions app-shells/zsh-syntax-highlighting app-text/aha app-text/poppler app-text/tree app-text/zathura dev-lua/luarocks dev-python/pynvim dev-python/secretstorage dev-ruby/bundler dev-util/clinfo dev-util/tree-sitter-cli dev-util/vulkan-tools dev-vcs/git games-misc/cowsay kde-apps/kde-apps-meta kde-plasma/breeze-gtk kde-plasma/kde-gtk-config kde-plasma/plasma-meta media-fonts/corefonts media-fonts/dejavu media-fonts/droid media-fonts/liberation-fonts media-fonts/libertine media-fonts/noto media-fonts/sil-gentium media-fonts/terminus-font media-fonts/ubuntu-font-family media-fonts/unifont media-fonts/urw-fonts media-gfx/gimp media-gfx/inkscape media-gfx/pdf2svg media-libs/libexif media-libs/libva-intel-media-driver media-libs/mesa media-libs/mutagen net-libs/nodejs net-misc/chrony net-misc/whois net-misc/yt-dlp net-p2p/syncthing sys-apps/bat sys-apps/dmidecode sys-apps/fd sys-apps/fwupd sys-apps/hwinfo sys-apps/lshw sys-apps/merge-usr sys-apps/pciutils sys-apps/ripgrep sys-apps/usbutils sys-auth/rtkit sys-block/io-scheduler-udev-rules sys-firmware/intel-microcode sys-firmware/sof-firmware sys-fs/dosfstools sys-fs/genfstab sys-fs/ncdu sys-fs/xfsprogs sys-kernel/gentoo-kernel-bin sys-kernel/installkernel sys-kernel/linux-firmware sys-power/power-profiles-daemon sys-power/thermald sys-power/tlp sys-process/cronie www-client/firefox www-plugins/passff-host x11-apps/mesa-progs x11-apps/xdpyinfo x11-drivers/xf86-video-intel x11-terms/wezterm
If this is in something like packages.txt
, then we can run something like:
xargs -a packages.txt emerge --ask
Just go read the Gentoo page.
emerge -av sys-apps/dmidecode \
app-misc/wayland-util \
app-text/aha \
dev-util/clinfo \
dev-util/vulkan-tools \
sys-apps/fwupd
x11-apps/mesa-progs \
x11-apps/xdpyinfo \
Partition drive according to instructions.
/efi -> boot (~ 1G) / -> root (the rest)
-
mkfs.vfat -F32 boot
(don’t format root, yet!) -
cryptsetup luksFormat /dev/nvme0n1p2
-
cryptsetup open /dev/nvme0n1p2 cryptroot
-
pvcreate /dev/mapper/cryptroot
-
vgcreate vg /dev/mapper/cryptroot
-
lvcreate -L 16G vg -n swap
-
lvcreate -l 100%FREE vg -n root
-
mkfs.xfs /dev/vg/root
-
mkswap /dev/vg/swap
-
swapon /dev/vg/swap
-
mount /dev/vg/root /mnt/gentoo
-
mkdir /mnt/gentoo/efi
-
mount /dev/nvme0n1p1 /mnt/gentoo/efi
NAME FSTYPE FSAVAIL FSUSE% MOUNTPOINTS nvme0n1 ├─nvme0n1p1 vfat 854.9M 16% /efi └─nvme0n1p2 crypto_LUKS └─luks-xx LVM2_member ├─vg-swap swap [SWAP] └─vg-root xfs 186.8G 80% /var/lib/docker
In chroot
:
/etc/dracut.conf.d/crypt.conf
hostonly="yes"
add_dracutmodules+=" crypt dm rootfs-block "
/etc/default/uefi-mkconfig
KERNEL_CONFIG="%entry_id %linux_name Linux %kernel_version ; root=UUID=b8eaad84-928f-456e-879b-dddef0e78e7a rd.luks.uuid=20ce96f6-adb6-46e1-94ca-85a5f6db0eb0" (1)
-
Note the addition of UUID and rd.luks