Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] make oldconfig
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
dpaddy
Apprentice
Apprentice


Joined: 25 Jun 2008
Posts: 168

PostPosted: Sun Mar 09, 2025 12:18 am    Post subject: [SOLVED] make oldconfig Reply with quote

I am attempting a new install (on an old system) using /dev/sda3 as is recommended by the handbook. That old system's disk is mounted (on the new install which I am in the process of completing -- I want to build a custom kernel for it) at /mnt/black (on /dev/sda3). I therefore have access to the old system's configuration files:
Code:
ls -al /mnt/black/boot/
total 49236
drwxr-xr-x  6 root root     4096 Dec 31  1969 .
drwxr-xr-x 20 root root     4096 Mar  8 08:48 ..
drwxr-xr-x  4 root root     4096 Sep  4  2020 EFI
-rwxr-xr-x  1 root root  2748511 Sep  4  2020 System.map-4.11.6-gentoo
-rwxr-xr-x  1 root root  3492477 Dec 15  2020 System.map-5.4.60-gentoo
-rwxr-xr-x  1 root root  3477974 Sep 15  2020 System.map-5.4.60-gentoo.old
-rwxr-xr-x  1 root root    31744 Sep  4  2020 amd-uc.img
-rwxr-xr-x  1 root root    95704 Sep  4  2020 config-4.11.6-gentoo
-rwxr-xr-x  1 root root   120351 Dec 15  2020 config-5.4.60-gentoo
-rwxr-xr-x  1 root root   123527 Sep 15  2020 config-5.4.60-gentoo.old
drwxr-xr-x  5 root root     4096 Sep 15  2020 grub
-rwxr-xr-x  1 root root 10026211 Dec 15  2020 initramfs-5.4.60-gentoo.img
-rwxr-xr-x  1 root root 10007407 Sep 15  2020 initramfs-5.4.60-gentoo.img.old
drwxr-xr-x  2 root root     4096 Sep  4  2020 lost+found
drwxr-xr-x  2 root root     4096 Sep  5  2020 save
-rwxr-xr-x  1 root root  5919280 Sep  4  2020 vmlinuz-4.11.6-gentoo
-rwxr-xr-x  1 root root  7168896 Dec 15  2020 vmlinuz-5.4.60-gentoo
-rwxr-xr-x  1 root root  7148416 Sep 15  2020 vmlinuz-5.4.60-gentoo.old
I desire to build my custom kernel (for the new install) based upon the kernel configuration of the old system. I realize that
Code:
 make oldconfig
executed in /usr/src/linux on /dev/sda3 is inappropriate because I must somehow specify where the old configuration file is located (which I presume to be /mnt/black/boot/config-5.4.60-gentoo). How exactly -- please be painfully explicit because I am easily confused -- do I proceed? I expect that simply copying /mnt/black/boot/config-5.4.60-gentoo to /usr/src/linux is naive because it should perhaps be renamed to something in particular in order for
Code:
make oldconfig
to succeed in the manner desired. Or that approach (copy and rename) might also be naive because some other method is appropriate. Moreover
Code:
ls -l ../
total 8
lrwxrwxrwx  1 root root   20 Mar  8 18:00 linux -> linux-6.12.16-gentoo
drwxr-xr-x 27 root root 4096 Mar  8 18:22 linux-6.12.16-gentoo
drwxr-xr-x 26 root root 4096 Mar  8 17:27 linux-6.12.16-gentoo-dist
shows the new kernel I want to customize is 6.12.16 whereas the old is 5.4.60 and I am concerned that the age difference may be problematic. Also -- in case it may somehow matter -- both new and old kernel sources were emerged with the experimental use flag (so as to have access to zen optimization). Please help.

Last edited by dpaddy on Sun Mar 09, 2025 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 744

PostPosted: Sun Mar 09, 2025 1:46 am    Post subject: Re: make oldconfig Reply with quote

dpaddy wrote:
I expect that simply copying /mnt/black/boot/config-5.4.60-gentoo to /usr/src/linux is naive
Not as much as you'd think, just
Code:
cp /mnt/black/boot/config-5.4.60-gentoo /usr/src/linux/.config
dpaddy wrote:
I am concerned that the age difference may be problematic.
Other than a long list of questions to answer, I've never had problems using "really old configs". If make oldconfig does "give up" (and start with defconfig instead of the config you want) there are plenty of versions between 5.4 and 6.12 in portage to make the steps smaller, but I don't think you'll need them.
Back to top
View user's profile Send private message
dpaddy
Apprentice
Apprentice


Joined: 25 Jun 2008
Posts: 168

PostPosted: Sun Mar 09, 2025 2:19 am    Post subject: Reply with quote

I'll give it a go. Thanks.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5478
Location: Bavaria

PostPosted: Sun Mar 09, 2025 9:35 am    Post subject: Re: [SOLVED] make oldconfig Reply with quote

dpaddy wrote:
[...] How exactly -- please be painfully explicit because I am easily confused -- do I proceed? [...]

-> https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Cheat_Sheets

(and maybe: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#What_is_.22make_oldconfig.22_.3F)

You will get a LOT of questions ... maybe you want start with a new 6.12 kernel, then I would suggest to do / start from:
Number 2 of: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Before_you_start
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
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