Jump to content

those kernel srpms don't like me


BobGuy©
 Share

Recommended Posts

I tried to install the latest kernel-2.4.21.0.25mdk-1-1mdk.src.rpm like so:

 

$ su -

Password:

[root@home root]# cd /home/bob/download/rpms

 

# ls

kernel-2.4.21.0.25mdk-1-1mdk.src.rpm

 

# rpm -ivh kernel-2.4.21.0.25mdk-1-1mdk.src.rpm

1:kernel-2.4.21.0.25mdk ########################################### [100%]

 

NOTE: this went buy really fast, where as uncompressing the zeus kernel tarball takes much longer, like it missed a step.

 

[root@4-35 rpms]# cd /usr/src

[root@4-35 src]# ls

RPM/

 

Oh great where is the /usr/src/linux directory? :banghead:

# cd /usr/src/linux

-bash: cd: /usr/src/linux: No such file or directory

 

# cd /usr/src

# ls

RPM/

# cd RPM/SOURCES

# ls

linux-2.4.20.tar.bz2 linux-merge-config.awk README.kernel-sources

linux-2.4.21-pre4q25.tar.bz2 linux-merge-modules.awk README.Mandrake

linux-mdkconfig.h patch-2.4.21-pre4.bz2

 

Then I tried to uninstall the rpm:

 

# cd /home/bob/download/rpms

# ls

kernel-2.4.21.0.25mdk-1-1mdk.src.rpm

 

# rpm -e kernel-2.4.21.0.25mdk-1-1mdk.src.rpm

error: package kernel-2.4.21.0.25mdk-1-1mdk.src.rpm is not installed

 

Hey great it's almost sorta there, but its not 100% there.

 

So the question is how do I proced from here so I can compile this kernel?

 

As you can tell, I'm not use to working with SRPMS. :oops:

Link to comment
Share on other sites

src.rpms are meant for rebuilding, not really for installing.

 

if you want the kernel source, you want to install kernel-source*.i586.rpm

urpmi kernel-source

should do the trick.

Link to comment
Share on other sites

A note on src.rpms

 

when you download a src.rpm, type the following as root:

rpm --rebuild name_of.src.rpm

 

This will create a "name_of.i586.rpm" in /usr/src/RPM/RPMS/i586/

 

you would then

cd /usr/src/RPM/RPMS/i586/

rpm -ivh name_of.i586.rpm

or as I prefer

urmpi name_of.i586.rpm

Most just download the i586 rpm itself to save time, but if you like to rebuild for different architectures, like i686 or 486 for example, src.rpm's come in handy. Note they wouldn't end up in /usr/src/RPM/RPMS/i586/ but the directory for their respective arch build. ;)

 

 

 

 

:!: Edit: 500! Yeah baby! :D

Link to comment
Share on other sites

Thanks for the information tyme & static, I just downloaded the kernel-source-2.4.21-0.25mdk.i586.rpm and hopefully it will uncompress like the tarballs do, and give me the /usr/src/linux directory chock full of the new kernel goodness. :D

 

# rpm -ivh kernel-source-2.4.21-0.25mdk.i586.rpm

 

I want to build this kernel for the athlon architecture, which is the cpu thats in use here.

 

I presume thats its ok to build this as su - (root) as opposed to loging in directly as root.

 

About whats installed from the first attempt, leave it? Or delete the stuff in the rpm/source directory before I install the new kernel-source-2.4.21-0.25mdk.i586.rpm source code? :oops:

Link to comment
Share on other sites

Most just download the i586 rpm itself to save time, but if you like to rebuild for different architectures, like i686 or 486 for example, src.rpm's come in handy. Note they wouldn't end up in /usr/src/RPM/RPMS/i586/ but the directory for their respective arch build.

 

Interesting, so hows that work when one never does a make menuconfig when using src.rpm's to change the architecture from i586 to athlon? :o

 

Time for me to start hunting down the info about this.

 

BTW I did compile the kernel from the kernel-source-2.4.21-0.25mdk.i586.rpm package and upon reboot to select it, I got the most wonderful kernel panic. :lol:

 

kernel panic: no init found, try passing init= option to kernel. Yeah right :)

 

Hey mandrake how about some decent documentation about how one compiles a kernel so it will work with your distro?

 

For what it's worth, I have never had this much of a problem compiling a kernel that works while using slackware.

Link to comment
Share on other sites

