Jump to content

new kernels, low bandwidth, and NVIDIA


aru
 Share

Recommended Posts

This trick goes for people that fit in this list:

  • Want to be on the bleeding edge
     
  • Love precompiled mandrake kernels (aka dont_want_to_mess_with_make_config_each_time people)
     
  • Have an Nvidia card
     
  • Have *extremly* low bandwidth

Those people in order to install a precompiled new kernel usually have to download the same kernel *twice*, first the binary, and latter the source code to make the propietary Nvidia drivers work.

 

What I propose is to download only the source code and just the "config" file of the binary kernel you like, then compile. To achieve this you'll have to use rpm2cpio and cpio commands (as always it is not a bad idea to take a look to their man pages).

 

As I've only done this once (rigth now), this are the steps I've done (in command line -- not a script):

 

~$ MIRROR=ftp://ftp.rediris.es/pub/linux/distributions/mandrake-devel/cooker/cooker/Mandrake/RPMS
~$ wget -c ${MIRROR}/kernel-source-2.6.2-3mdk.i586.rpm

 

One hour and a half later, I have the source code here. Now the interesting part, the trick: instead of a full download of the binary rpm package, download only the config file of the binary you like, and stop the download proccess when the objetive is achieved, that is when the config file is saved. So here you are (see the man pages of rpm2cpio and cpio to see what they do):

 

~$ MY_KERNEL=kernel-smp-2.6.2.3mdk-1-1mdk.i586.rpm
~$ rpm2cpio ${MIRROR}/${MY_KERNEL}|cpio -idv *config-* 2>&1 | tee myresult &
[1] 11551
~$ while :; do if grep config myresult; then sleep 20; killall rpm2cpio; break; else sleep 2; fi; done
./boot/config-2.6.2-3mdksmp
./boot/config-2.6.2-3mdksmp
cpio: premature end of file

[1]+  Done                    rpm2cpio ${MIRROR}/${MY_KERNEL} | cpio -idv *config-* 2>&1 | tee myresult
~$ ls ./boot/
config-2.6.2-3mdksmp
~$

 

That's all folks; just only two minutes later if you look into ./boot/ you'll see your brand new configuration file (config-2.6.2-3mdksmp in the example). Now use it to compile the source code and enjoy the new kernel as it will be the same you wanted (as if you'd downloaded the full binary package).

 

 

Hope you liked it ;)

 

Edited: my english goes worst every day

Edited by aru
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...