Downgrade fedora 20 kernel

0

I want to downgrade fedora's 20 kernel (3.11) to version 2.6 because I have a package that only supports that kernel. I have looked everywhere for 2.6 kernel for fedora 20, but with no luck. If I try to put kernel 2.6 that is intended for fedora core 16 then fedora just won't boot up. Does anyone have any suggestions?

ASIS911

Posted 2014-04-07T13:58:50.243

Reputation: 3

1What is the package that only supports 2.6? – Dan D. – 2014-04-07T14:44:53.827

It is a hardware driver that has no alternatives and officially only supports Red Hat, but Red Hat only goes up to kernel 2.6. – ASIS911 – 2014-04-08T06:39:41.483

Answers

1

Fedora should (relatively) not have a problem booting with older kernels, we do this all the time to run Fedora on ARM platforms which can't run mainstream kernel compilations.

There are two key issues which must be resolved for the system to work properly.

The first is the bootloader (GRUB, in all likelihood). This is really only a concern if you don't install an official RPM for your kernel - the official RPMs will generate the initramfs for you and create a bootloader entry.

The second involves firmware loading. Most distros switched from userspace firmware loading to in-kernel firmware loading around 3.10 or so. All currently supported Fedora releases load the firmware in this way. So switching to an older kernel means the kernel expects the OS to load firmware, and the OS expects the kernel to load firmware. We'll need to re-enable firmware loading in userspace somewhere.

So to begin with, install the old kernel via whatever means you like. To make things easy, I installed the newest 2.6 kernel that was built for Fedora (f15 was the latest release to officially support 2.6). The packages are still available on Koji, the Fedora build system [1].

Next, I verified that the GRUB entry was created. You should see mention of kernel 2.6 in /boot/grub/grub.cfg (assuming you're not on an EFI system).

Finally, we need to resolve the firmware issue. I have seen two solutions to this: 1. Install or compile an older version of udev (now included in systemd) which has internal firmware loading enabled. 2. Use firmware.sh like the bad old days.

The latter is significantly easier in this scenario. There are two files that need to be added for this to work: /usr/lib/udev/firmware.sh and /usr/lib/udev/rules.d/50-firmware.rules. Poke around on Google to find a copy of these files [2] - I'd rather not link directly to any.

Once they're on your system, you'll need to re-generate the initramfs so that firmware can be loaded before the root is mounted, if necessary. This is easy in Fedora using dracut; run:

dracut /boot/initramfs-2.6.43.8-2.fc15.x86_64.img 2.6.43.8-2.fc15.x86_64 --force

The first option is the target initramfs file, the second is the kernel version, and --force is needed to overwrite the initramfs we already made (most likely during RPM installation).

And that should do it. I just tested this in a VM and it worked well. As a final note, be mindful of driver support for your hardware. It may not be present in kernel 2.6. This was the case of the Hyper-V network adapter for my VM. Switching to the "Legacy" network adapter yielded results, however.

[1] http://koji.fedoraproject.org/koji/buildinfo?buildID=327165

[2] https://www.google.com/search?q=%22firmware.sh%22+%2250-firmware.rules%22

cottsay

Posted 2014-04-07T13:58:50.243

Reputation: 46