7

I am using the now unsupported Jaunty. However, I'm also running an older unsupported kernel which I wish to programme.

i'm trying to make new system calls in kernel 2.6.21 and one of the new system calls use 'sys_write' function, but to use this function, i realized that i must install kernel header file according to 2.6.21 version.

i tried "apt-get install linux-headers-'uname -r' ", "apt-cache search linux-headers-$(uname -r)"

but i can't find anything..

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/syscalls.h>
#include <linux/fcntl.h>
#include <asm/uaccess.h>

additionally, above header files is what i want to.

how can i get the kernel header file for something that is now unsupported and not in a current repository?

2
  • Is that Ubuntu Feisty you are using? This has been not supported in a very long time - from here it looks like its no longer in the ubuntu archives - why are you using such an old version of ubuntu? archive.ubuntu.com/ubuntu/dists
    – fossfreedom
    May 14, 2011 at 9:59
  • no i am using Ubuntu Jaunty:)
    – KayKay
    May 14, 2011 at 12:12

2 Answers 2

7

Kernel 2.6.21 was used I think on Ubuntu Feisty (7.04).

From your comment you said that you are using Ubuntu Jaunty - this is strange since the kernel for Jaunty was 2.6.28.

Both Feisty and Jaunty are no longer supported and you will not be able to install any packages such as the headers via the "sudo apt-get" method.

You are strongly recommended to replace your installation with at a minimum version 10.04.

Both Jaunty & Feisty are no longer in the official ubuntu archive.

However all the original package information for all Ubuntu releases can be found here.

To track down the original .deb packages to install takes a bit of detective work.

I'll start for an example to search for the 2.6.28 Jaunty linux headers.

Linux Headers exist in the main repository. So first download the Sources for the main repository

You'll need to extract the Sources file.

Have a look at the file in your favourite editor.

You are looking for the linux-headers Binary - see this screen-shot enter image description here

You'll see that I've underlined the linux-headers - you'll see the package name and the location where you need to find that package

Next point your browser to the start of the folder where to find the package

http://archive.ubuntu.com/ubuntu/

Navigate to that package name - in this case

pool/main/l/linux

In that folder you'll notice all the original deb files for every release. So for Jaunty you would look for files beginning linux-headers-2.6.28.

Now you'll see all related files - load the deb files according to your architecture (64bit ends with amd64.deb, 32bit ends with i386.deb) together with the header files ending "all.deb"

For the Feisty packages, do similar to the above - but this time start with the Sources file for the Feisty distribution.

3
  • thanks for reply, the reason for my kernel's version 2.6.21 is that i installed old version on jaunty.
    – KayKay
    May 14, 2011 at 13:55
  • and do you mean that i can install the header files on 2.6.21 version via the downloading the sources?
    – KayKay
    May 14, 2011 at 13:57
  • in archive.ubuntu.com/ubuntu/dists/jaunty/main/source there are so many packages, what i have to install
    – KayKay
    May 14, 2011 at 14:08
7

Modify your sources.list to point to

http://old-releases.ubuntu.com/

instead of the current

http://<country-code>.ubuntu.com/
2
  • that is! what i search for!
    – KayKay
    May 16, 2011 at 2:51
  • 1
    So why do you accepted the other answer?
    – enzotib
    May 16, 2011 at 6:42

Not the answer you're looking for? Browse other questions tagged .