Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Install an older distribution of Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
MaxGentoo
n00b
n00b


Joined: 17 Jun 2022
Posts: 3

PostPosted: Fri Jun 17, 2022 7:14 am    Post subject: Install an older distribution of Gentoo Reply with quote

Hi,

I'm not new to Linux, but new to Gentoo. I have a kernel module with a magic version number 4.17.4-gentoo, which was compiled with GCC 7.3.0 (Gentoo 7.3.0-r3 p1.4). I would like to install that kernel version. Does this mean I need to install Gentoo 7.3, but I cannot find any info were to obtain an older distribution.

Thanks!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54453
Location: 56N 3W

PostPosted: Fri Jun 17, 2022 7:34 am    Post subject: Reply with quote

MaxGentoo,

Welcome to Gentoo.

Gentoo does not have versions. It's a rolling release that is updated every 30 min.

To keep the module happy you will need kernel-sources-4.17.4 and you will need to build them with gcc-7.3.0
Luckily, gcc and kernels are both 'slotted' which is Gentoos way of installing several versions at the same time.

Get the ebuilds you need from git and put them into your local overlay.
gcc is only tested to build one version up and one version down, so gcc-11 may not build gcc-7
Going back one version at a time is safe, two might be ... try it and see.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Fri Jun 17, 2022 11:41 am    Post subject: Reply with quote

FWIW, I run kernel 4.19.141, the last one that supports framebuffer splash screens, and (mostly) otherwise keep up with package advancing. gcc 11.3 builds this kernel fine.

My thought, if you are slightly unsure or not fairly experienced, is to first build to the current install. Keeping some parts stuck in the past can be confusing, takes some effort (sometimes in source code), and can lead down many blind alleys. Newer kernels run fine on old hardware. Get a Gentoo system up and running, and from there it's fairly easy to build more than one kernel for kernel experiments.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21918

PostPosted: Fri Jun 17, 2022 3:22 pm    Post subject: Reply with quote

What is the purpose of this kernel module? For something that old, you may be better off finding a way to update the module rather than pin everything else in the past.
Back to top
View user's profile Send private message
MaxGentoo
n00b
n00b


Joined: 17 Jun 2022
Posts: 3

PostPosted: Mon Jun 20, 2022 8:25 pm    Post subject: Reply with quote

The module is called mods.ko. It's a kernel driver from NVIDIA that provides access to the PCI bus for user mode programs. It's required for tools that perform factory and quality assurance testing of NVIDIA graphics cards. The tools requires BIOS console mode, no framebuffer, otherwise results are erratic.

Code:

filename:       /home/nv/tl18/modules/4.17.4-gentoo/extra/mods.ko
version:        3.87
license:        GPL
srcversion:     5F328441203C828FF09CC31
depends:       
retpoline:      Y
name:           mods
vermagic:       4.17.4-gentoo SMP preempt mod_unload
parm:           debug:debug bitflags (2=ioctl 4=pci 8=acpi 16=irq 32=mem 64=fun +256=detailed) (int)
parm:           multi_instance:allows more than one client to simultaneously open the driver (int)



It's GPL, but I don't have the source code. I just wanted to do a quick test, installed Ubuntu 18.04, and downloaded the 4.17.4 kernel source from kernel.org. The kernel compiled and runs just fine, and I can add -gentoo to make the module happy. I added another entry to the grub boot menu and can now switch between kernels on the same system. As I recall, syscalls of the Linux kernel don't change unless to support new hardware, so I guess that's why older kernels also work in newer OS releases. I probably won't stay with Ubuntu though.

Thanks!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21918

PostPosted: Tue Jun 21, 2022 12:54 am    Post subject: Reply with quote

There is a general rule from the kernel developers that new kernel releases do not break older user programs. Most user programs do not guarantee that they work on arbitrarily old kernel releases. However, since you picked a user distribution that was contemporary with the target kernel, you have a very good chance that nothing in that install will rely on syscalls that are new in 4.18+.
Back to top
View user's profile Send private message
immolo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 122

PostPosted: Thu Jun 30, 2022 2:42 pm    Post subject: Reply with quote

Pretty much everyone has answered you with the best advice of just using a modern Gentoo image with your old kernel however just to add you may need to downgrade the kernel headers to match and rebuild a few packages like sys-apps/shadow.

