LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 07-14-2021, 12:21 PM   #16
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23

Hello,

You wrote:
You are not copying the config to the correct location

Can you please tell what is wrong with:
cp .config configs/kernel-`uname -r`.config

Regarding kernel version: Should I use kernel-4.18.0-193.28.1.el8_2.src.rpm which is the newest for 8.2 ?

Thank you,
Zvika
 
Old 07-14-2021, 12:29 PM   #17
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by zvivered View Post
Hello,
You wrote:
You are not copying the config to the correct location

Can you please tell what is wrong with: cp .config configs/kernel-`uname -r`.config
Again: READ THE INSTRUCTIONS AND FOLLOW THEM.
Quote:
Regarding kernel version: Should I use kernel-4.18.0-193.28.1.el8_2.src.rpm which is the newest for 8.2 ?
Again: READ THE INSTRUCTIONS AND FOLLOW THEM.

Cannot say it more plainly and simply. If you don't know what version of the kernel you have or need to use, that is yet another reason for you to hire someone to do this for you. AGAIN: you have been working on this for two years, and are clearly unable to accomplish it.

AGAIN: there is nothing else we can tell you, since you are not understanding the answers. It is pointless to continue.
 
Old 07-14-2021, 02:30 PM   #18
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

I really do not understand why bother writing very long answers that do not help.

The whole point of such forums is to help מn a voluntary basis

Isn't it much simpler not answering at all ?

I guess I'm not an expert as you are.

I DID READ THE INSTRUCTIONS AND FOLLOWED THEM.

But did not get the right result.

Instead of writing insulting replies, you can specify what is wrong in my steps or not answer at all.

All the best,
Zvika
 
Old 07-14-2021, 02:52 PM   #19
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by zvivered View Post
Hello,
I really do not understand why bother writing very long answers that do not help. The whole point of such forums is to help מn a voluntary basis Isn't it much simpler not answering at all ?

I guess I'm not an expert as you are. I DID READ THE INSTRUCTIONS AND FOLLOWED THEM. But did not get the right result. Instead of writing insulting replies, you can specify what is wrong in my steps or not answer at all.
You did *NOT* read and follow the instructions; that is abundantly clear, since you didn't bother completing the prerequisites, got missing dependencies, etc. You used different commands, and have NOT followed the instructions.

We aren't going to type out the entire guide for you again; it's on the CentOS site. Either follow it or don't; there is nothing else we can tell you. Either you don't understand the instructions, or just plain won't follow them. There is NOTHING ELSE we can do, because if after **TWO YEARS** of trying to do this you still can't make progress, what do you think is going to be gained now?
 
Old 07-14-2021, 02:54 PM   #20
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,153

Rep: Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265
uname -r returns the kernel version you are running. If that's different from the version you want to build, then that command is incorrect.
 
Old 07-14-2021, 03:25 PM   #21
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by smallpond View Post
uname -r returns the kernel version you are running. If that's different from the version you want to build, then that command is incorrect.
Yep...noted in the instructions the OP posted, along with installing the dependencies, etc. All things the OP claims to have done, but has not...if they had, they wouldn't have had missing dependencies, files without saved changes, etc.
 
Old 07-14-2021, 04:00 PM   #22
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

Folder configs in: ~/rpmbuild/BUILD/kernel-4.18.0-193.el8/linux-4.18.0-193.el8.x86_64
contains the file: kernel-4.18.0-x86_64.config

Now I have to copy .config into ./configs

Should I overwrite the file kernel-4.18.0-x86_64.config so it will contain the new kernel configuration ?

According to the wiki:
Quote:
[user@host]$ cp .config configs/kernel-3.10.0-`uname -m`.config
I changed it to:
cp .config configs/kernel-4.18.0-`uname -m`.config

The output of "uname -r" is: 4.18.0-193.el8.x86_64

Thank you,
Zvika
 
