Jump to content

Failing to downgrade Kernel.

I am on Arch and for experimental purposes I need to downgrade my Kernel to 4.20.

 

First I tried letting pacman do it by providing the URL to the package from the ALA (Arch Linux Archives). The installation completed but I got an error from mkinitcpio, the program that makes the compressed initramfs image, that no modules were found in /lib/modules for the Kernel I was downgrading to. I took a look and no folder was for the Kernel, and that was to be expected. I still tried to boot the older Kernel but the system froze on me. If I disable quite mode and optionally enable Kernel Debug level logging (level 7), I see that I get a Kernel panic and it throws an error that it is unable to mount the root filesystem on an unknown block. I had this issue prior as well and fixing my initramfs which wasn't configured correctly fixed the problem. I also successfully managed to bork my system because my dumb brain forgot to make a backup of my current initramfs, and not just the current Kernel, but fixing it wasn't a big problem.

 

But the thing is, where do I configure my modules? I first tried installing the linux-headers package (of the 4.20 Kernel), but I was told that I have to compile them. But when I try to compile it using "sudo make -j8" or even just "sudo make" (sudo is required), I get an error that a Makefile is not present in a directory that is also not present. I don't think the error is important, I am probably just doing it wrong (lol forgive me. I borked my system again and so I can't check right now -_-). I still tried to install the Kernel with the linux-headers package installed (of that version) but not compiled, and nothing changed.

 

Am I supposed to compile my own modules or what? Is the older Kernel even compatible with the newest packages and the environment? Do I have to install an older version of Arch itself?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Gat Pelsinger said:

I am on Arch and for experimental purposes I need to downgrade my Kernel to 4.20.

 

First I tried letting pacman do it by providing the URL to the package from the ALA (Arch Linux Archives). The installation completed but I got an error from mkinitcpio, the program that makes the compressed initramfs image, that no modules were found in /lib/modules for the Kernel I was downgrading to. I took a look and no folder was for the Kernel, and that was to be expected. I still tried to boot the older Kernel but the system froze on me. If I disable quite mode and optionally enable Kernel Debug level logging (level 7), I see that I get a Kernel panic and it throws an error that it is unable to mount the root filesystem on an unknown block. I had this issue prior as well and fixing my initramfs which wasn't configured correctly fixed the problem. I also successfully managed to bork my system because my dumb brain forgot to make a backup of my current initramfs, and not just the current Kernel, but fixing it wasn't a big problem.

 

But the thing is, where do I configure my modules? I first tried installing the linux-headers package (of the 4.20 Kernel), but I was told that I have to compile them. But when I try to compile it using "sudo make -j8" or even just "sudo make" (sudo is required), I get an error that a Makefile is not present in a directory that is also not present. I don't think the error is important, I am probably just doing it wrong (lol forgive me. I borked my system again and so I can't check right now -_-). I still tried to install the Kernel with the linux-headers package installed (of that version) but not compiled, and nothing changed.

 

Am I supposed to compile my own modules or what? Is the older Kernel even compatible with the newest packages and the environment? Do I have to install an older version of Arch itself?

I'm not familiar with Arch or compiled a kernel in years, but  I'd think you'd have to compile the whole kernel and that entails also telling it which modules you want.

 

Compiling a newer kernel you can usually import the old configuration from your distros kernel source, but IMO theres pretty much zero chance you'll be able import a newer config into an older kernel.

 

If for some bizarre reason you need an older kernel, I'd definitely install a version of Arch that used that kernel.  But what sort of experiment you are doing that needs this ancient kernel I do not know.

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

@Alex Atkin UK

 

I don't see why I need to compile the Kernel again when I have the actual binary. Not that I need to do any changes to the Kernel.

 

24 minutes ago, Alex Atkin UK said:

I'd definitely install a version of Arch that used that kernel

Yeah I probably thought of that. Even if I managed to run an older Kernel, will it even run with modern Arch and its packages?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

First of all, live boot into an arch install, chroot your system and then just use pacman to reinstall the kernel and whatnot to restore your system. Been there, done that, at least that's an easy fix.

 

Now for your actual issue, why the hell do you need such an old kernel? Anyway, you're better off building your own kernel:

