Posts

Showing posts with the label Kernel

How to recompile and customize your Ubuntu 23.10 kernel

Image
This guide will show you how to recompile and customize your current Ubuntu 23.10 kernel. Reasons you may wish to do this include learning, changing kernel settings or just for fun. There are a number of different ways to do this, I like simple and easy to manage (see Debian kernel handbook chapter 4 ) and in this guide we will download the Ubuntu linux-source using apt install and compile the kernel as a *.deb package. At the time of writing in Ubuntu 23.10, the current linux-source is 6.5.0. Updates may change that, therefore take this into account when reading this guide. Also as a side note, this guide assumes secure boot is disabled. Before you begin I strongly recommend changing the default grub boot behavior so that you have a grub menu on boot and can select your kernel. By default the grub boot menu is hidden. This will make it easy to boot into a working kernel should your custom kernel result in a system that fails to boot. Using a text editor edit the defa...

Ubuntu 24.04 LTS shipping with Kernel 6.8 and possibly a gaming / multimedia optimised config

Image
A very interesting development if it does happen, I first became aware of this from a site called Phoronix and as pointed out over there more details can be found at: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2051342 Ubuntu and many other Linux distributions come with a very generic kernel, not optimised for anything in particular but one key area this impacts quite negatively is gaming and multimedia.  Gaming on Linux has increased phenomenally since the release of Valve's steam deck powered by their custom Arch Linux distribution and their efforts with Steam and Proton, and with interest in gaming on Linux being at an all time high more and more people are trying it out only to be let down by their Linux distribution being poorly optimised out of the box for gaming. The Linux kernel being a major contributing factor, so much so that we now have gaming orientated distributions such as Nobara that have kernels tuned for low latency and various other tweaks to improve gam...

Ubuntu 23.10 - How to build a kernel package from kernel.org

Image
First step is to install needed packages, open a terminal and type the following, sudo apt install build-essential libncurses-dev flex bison debhelper libssl-dev libelf-dev Now download your kernel source from kernel.org, you can do this using the terminal if you wish, for example; wget https://git.kernel.org/torvalds/t/linux-6.6-rc5.tar.gz This command will download the kernel to your current directory Extract the kernel archive. tar -xf linux-6.6-rc5.tar.gz Go into the directory  cd linux-6.6-rc5 Customise your kernel make menuconfig Once you have finished save and exit.        Now it is time to build the kernel package. time make -j $(($(nproc)+1)) bindeb-pkg Depending on your processor this may take some time. When it has finished your kernel *.deb package will be in your home directory. To install it, sudo dpkg -i linux-image-6.6.0-rc5_6.6.0-rc5-4_amd64.deb sudo dpkg -i linux-headers-6.6.0-rc5_6.6.0-rc5-4_amd64.deb Then reboot and enjoy your newer...

How to build a vanilla kernel RPM package Fedora 37

Image
I currently have an Intel Arc A770 LE 16GB and out of the box Fedora 37 does not support it. There are some workarounds but the best option (at the time of writing) is to use kernel 6.2.7 as that has native Intel Arc support. This is a quick guide I made for myself, it will build a linux-6.2.7 *.rpm package in Fedora 37. As with anything in Linux, there is usually more than one way to do things or a better way to do something. If you have a suggestion leave a comment below. Open a terminal  sudo dnf install ncurses-devel flex bison rpm-build elfutils-libelf-devel rpmdevtools openssl-devel dwarves perl This should install required packages to build and compile the kernel. rpmdev-setuptree This will setup your home directory for building the *.rpm package. cd ~/rpmbuild/SOURCES/ We are going to go into the SOURCES directory in our rpmbuild tree. wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.2.7.tar.xz This will download linux-6.2.7.tar.xz into the SOURCES directory. tar...