Old 07-14-2021, 04:28 PM   #23
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by zvivered View Post
Hello,
Folder configs in: ~/rpmbuild/BUILD/kernel-4.18.0-193.el8/linux-4.18.0-193.el8.x86_64 contains the file: kernel-4.18.0-x86_64.config

Now I have to copy .config into ./configs Should I overwrite the file kernel-4.18.0-x86_64.config so it will contain the new kernel configuration ?

According to the wiki:
Code:
[user@host]$ cp .config configs/kernel-3.10.0-`uname -m`.config
I changed it to: cp .config configs/kernel-4.18.0-`uname -m`.config

The output of "uname -r" is: 4.18.0-193.el8.x86_64
YES...again, do what the instructions say; they haven't changed since you first started posting. Not sure what you're not understanding.
 
Old 07-15-2021, 01:03 AM   #24
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

Before the final rpmbuild, ~/rpmbuild/SOURCES/ contains a modified: kernel-4.18.0-x86_64.config
with the new kernel configuration. This was checked several times.

After the final rpmbuild (par. 5), this file is automatically changed (not by me) so it does not contain the changes I did.

This is what I do not understand.

Thank you,
Zvika
 
Old 07-15-2021, 03:52 AM   #25
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
BTW : I want to build the same kernel version as installed with the ISO of 8.2: 4.18.0-193.el8
Only change the kernel configuration.

Thank you,
Zvika
 
Old 07-15-2021, 08:16 AM   #26
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by zvivered View Post
Hello,
Before the final rpmbuild, ~/rpmbuild/SOURCES/ contains a modified: kernel-4.18.0-x86_64.config with the new kernel configuration. This was checked several times.

After the final rpmbuild (par. 5), this file is automatically changed (not by me) so it does not contain the changes I did.

This is what I do not understand.
...and...
Quote:
BTW : I want to build the same kernel version as installed with the ISO of 8.2: 4.18.0-193.el8 Only change the kernel configuration.
AGAIN: we understand what you want, as this is the EIGHTH TIME you've asked about it, over the span of two years.
AGAIN: restating it over and over does absolutely nothing to let anyone help you further; you are providing no new information, at all.

From post #16, you said "Regarding kernel version: Should I use kernel-4.18.0-193.28.1.el8_2.src.rpm which is the newest for 8.2 ?"....which is NOT the same one you're running, is it? Things like this are why you continue to have problems. If you want the same kernel, download the same source. Because the newest kernel was from October of last year...not the original you're running from May. Which is different.

AGAIN: you are not following the guide. That was written by CentOS, for CentOS, so there isn't much more anyone here can add to it. Since you say you're getting to step 5, I'd suggest you look carefully at step 4.
AGAIN: you were given the two parameters to enter, as well as the grub options to pass on the command line. Unless you actually follow the guide, there is no point in posting again. You *ARE NOT* following their instructions, despite your insistence that you are. This is clear because of the several things you've said and done which indicate you're not, because the results don't match what the guide says.

There is nothing more we can do to help you; I would suggest you either hire someone, or ask on the CentOS forums:
https://forums.centos.org/viewtopic.php?t=71727

Last edited by TB0ne; 07-15-2021 at 08:25 AM.
 
Old 07-15-2021, 09:50 PM   #27
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

In order to change the default kernel configuration I ran the following procedure according to the wiki.

I had to do minor changes (e.g yum install required for the rpmbuild to unpack).

Quote:
[root] yum groupinstall "Development Tools"
[root] yum install ncurses-devel qt5-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel

mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
rpm -i https://vault.centos.org/8.2.2004/Ba...93.el8.src.rpm

unpack and prepare the source files
------------------------------------
cd ~/rpmbuild/SPECS

[root] yum install audit-libs-devel dwarves elfutils-devel java-devel kabi-dw libbpf-devel libcap-devel libcap-ng-devel llvm-toolset newt-devel numactl-devel openssl-devel pciutils-devel perl perl-devel python3-devel python3-docutils xmlto xz-devel

