Building a custom kernel

Does one have to fire up the Nouveau driver somehow in a custom kernel?

I have been able to compile a custom kernel, but when I boot it, I get no graphical interface. If I boot to runlevel 3, I get no command line prompt. But I can ssh into the box and execute eg dmesg.

I have followed https://fedoraproject.org/wiki/Building_a_custom_kernel and done this:

sudo dnf install fedpkg fedora-packager rpmdevtools ncurses-devel pesign grubby
sudo dnf install qt5-qtbase-devel libXi-devel gcc-c++
sudo echo MY_LOGIN_NAME >> /etc/pesign/users
sudo /usr/libexec/pesign/pesign-authorize
fedpkg clone -a kernel
cd kernel
git fetch
git switch f34
sed -i 's/# define buildid .local/%define buildid .local/g' kernel.spec
sudo dnf builddep kernel.spec
fedpkg local
sudo dnf install --nogpgcheck ./x86_64/kernel-debug-core-5.17.12-100.local.fc34.x86_64.rpm

As one can see, the kernel I have compiled is not very “custom” since I have not made any changes to the code I have checked out using git.

When I ssh into the box and do dmesg>outfile and then inspect outfile, I can see this near the end of the log:

[    8.334884] ACPI: bus type drm_connector registered
[    8.335980] systemd[1]: Activated swap dev-mapper-fedora\x2dswap.swap - /dev/mapper/fedora-swap.
[    8.338589] [drm:drm_core_init [drm]] Initialized

I had expected to see lines mentioning the Nouveau driver right after, but instead the log just stops and the screen freezes.

So my question is: should the Nouveau driver have been “enabled” somehow? Or am I missing something else?

1 Like

I’ve never had to do this with a custom kernel. It is possible to have a kernel compiled without support for it and it’s also possible that the current installed drivers haven’t been fully tested for that kernel version.

You are right. No need to enable drivers. What I missed was that to install a kernel, one must install three packages like this:

sudo dnf install --nogpgcheck ./x86_64/kernel-core-5.17.12-100.local.fc34.x86_64.rpm
sudo dnf install --nogpgcheck ./x86_64/kernel-modules-5.17.12-100.local.fc34.x86_64.rpm
sudo dnf install --nogpgcheck ./x86_64/kernel-5.17.12-100.local.fc34.x86_64.rpm

In other words: no need to enable the drivers. But it seems one has to install them :slight_smile:

1 Like