Using ketchup to quickly install kernel sources

ketchup is a neat utility to download and unpack a specific version of the Linux kernel sources into the current directory. It also does rather well on saving download bandwidth, i.e. if you have the 2.6.17 source tarball and ask for 2.6.18, it will only download the 2.6.17-to-2.6.18 patch.

Here’s a quick usage example, which installs the 2.6.21-rc7 kernel sources:

# emerge ketchup
# cd /usr/src
# mkdir linux-2.6.21-rc7
# cd linux-2.6.21-rc7
# ketchup 2.6.21-rc7

When ketchup has finished, you then have a clean set of kernel sources for that particular version in front of you.

I like to configure ketchup to use the same storage directory as portage, so that they can share kernel tarballs. In my ~/.ketchuprc I have:

archive = "/usr/portage/distfiles"

7 Responses to “Using ketchup to quickly install kernel sources”

  1. J.Alberto Says:

    Nice tool.

    Can be used to dowload other than vanilla kernel? (for example redhat sources)

  2. Uzytkownik Says:


  3. Alexandre Says:

    Speaking of which, ketchup is orphaned since I retired (though I’m probably still listed in metadata.xml). It’d be nice if you or the kernel herd could take it, since I agree it’s a very useful software.

  4. dsd Says:

    Looks like there aren’t any newer versions available. I just asked arch teams to mark 0.9.8 stable.

  5. Wolfram Schlich Says:

    Hmm, ketchup is broken regarding kernel_url — it does neither use kernel_url in ~/.ketchuprc, nor -k or –kernel-url nor KETCHUP_URL,
    as it is supposed to…

  6. ketchup, or how to manage your kernel sources more efficiently « seg fault Says:

    [...] couple of months ago I found out about ketchup (credits to Daniel Drake, and his [...]

  7. what is the weather today Says:

    what to watch on netflix


Leave a Reply

You must be logged in to post a comment.