rpmbuild -bp --target=$(uname -m) kernel.spec

.config modification
------------------------------------
cd ~/rpmbuild/BUILD/kernel-*/linux-*/
make mrproper
cp /boot/config-`uname -r` .config

make menuconfig (+modify configuration +save )

Add, as the first line of the .config file, either:
# x86_64

cp .config configs/kernel-4.18.0-`uname -m`.config
cp -av configs/* ~/rpmbuild/SOURCES/

cd ~/rpmbuild/SPECS/
cp kernel.spec kernel.spec.distro
vi kernel.spec

Add : %define buildid .cma
right after the line:
# define buildid .local

rpmbuild -bb --target=`uname -m` kernel.spec 2> build-err.log | tee build-out.log

cd /home/zvivered/rpmbuild/RPMS/`uname -m`/
[root] dnf install kernel-*.rpm --allowerasing
But after installing the new kernel, nothing was changed in the kernel configuration.
I only got a new line in the grub and the date of the kernel (/proc/version) was changed.

Can you please tell what did I do wrong ?

Thank you in advance,
Zvika
 
Old 07-15-2021, 11:23 PM   #28
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,369

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
change this
Quote:
cp -av configs/* ~/rpmbuild/SOURCES/
to this
Code:
cp .config ~/rpmbuild/SOURCES/kernel-`uname -m`.config
 
Old 07-16-2021, 08:06 AM   #29
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by colorpurple21859 View Post
change this

to this
Code:
cp .config ~/rpmbuild/SOURCES/kernel-`uname -m`.config
Yep...things that are typically done in step two.

Last edited by TB0ne; 07-16-2021 at 08:10 AM.
 
Old 07-16-2021, 05:53 PM   #30
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello colorpurple21859,

Thank you very much for your reply. I really appreciate it.

I tried to change to:
Quote:
cp .config ~/rpmbuild/SOURCES/kernel-`uname -m`.config
The final rpmbuild was not completed with the following in build-err.log:
Quote:
...
+ echo '**** GENERATING kernel ABI metadata ****'
+ gzip -c9
+ cp /home/zvivered/rpmbuild/BUILDROOT/kernel-4.18.0-193.el8.cma.x86_64/boot/symvers-4.18.0-193.el8.cma.x86_64.gz /home/zvivered/rpmbuild/BUILDROOT/kernel-4.18.0-193.el8.cma.x86_64/lib/modules/4.18.0-193.el8.cma.x86_64/symvers.gz
+ echo '**** kABI checking is enabled in kernel SPEC file. ****'
+ chmod 0755 /home/zvivered/rpmbuild/SOURCES/check-kabi
+ '[' -e /home/zvivered/rpmbuild/SOURCES/Module.kabi_x86_64 ']'
+ cp /home/zvivered/rpmbuild/SOURCES/Module.kabi_x86_64 /home/zvivered/rpmbuild/BUILDROOT/kernel-4.18.0-193.el8.cma.x86_64/Module.kabi
+ /home/zvivered/rpmbuild/SOURCES/check-kabi -k /home/zvivered/rpmbuild/BUILDROOT/kernel-4.18.0-193.el8.cma.x86_64/Module.kabi -s Module.symvers
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.5V4IQz (%build)
Bad exit status from /var/tmp/rpm-tmp.5V4IQz (%build)
I found similar error in google but failed to understand the solution.

Best regards,
Zvika
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to modify CGroup in the kernel configuration and then make a new image? hwang1298 Linux - Newbie 27 04-05-2018 04:40 PM
Math Kernel Library- does it modify the kernel? ron7000 Linux - General 3 12-17-2007 01:50 PM
How to modify the library path variable?modify the Electronkz Linux - Newbie 1 04-13-2004 06:18 AM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 03:34 AM
How can I modify the default configuration of gnome-terminalīs in RH 7.1 Coltrane Linux - Newbie 1 09-20-2001 02:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 04:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration