View previous topic :: View next topic |
Author |
Message |
LemonadeLlama Tux's lil' helper
Joined: 26 May 2021 Posts: 101 Location: New Zealand
|
Posted: Wed Dec 01, 2021 9:27 am Post subject: Building old kernels that aren't in gentoo-sources. |
|
|
Hello everyone. I've gotten myself into a bit of a pickle and I could use some help.
I am trying to investigate some performance issues on my PC. One thing I would like to do is boot with an older kernel, so that I can see if any configuration changes made in the past are responsible.
I'm trying to rebuild version 5.13.8, which is no longer available in gentoo-sources.
Unfortunately, I can't boot from it, as I delete some older kernels from by boot partition to save space.
Easy enough, I just need to rebuild the kernel version I want, right?
Well, the thing is, when you run --depclean, it removes the old Makefiles from the unused /usr/src/linux* directories. This means that although I still have my old .config file from that kernel version, I can't build it, because there's no Makefile.
Code: |
jamie@TuxBox /usr/src/linux-5.13.8-gentoo $ sudo make menuconfig
Password:
make: *** No rule to make target 'menuconfig'. Stop.
jamie@TuxBox /usr/src/linux-5.13.8-gentoo $ |
How do I build the old kernel using the same config file I had before? |
|
Back to top |
|
|
apiaio Guru
Joined: 04 Dec 2008 Posts: 417
|
Posted: Wed Dec 01, 2021 4:41 pm Post subject: |
|
|
Old gentoo-sources repository doesn't exist. What you can do is download kernel version from
https://mirrors.edge.kernel.org/pub/ and compile with your old .config |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Wed Dec 01, 2021 5:16 pm Post subject: |
|
|
LemonadeLlama,
All the ebuilds that were ever in the ::gentoo repo are available from git.
You can get old ebuilds there and add them to your local overlay.
Fou need Code: | commit afe2d2f9c66017b999d97642422b76d949e6cfd5
Author: Mike Pagano <mpagano@gentoo.org>
Date: Wed Aug 4 09:09:42 2021 -0400
sys-kernel/gentoo-sources: Linux bumps and genpatches update
Linux patch 5.13.8 |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
LemonadeLlama Tux's lil' helper
Joined: 26 May 2021 Posts: 101 Location: New Zealand
|
Posted: Thu Dec 02, 2021 12:08 am Post subject: |
|
|
NeddySeagoon wrote: | You can get old ebuilds there and add them to your local overlay. |
How do I do that? I'm not even sure I have a "local overlay" since I just install packages as needed. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Dec 02, 2021 5:04 pm Post subject: |
|
|
LemonadeLlama,
Start reading here to learn about overlays.
You own local overlay won't exist until you create it.
In your /home/LemonadeLlama direcory run Code: | git clone https://github.com/gentoo/gentoo |
That will create a directory called gentoo. It will be a while as it will fetch all the ebuilds in the ::gentoo repo back to some time in 2015.
It will look jest like your rsync copy of ::gentoo once its done. It may be a few commits ahead.
Code: | cd gentoo
git checkout afe2d2f9c66017b999d97642422b76d949e6cfd5 |
will change the content to look like in was when commit afe2d2f9c66017b999d97642422b76d949e6cfd5 was the newest commit.
Try
Code: | commit afe2d2f9c66017b999d97642422b76d949e6cfd5
Author: Mike Pagano <mpagano@gentoo.org>
Date: Wed Aug 4 09:09:42 2021 -0400
sys-kernel/gentoo-sources: Linux bumps and genpatches update
Linux patch 5.13.8 | should be at the top of the output.
Copy what you need from sys-kernel/gentoo-sources to sys-kernel/gentoo-sources in your overlay.
Now you should be able to Code: | emerge =sys-kernel/gentoo-sources-5.13.8 | and the ebuild from your overlay will be used. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
LemonadeLlama Tux's lil' helper
Joined: 26 May 2021 Posts: 101 Location: New Zealand
|
Posted: Sat Dec 04, 2021 12:16 am Post subject: |
|
|
Alright, I've done that. I made my own overlay, and I copied the gentoo-sources-5.13.8.ebuild file into it
Code: | jamie@TuxBox /var/db/repos/jamierepo $ ll sys-kernel/gentoo-sources/
total 12
drwxr-xr-x 2 root root 4096 Dec 4 11:28 .
drwxr-xr-x 3 root root 4096 Dec 4 11:27 ..
-rw-r--r-- 1 root root 742 Dec 4 11:28 gentoo-sources-5.13.8.ebuild
jamie@TuxBox /var/db/repos/jamierepo $ |
I checked out the gentoo repo at the right commit to get the right ebuild. I even checked with diff to make sure the files are identical.
Code: | commit afe2d2f9c66017b999d97642422b76d949e6cfd5 (HEAD)
Author: Mike Pagano <mpagano@gentoo.org>
Date: Wed Aug 4 09:09:42 2021 -0400
sys-kernel/gentoo-sources: Linux bumps and genpatches update
Linux patch 5.13.8 |
Code: |
jamie@TuxBox ~/Repositories/gentoo/sys-kernel/gentoo-sources $ diff gentoo-sources-5.13.8.ebuild /var/db/repos/jamierepo/sys-kernel/gentoo-sources/gentoo-sources-5.13.8.ebuild
jamie@TuxBox ~/Repositories/gentoo/sys-kernel/gentoo-sources $ |
Now, whenever I try emerging that kernel version, this is what I get:
Code: |
jamie@TuxBox ~/Repositories/gentoo/sys-kernel/gentoo-sources $ sudo emerge =sys-kernel/gentoo-sources-5.13.8 --ask --verbose
Password:
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild NS ] sys-kernel/gentoo-sources-5.13.8:5.13.8::jamierepo [5.15.6:5.15.6::gentoo] USE="-build -experimental -symlink" 0 KiB
Total: 1 package (1 in new slot), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No] Yes
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-kernel/gentoo-sources-5.13.8::jamierepo
>>> Failed to emerge sys-kernel/gentoo-sources-5.13.8, Log file:
>>> '/var/log/ebuild-logs/sys-kernel:gentoo-sources-5.13.8:20211204-001302.log'
>>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.65, 0.61, 1.73
!!! Fetched file: linux-5.13.tar.xz VERIFY FAILED!
!!! Reason: Insufficient data for checksum verification
!!! Got:
!!! Expected: BLAKE2B BLAKE2S MD5 RMD160 SHA1 SHA256 SHA3_256 SHA3_512 SHA512 WHIRLPOOL
* Fetch failed for 'sys-kernel/gentoo-sources-5.13.8', Log file:
* '/var/log/ebuild-logs/sys-kernel:gentoo-sources-5.13.8:20211204-001302.log'
* Messages for package sys-kernel/gentoo-sources-5.13.8:
* Log file: /var/log/ebuild-logs/sys-kernel:gentoo-sources-5.13.8:20211204-001302.log
* Fetch failed for 'sys-kernel/gentoo-sources-5.13.8', Log file:
* '/var/log/ebuild-logs/sys-kernel:gentoo-sources-5.13.8:20211204-001302.log'
jamie@TuxBox ~/Repositories/gentoo/sys-kernel/gentoo-sources $ |
The log file mentioned in the output shows this:
Code: | jamie@TuxBox ~/Repositories/gentoo/sys-kernel/gentoo-sources $ sudo cat /var/log/ebuild-logs/sys-kernel:gentoo-sources-5.13.8:20211204-001302.log
!!! Fetched file: linux-5.13.tar.xz VERIFY FAILED!
!!! Reason: Insufficient data for checksum verification
!!! Got:
!!! Expected: BLAKE2B BLAKE2S MD5 RMD160 SHA1 SHA256 SHA3_256 SHA3_512 SHA512 WHIRLPOOL
* Fetch failed for 'sys-kernel/gentoo-sources-5.13.8', Log file:
* '/var/log/ebuild-logs/sys-kernel:gentoo-sources-5.13.8:20211204-001302.log'
jamie@TuxBox ~/Repositories/gentoo/sys-kernel/gentoo-sources $ |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sat Dec 04, 2021 12:36 am Post subject: |
|
|
LemonadeLlama,
Well done. I glossed over that you need the Manifest and possibly the content of the files directory there too.
Portage is unable to validate the files you need to emerge the old kernel, so it won't let you.
Code: | !!! Reason: Insufficient data for checksum verification
!!! Got:
!!! Expected: BLAKE2B BLAKE2S MD5 RMD160 SHA1 SHA256 SHA3_256 SHA3_512 SHA512 WHIRLPOOL |
The Got: entry is blank, so there were none.
MD5 was broken years ago and SHA1 is no longer considered secure.
If you trust the files you have, you can make your own manifest. The will keep portage happy.
To to that, the command is Code: | ebuild /full/path/to/.ebuild manifest |
The files directory may contain patches that you need too. Without them (if needed) the emerge will fail. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
LemonadeLlama Tux's lil' helper
Joined: 26 May 2021 Posts: 101 Location: New Zealand
|
Posted: Sat Dec 04, 2021 1:25 am Post subject: |
|
|
NeddySeagoon wrote: | Well done. I glossed over that you need the Manifest and possibly the content of the files directory there too.
Portage is unable to validate the files you need to emerge the old kernel, so it won't let you. |
Thank you for clearing that up. I copied the Manifest file from gentoo-sources to my own overlay and everything works fine now.
I'm building the old kernel version as we speak You've been a great help to me. |
|
Back to top |
|
|
|