Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

kickstart URGENT

SOLVED
Go to solution
linuxtolinux
Frequent Advisor

kickstart URGENT

Hello everybody,
I tried to use rpmbuil --rebuild pkg.src.rpm in the post installation script of kickstart but it didn't work.
I checked that the pkg.src.rpm hab been copied to the installed machine.
Any help?
A question: in the post installation script , is the new installed kernel (OS) running on the machine when the post installation script is executed?

REGARDS
13 REPLIES
Stuart Browne
Honored Contributor
Solution

Re: kickstart URGENT

dumb question.. why are you trying to recompile a sorce RPM on a newly built machine? Why not compile it on an already working machine, and just install the pre-compiled binaries?

That being said, run up another test machine, go to ctl-alt-f4 (or ctl-alt-f5, can never remember which one), and look for errors.
One long-haired git at your service...
Vitaly Karasik_1
Honored Contributor

Re: kickstart URGENT

>I tried to use rpmbuil --rebuild >pkg.src.rpm in the post installation >script of kickstart but it didn't work.
>I checked that the pkg.src.rpm hab been >copied to the installed machine.
Did you have all gcc/make and so on?
Do you see any error messages in install log?

>A question: in the post installation >script , is the new installed kernel (OS) >running on the machine when the post >installation script is executed?
No!

linuxtolinux
Frequent Advisor

Re: kickstart URGENT

Hi guys,
Stuart: I need to do this step automatically due to some reasons.
I will reinstall on a new machine and check for the errors.
I already modifies my kickstart file to append the output of the rpmbuild command to a log file.

vitaly: concerning gcc and make pkg , they are installed i checked them.
i will check the install log file in the new machine that i am currently installed .

I will informe you guys with all the result as soon as the new installation complete .I am doing my test on a vmware machine

really thanks a lot
Regards
linuxtolinux
Frequent Advisor

Re: kickstart URGENT

Hello again,

this is a resume about the log file.
1-drivelog list the output of the command rpmbuil --rebuild:
Installing bcm5700-8.2.18-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.94713
.......
.....
....
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.94713


RPM build errors:


2-install.log:
Installing 577 packages

Installing hwdata-0.101.17-1.noarch.
Installing libgcc-3.2.3-52.i386.
.........
......
......
Installing make-3.79.1-17.i386.
Installing automake14-1.4p6-6.noarch.
Installing automake15-1.5-7.noarch.
......
Installing gcc-3.2.3-52.i386.
Installing gcc-c++-3.2.3-52.i386.
Installing gcc-g77-3.2.3-52.i386.
Installing gcc-gnat-3.2.3-52.i386.
Installing gcc-java-3.2.3-52.i386.
Installing gcc-objc-3.2.3-52.i386.
Installing gcc-ssa-3.5ssa-0.20030801.48.i386.
Installing gcc-c++-ssa-3.5ssa-0.20030801.48.i386.
Installing gcc-g77-ssa-3.5ssa-0.20030801.48.i386.
Installing gcc-java-ssa-3.5ssa-0.20030801.48.i386.
Installing gcc-objc-ssa-3.5ssa-0.20030801.48.i386.
...........

3-a tail of install.log.syslog:
<86>Feb 14 12:13:58 useradd[4532]: new group: name=canna, gid=39

<86>Feb 14 12:13:58 useradd[4532]: new user: name=canna, uid=39, gid=39, home=/var/lib/canna, shell=/sbin/nologin
<86>Feb 14 12:14:06 useradd[4538]: new group: name=wnn, gid=49

<86>Feb 14 12:14:06 useradd[4538]: new user: name=wnn, uid=49, gid=49, home=/var/lib/wnn, shell=/sbin/nologin
<13>Feb 14 12:15:34 kudzu: linked /dev/mouse to /dev/psaux
<13>Feb 14 12:15:36 kudzu: ran mouseconfig for psaux
<13>Feb 14 12:15:36 kudzu: aliased usb-controller as usb-uhci
NB: i checked the lines mentionned above these lines in the .syslog no errors found


I really appreciate your interpretation as sonn as possible
Thanks
Regards

Vitaly Karasik_1
Honored Contributor

Re: kickstart URGENT

are you able to run "rpmbuild" command after installation?
BTW, do you have kernel sources installed?
linuxtolinux
Frequent Advisor

Re: kickstart URGENT

Hi

Yes I am able to run the command after installation.
And the kernel source pkg is also installed , this is an output of rpm -qa | grep kernel-source:
kernel-source-2.4.21-32.EL

btw: the drivelog that i listed before indicates that the rpmbuild process is stopped (with error) at the "make" step compared to a normal output of the same command tried after the installation.
Stuart Browne
Honored Contributor

Re: kickstart URGENT

Oh, that SRC RPM..

That package tries to compile against the *currently running* kernel.

Given that you're running against a 2.4.xxBOOT at the time (of which you don't have the kernel source installed for), this can't be done.

If you really want to do it, then use the kickstart %post to add a new once-of service which will do the recompile, start the appropriate services, and then remove it's self afterwards.

With the KS process I used to use, this is how we got around a number of similar issues.
One long-haired git at your service...
Vitaly Karasik_1
Honored Contributor

Re: kickstart URGENT

Kudos to Stuard!
It was so simple :-)
linuxtolinux
Frequent Advisor

Re: kickstart URGENT

Hi
Stuart :could you provide me with more information ?
I already copied the .src.rpm on the machine in a directory /mnt/driver and tried to recompile under:
%post --interpreter /bin/sh
cd /mnt/driver
rpmbuild --rebuild ......src.rpm

What I am missing to do?

Regards


linuxtolinux
Frequent Advisor

Re: kickstart URGENT

Hi
BELOW is a copy of my post installation section:
# post-installation script starts

%post --nochroot
mkdir -p /mnt/sysimage/mnt/drivers
cp /mnt/source/v40zdrivers/*.src.rpm /mnt/sysimage/mnt/drivers/

%post --interpreter /bin/sh
cd /mnt/drivers/
touch drivelog
rpmbuild --rebuild bcm5700-8.2.18-1.src.rpm > drivelog

I don't know what to add.

Vitaly Karasik_1
Honored Contributor

Re: kickstart URGENT

As Stuard explained, makefile inside bcm5700 source package uses running kernel version (`uname -r`) in order to build binary kernel mnodule.
I see two solutions:
1) to extract make script from src package, to fix it (e.g., replace `uname -r` with 2.4.xx-yy) and package src rpm again.
I don't like this way because it's not easy and the more important - it's not flexible
2) during postinstall add into rc.local "rpmbuild" and "rpm -i" commands.
It's pretty easy to remove these lines automatically after first boot.
Pratyush Paul_1
Valued Contributor

Re: kickstart URGENT

Hi -

Please try this link, it gives you a some idea of building rpm packages on a linux system.

http://www.linuxhacks.org/tutorials/jakes_rpm_build_tutorial.php

Thanks

Pratyush
Die Hard
linuxtolinux
Frequent Advisor

Re: kickstart URGENT

Hi guys,
I really want to thank you a lot for the help and solutions you provided to me.

I implemented the second solution declared by vitaly and it has vorked perfectly ( it is more suitable to be applied in my case because i want it to be implemented on the netword in such a way that the installation of any linux update on a new machine will be completely automatic. And I am now trying to do the solution provided by stuart FOR CURIOSITY, I think I will need it in the future.

REGARDS