https://wiki.archlinux.org/title/Kernel/Traditional_compilation

 

1 minute ago, Gat Pelsinger said:

I don't see why I need to compile the Kernel again when I have the actual binary. Not that I need to do any changes to the Kernel.

 

Your binary might not be compatible ABI-wise with your current install.

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to comment
Share on other sites

Link to post
Share on other sites

43 minutes ago, Gat Pelsinger said:

First I tried letting pacman do it by providing the URL to the package from the ALA (Arch Linux Archives).

If you don't want to compile the whole kernel and modules yourself you likely need to install the matching modules package.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Kilrah said:

If you don't want to compile the whole kernel and modules yourself you likely need to install the matching modules package.

I have no idea where I would find that. I thought linux-headers is all I needed, but it won't compile.

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

@igormp

 

16 minutes ago, igormp said:

First of all, live boot into an arch install, chroot your system and then just use pacman to reinstall the kernel and whatnot to restore your system.

Yes I said that I fixed my system before breaking it once again. I know this.

 

Second, I have compiled a Linux Kernel several times and this probably would work as the compilation itself generates those modules. But in my opinion, there should be zero reason for me to compile my Kernel if the binaries are already present. Just don't know where I get the modules from.

 

Also I am not THAT curious for my experimental purpose that I would spend 3-4 hours literally torturing my poor laptop processor so I would have to give a pass unless I really have to try the older Kernel.

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

Where did you get the precompiled kernel from? Same place should have modules.

 

And yes it's entirely possible a bunch of other things break if you downgrade just those.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

14 minutes ago, Gat Pelsinger said:

Just don't know where I get the modules from.

They come from the kernel repo itself, hence why you need to build them, as you should know since you've done it before.

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Gat Pelsinger said:

I took a look and no folder was for the Kernel, and that was to be expected.

Then something went wrong installing the package.

Spoiler

image.thumb.png.d153086c0ca63a499e079fedfcddb17c.png

 

1 hour ago, Gat Pelsinger said:

 Is the older Kernel even compatible with the newest packages and the environment?

Probably not. Various packages are built around the current kernel api/abi and filesystems are really not backwards compatible with older kernels.
There is also a chance how the initial ramdisk is made has changed since it ships its own mkinitcpio preset, meanwhile newer kernels don't.

 

1 hour ago, Gat Pelsinger said:

Do I have to install an older version of Arch itself?

This really isn't a option unless you want to manually grab every package version matched from the archive, a base install is around 200 packages.
 

Link to comment
Share on other sites

Link to post
Share on other sites

@Nayr438

30 minutes ago, Nayr438 said:

Then something went wrong installing the package.

I just did "sudo pacman -U https://asia.archive.pkgbuild.com/packages/l/linux/linux-4.20.10.arch1-1-x86_64.pkg.tar.xz". I am using the Asian mirror. So I just grabbed a standalone package, and nothing else.

 

31 minutes ago, Nayr438 said:

This really isn't a option unless you want to manually grab every package version matched from the archive, a base install is around 200 packages.

Wait so you are saying using an older Kernel or older version of Arch or any other distro is just not possible? Even after compiling the Kernel yourself?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Gat Pelsinger said:

Wait so you are saying using an older Kernel or older version of Arch or any other distro is just not possible? Even after compiling the Kernel yourself?

The kernel itself is likely to be problematic on Arch current if it works at all.

If anything you might be able to pull the current PKGBUILD and reversion it, but I would still expect problems.


In terms of running an old version of Arch, the problem is Arch itself isn't versioned, there is no set release. If you wanted to run an old version of Arch you would need to grab an old archiso and manually pull in packages based on versioning.

 

As far as other distros, I know ubuntu keeps a archive of old releases and archives packages similar to Arch. If I recall you can even replace the mirrorlist urls with the the archive mirrors to use apt as you would normally, they would just be out of date packages based around that release.


https://old-releases.ubuntu.com/releases/
https://askubuntu.com/questions/91815/how-to-install-software-or-upgrade-from-an-old-unsupported-release/91821#91821
 

Link to comment
Share on other sites

