Here’s a set of instructions to install fedora on a system the arch way™ with or without dualbooting with windows.

  • Boot fedora live from a USB
  • Get root with sudo -s

WARNING: If your system is UEFI, you already have a windows installation, and you don’t have an ESP, STOP RIGHT NOW, you’ve installed windows in CSM mode, and you will break your windows installation. Either work out how to deal with MBR on your own, or backup your important data, disable CSM from your firmware settings, delete everything, reset the partition table, follow the rest of the instructions, then install windows.

Partitioning

This installation will dual boot with Windows, so i have this partition table on my SSD on /dev/sda

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 447.1G  0 disk
├─sda1   8:1    0     1G  0 part /boot
├─sda2   8:2    0    96G  0 part /
├─sda3   8:3    0    16M  0 part
└─sda4   8:4    0 350.1G  0 part
sdb      8:16   0 931.5G  0 disk
├─sdb1   8:17   0    16M  0 part
└─sdb2   8:18   0 931.5G  0 part
sdc      8:32   1   7.5G  0 disk
└─sdc1   8:33   1   7.5G  0 part /run/media/glacion/FEDORA-WS-L

Some notes:

  • I am not using a swap partition.
  • I don’t have a seperate home partition.
  • /dev/sda1 will be used by both windows and fedora, be careful not to format the ESP if you’ve already installed windows, it’s a pain to get windows’ bootloader installed again. When asked for partition type, enter EF00 for ESP partition.

Filesystems

ESP is vfat, no exceptions. Don’t do this unless you don’t have a working windows(or any other OS) installation. I had installed windows before so i’ll leave ESP as is.

mkfs.vfat -n ESP /dev/sda1

I like to use XFS for my installation filesystem. Use whatever you want, but there’s something you need to do which will be noted in a later section.

mkfs.xfs -L fedora /dev/sda2

Setup

Mount your partitions

mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

…No /boot/efi? Yes, i had prepared my ESP when i was first installing on this computer to be 1G, windows by default create an 100M ESP partition, which is enough for both windows, and kernel, initrd, and bootloader. But 100M won’t be enough if you keep more than 2 kernels if you want to keep multiple kernels installed.

Bootstrapping Fedora

With everything out of the way, let’s install a bare minimum required for a functioning system. Replace or add to glibc-langpack-en if you want localization on your system. Omitting this will cause dnf to install all available langpacks.

dnf install \
--installroot=/mnt \
--releasever=33 \
--setopt=install_weak_deps=False \
--assumeyes \
systemd dnf glibc-langpack-en vim-minimal sudo passwd

Generating /etc/fstab

Arch Linux has a convenient little tool called genfstab that we can use for this.

wget https://github.com/glacion/genfstab/releases/download/1.0/genfstab
chmod +x genfstab
./genfstab /mnt >> /mnt/etc/fstab

Control /mnt/etc/fstab and manually modify if necessary. I’ll remove /dev/zram0 entry since i don’t want swap.

Installation

Chroot into the container

systemd-nspawn -D /mnt

Create user

useradd -c "Ahmetcan Güvendiren" -m -G wheel -s /bin/bash glacion

Set password for the user

passwd glacion

Exit the chroot with C-d

“boot” the newly bootstrapped system.

systemd-nspawn -bD /mnt

Login with your credentials, become root with sudo

I’ll delete some repositories that i don’t use.

rm -f /etc/yum.repos.d/*{*cisco*,*testing*,*modular*}*

I’ll disable installation of weak dependencies

vi /etc/dnf/dnf.conf

Append install_weak_deps=False to the end of that file, save and exit.

Bootloader

Install systemd-udev package with dnf.

dnf install systemd-udev

You may need to edit /etc/resolv.conf if you get an error saying “couldn’t resolve host name”. Add nameserver 1.1.1.1 or something to that file and try again.

Install The Bootloader

bootctl install

…Wait, where’s grub? I don’t use grub, and i recommend you to not use grub as well unless you have a specific setup. If you want grub, you’re on your own.

Configure Initrd

You need to make dracut know whatever your filesystem is. Replace xfsprogs with whatever the programs for your root filesystem is. I use LZ4 for compressing my initrd. Omit that if you’re fine with it.

dnf install dracut xfsprogs lz4
vi /etc/dracut.conf.d/bardiche.conf
# Add these to that file
filesystems+=" xfs "
drivers+=" i915 "
compress="lz4"
hostonly="yes"

Install The Kernel

dnf install kernel
dracut -Nfv --regenerate-all

Bootloader Configuration

There’s now a bootloader entry at /boot/loader/entries/${MACHINE_ID}-${KERNEL_VERSION}.conf

Edit the options section of this file like below

root=UUID=${UUID} ro

The root drive’s UUID can be acquired with blkid tool.

Network Configuration

dnf install NetworkManager NetworkManager-wifi NetworkManager-config-connectivity-fedora

Services

I disable some services due to conflicts or them being not necessary

systemctl disable systemd-homed systemd-resolved NetworkManager-wait-online

Shut Down

Close the chroot with poweroff

Add EFI Entry

Add an EFI entry that points to systemd-boot

efibootmgr -d /dev/sda -p 1 -c -L "Fedora" -l /EFI/systemd/systemd-bootx64.efi

First Boot

Power off the system, unmount everything, and restart your computer.

Connecting to Network

Connect to a network with Ethernet or WiFi.

To connect to WiFi using nmcli use the following:

sudo nmcli device wifi connect ${SSID_NAME} password ${PASSWORD}

Install Some Quality of Life Packages

These packages are not required but recommended.

dnf install rtkit deltarpm zchunk sqlite iputils less bash-completion file rootfiles iproute

Configuration

Configure keymap, hostname, NTP, and system timezone

localectl set-keymap us
hostnamectl set-hostname bardiche
timedatectl set-ntp true
timedatectl set-timezone Europe/Istanbul

SELinux (Optional)

dnf install policycoreutils selinux-policy-targeted audit
touch /.autorelabel
reboot

This may not work, keep your live usb nearby for failures.

GNOME

Fedora Workstation installs the group “Fedora Workstation”, you can list all available groups with dnf group list

Checking what’s in Fedora Workstation

dnf groupinfo "Fedora Workstation"

From these subgroups i’ll check what’s in GNOME group

dnf groupinfo GNOME

From the listed packages i will install some of them:

dnf install mesa-dri-drivers mesa-libEGL gdm gnome-shell nautilus kitty gnome-screenshot eog file-roller-nautilus avahi gnome-session-wayland-session gnome-settings-daemon gnome-control-center gnome-tweaks

After a reboot, GDM will welcome you.

Fractional Scaling

GNOME supports fractional scaling, my screen is better on 125% so i’ll enable that.

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

Then in settings->displays i selected 125% Scale factor

RPMFusion

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

You may want to opt out of nonfree repo of rpmfusion.

Browser

I use chromium-freeworld package from rpmfusion which includes VAAPI support

Setup VAAPI first

dnf install libva intel-media-driver
vainfo

You should see libva info: va_openDriver() returns 0 in the output.

Now install chromium

dnf install chromium-freeworld