About whats installed from the first attempt, leave it? Or delete the stuff in the rpm/source
Well you can't exactly uninstall it, but yes, delete the stuff in the /usr/src/RPM dirs.

 

Also if you do ever try an src.rpm, do not use

rpm --rebuild

use

rpmbuild --rebuild

 

The first is being done away with (supposedly) and the second is the new. I don't remember the details, but it does something diff, heck, I believe it is its own pkg now (rpm-build). Some may remember at the old club-nihil users having trouble rpm --rebuild NVIDIA src.rpms. But they could successfully use rpmbuild --rebuild.

 

Interesting, so hows that work when one never does a make menuconfig when using src.rpm's to change the architecture from i586 to athlon?
rpmbiuld --rebuild target=athlon

 

The board has some great info on this for athlons.

 

 

BTW I did compile the kernel from the kernel-source-2.4.21-0.25mdk.i586.rpm package and upon reboot to select it, I got the most wonderful kernel panic.
Did you;

1. make mrproper (b4 anything else)

2. mkinitrd (after everything else)

SEE: mkinitrd --help and copy the example editing it for the correct version. Slack doesn't use an initrd.img (you'll find in /boot) :wink:

Link to comment
Share on other sites

Did you;  

1. make mrproper (b4 anything else)  

2. mkinitrd (after everything else)

 

Sure did, here is the procedure I used.

 

$ su -

Password:

[root@home root]#

 

I deleted the stuff in the /usr/src/RPM first.

 

# rpm -ivh kernel-source-2.4.21-0.25mdk.i586.rpm

cd /usr/src/linux-2.4.21-0.25mdk

copied the .conf to /root

 

# make mrproper

 

copied the .conf back to /usr/src/linux-2.4.21-0.25mdk

 

# make menuconfig

# make dep

# make bzImage

# make modules

# make modules_install

 

which gives me /lib/modules/2.4.21-0.25mdkcustom

 

# cp /usr/src/linux/arch/i386/boot/bzImage /boot/2.4.21-0.25mdkcustom

 

# cp /usr/src/linux/System.map /boot/System.map-2.4.21-0.25mdkcustom

 

# cd /boot

 

# mkinitrd /boot/initrd-2.4.21-0.25mdkcustom.img 2.4.21-0.25mdkcustom

 

edit lilo.conf to add:

image=/boot/vmlinuz-2.4.21-0.25mdkcustom

label="2421-25"

root=/dev/hda1

initrd=/boot/initrd.img

append="devfs=mount acpi=off"

read-only

 

# cd /

# sbin/lilo

Added 2421-25

Added 2421-18 *

Added linux

Added failsafe

Added floppy

 

Close out, logout, reboot, kernel panci time. :lol:

 

Slack doesn't use an initrd.img (you'll find in /boot) :wink:

 

I know, and it's wonderfull. :D

 

Thanks bvc for the info on 'rpmbuild --rebuild target=athlon' I'll have to try that some time.

Link to comment
Share on other sites

change you lilo.conf from

initrd=/boot/initrd.img

to

initrd=/boot/initrd-2.4.21-0.25mdkcustom.img

 

you did that with

mkinitrd /boot/initrd-2.4.21-0.25mdkcustom.img :wink:

 

Debian doesn't use an initrd either, and though I know there are many other reasons it boots in 1/4 the time mdk does :lol: ....I know slack does also, I tried 9.0.

Link to comment
Share on other sites

change you lilo.conf from  

initrd=/boot/initrd.img  

to  

initrd=/boot/initrd-2.4.21-0.25mdkcustom.img

 

That fixed it bvc, thanks very much. :D

 

I just figured that lilo can handle symlinks, and that the start up script would change to the correct *.img and use that, oh well live and learn. You can bet that I wont make this mistake twice. :)

 

$ uname -a

Linux x-xx.x-xx.se.rr.com 2.4.21-0.25mdkcustom #1 Thu Jul 31 22:26:59 EDT 2003 i686 AMD Athlon Processor AuthenticAMD GNU/Linux

 

Now to search the board for information about, rpmbuild --rebuild target=athlon as it looks like something I'd like to try in the future. 8)

Link to comment
Share on other sites

you're welcome!

lilo does handle the symlink but if you do

file /boot/initrd.img

you'll find that it points to another .img for another kernel, usually the default, unless you do make install. Then everything is edited and changed, but that's not recommended.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...