Link to post
Share on other sites

@Nayr438

 

Freak Ubuntu, CAN I DO THIS DEBIAN?

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

I got few errors when installing but it runs. 

 

image.png.a36d06069f8ef2536589c4512b1bcab7.png

| Intel i7-3770@4.2Ghz | Asus Z77-V | Zotac 980 Ti Amp! Omega | DDR3 1800mhz 4GB x4 | 300GB Intel DC S3500 SSD | 512GB Plextor M5 Pro | 2x 1TB WD Blue HDD |
 | Enermax NAXN82+ 650W 80Plus Bronze | Fiio E07K | Grado SR80i | Cooler Master XB HAF EVO | Logitech G27 | Logitech G600 | CM Storm Quickfire TK | DualShock 4 |

Link to comment
Share on other sites

Link to post
Share on other sites

@xAcid9

 

HOW?

 

I see you are using Manjaro rather than Arch, but idk if that makes much difference.

 

Just please elaborate your steps. Where did you download the Kernel, and what else you downloaded with it if any, and what did mkinitcpio say, I mean were the modules present in /lib/modules? 

Microsoft owns my soul.

 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Gat Pelsinger said:

@xAcid9

 

HOW?

 

I see you are using Manjaro rather than Arch, but idk if that makes much difference.

 

Just please elaborate your steps. Where did you download the Kernel, and what else you downloaded with it if any, and what did mkinitcpio say, I mean were the modules present in /lib/modules? 

I just installed both the kernel and the kernel header from the link you provided with pacman -U 
Yeah there's some missing modules errors, libcrypt something. I don't  remember mkinitcpio output.


Kernels: https://asia.archive.pkgbuild.com/packages/l/linux/
Headers: https://asia.archive.pkgbuild.com/packages/l/linux-headers/

 

| Intel i7-3770@4.2Ghz | Asus Z77-V | Zotac 980 Ti Amp! Omega | DDR3 1800mhz 4GB x4 | 300GB Intel DC S3500 SSD | 512GB Plextor M5 Pro | 2x 1TB WD Blue HDD |
 | Enermax NAXN82+ 650W 80Plus Bronze | Fiio E07K | Grado SR80i | Cooler Master XB HAF EVO | Logitech G27 | Logitech G600 | CM Storm Quickfire TK | DualShock 4 |

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, Gat Pelsinger said:

Freak Ubuntu, CAN I DO THIS DEBIAN?

Old Ubuntu actually wasn't that bad. I'm not familiar enough with Debian to know.

 

4 hours ago, Gat Pelsinger said:

I mean were the modules present in /lib/modules? 

They are part of the "linux" package, if "/usr/lib/modules/4.20.10-arch1-1-ARCH/" doesn't exist then it didn't install correctly. Try reinstalling it, or manually extracting it and re-running "mkinitcpio -p linux".

Link to comment
Share on other sites

Link to post
Share on other sites

20 hours ago, Gat Pelsinger said:

I have no idea where I would find that. I thought linux-headers is all I needed, but it won't compile.

Likely because it expects your system to have old packages. This, by the way, is the reason Arch Linux officially discourages partial upgrades or downgrades.

 

What are you even trying to do that requires an old unsupported kernel? Will 4.19 LTS do? https://aur.archlinux.org/packages/linux-lts419 https://aur.archlinux.org/packages/linux-lts419-headers

 

If you MUST have 4.20 I would recommend taking the 4.19 PKGBUILD from the aur package and changing it to pull 4.20 instead, the required steps are likely the same.

4 hours ago, xAcid9 said:

I just installed both the kernel and the kernel header from the link you provided with pacman -U 
Yeah there's some missing modules errors, libcrypt something. I don't  remember mkinitcpio output.


Kernels: https://asia.archive.pkgbuild.com/packages/l/linux/
Headers: https://asia.archive.pkgbuild.com/packages/l/linux-headers/

 

It's worth noting that your system may have packages installed that OP's does not. Also you may have different versions of various packages.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Doing this will result in no good. Packages, libs, dependencies depend on some stuff from the newer kernel that the older kernel does not have. You should always do this stuff on a vm and not your physical installation…l

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×