If you want me to go through this with you I'll be happy to talk you through it :)
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1744

PostPosted: Thu Jun 30, 2022 2:51 pm    Post subject: Reply with quote

immolo wrote:
Pretty much everyone has answered you with the best advice of just using a modern Gentoo image with your old kernel however just to add you may need to downgrade the kernel headers to match and rebuild a few packages like sys-apps/shadow.

If you want me to go through this with you I'll be happy to talk you through it :)


Kernel headers never have to match the running kernel so no downgrade necessary.
Back to top
View user's profile Send private message
immolo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 122

PostPosted: Thu Jun 30, 2022 3:04 pm    Post subject: Reply with quote

Quote:
Kernel headers never have to match the running kernel so no downgrade necessary.


Match may have been the wrong word to use but I've needed to downgrade headers on a few of my machines using older kernels to stop program from throwing out errors.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21918

PostPosted: Thu Jun 30, 2022 3:52 pm    Post subject: Reply with quote

That shouldn't happen, and for the most part, cannot happen, since very few packages even notice when you downgrade the headers. Do you have an example of this failure mode?
Back to top
View user's profile Send private message
immolo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 122

PostPosted: Thu Jun 30, 2022 4:21 pm    Post subject: Reply with quote

I didn't mean to overtake this thread so I'll apologies beforehand.

Hu,

My most recent experience of this was a 3.10.5 kernel will cause openssh, shadow and I believe net-tools as well to not build when using 5.x headers.

I know it's slightly older than the one brought up but it's the one I remember the most.

This was a PowerPC build for clarity however I can't think of a reason why this would be different on amd64.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21918

PostPosted: Thu Jun 30, 2022 6:05 pm    Post subject: Reply with quote

I would call that more than slightly older. Even so, I would be interested to see an example of the errors shown when trying that combination.
Back to top
View user's profile Send private message
immolo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 122

PostPosted: Thu Jun 30, 2022 6:16 pm    Post subject: Reply with quote

Hu wrote:
I would call that more than slightly older. Even so, I would be interested to see an example of the errors shown when trying that combination.


I agree with the age it was just the easiest one to remember.

I actually did this with Sam's advice back when I was a bit more unsure however I want to get a MUSL environment running on it to check out the memory usage so if you ping me over your email in a DM I'll happily send some build logs over when I pick this up in-between my other projects as the worse case for me I'm wrong and you teach me a better way to handle this which I can improve the other things I maintain.

I also hangout in various Gentoo IRC channels so feel free to reach out there if you do as I always have time to give back to you guys.
Back to top
View user's profile Send private message
MaxGentoo
n00b
n00b


Joined: 17 Jun 2022
Posts: 3

PostPosted: Fri Sep 01, 2023 5:54 pm    Post subject: Reply with quote

I obtained the source code of the said kernel module and it turns out that it won't compile on anything newer than kernel version 4.x. I don't have the error messages right now, but unless I disremember, they were about libc/glibc issues, probably requiring an older version like glibc 2.3.

Well, I was coming back here to read again what the story was about installing an older version of Gentoo. Something from around 2018 might to do. I really just need a minimum system to build a custom kernel, without a GUI, probably best with sysinit and not systemd. I'm not fancy Ubuntu and thought Gentoo might be a good idea, but I guess I'm out of luck. I'm going to try an older Ubuntu 18.04 server install.
Back to top
View user's profile Send private message
immolo
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 122

PostPosted: Sat Sep 02, 2023 1:36 pm    Post subject: Reply with quote

On the off chance you carry on with Gentoo, if you get the error message we can take a look if it it is an libc issue however I created this wiki article a while back to help for cases just like these:

https://wiki.gentoo.org/wiki/User:Immolo/OldKernelInstall
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54453
Location: 56N 3W

PostPosted: Sat Sep 02, 2023 2:31 pm    Post subject: Reply with quote

MaxGentoo,

Gentoo from 2018 is fairly easy.

You need a 2018 stage3
A portage snapshot to match and off you go.
Finding sources can be a challenge but if you ask, there are several long time users here (including me) that keep old distfiles.

As to the method, see Historical Gentoo
You won't be going back to 2003 but the method is general.

Feel free to use the distfiles mirror there too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum