Compile a k/ubuntu kernel

Because of the issues that I have had with a 4GB of RAM and the nvidia onboard graphics trying to grab memory where the system RAM was placed. The nvidia onboard graphics was told to grab the memory from 0xb0000000 – 0xbfffffff because that was where the ACER BIOS was telling it where to go!!. (Here for more details)

Anyway, because of this, I am having to compile up the linux kernel ubuntu style. I am using 9.10 kubuntu at present.

I have used this ubuntu guide on how to compile up a linux kernel from this ubuntu website, kernel/compile.

The main parts that I have run are, (I am not using sudo because I setup the root password so that I do not have to type in sudo all of the time, I setup the root password by sudo passwd root)

cd /usr/src/
apt-get install fakeroot kernel-wedge build-essential makedumpfile
 
apt-get build-dep linux
 
apt-get build-dep linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
 
debian/rules updateconfigs
 
cd debian.master/scripts/misc 
chmod a+x *
cd -
debian/rules updateconfigs

I go into the /usr/src, because when you get the apt-get source of a the latest linux-image it places the files within the present directory that you are using and usually the linux kernel source files are placed in /usr/src.

The reason for the chmod a+x * is because some of the debian(.master)/scripts/misc need to be updated to have there execute permissions granted.

Make some changes to the kernel files, in my case the arch/x86/pci/i386.c file. Then to compile up the kernel

fakeroot debian/rules clean
CONCURRENCY_LEVEL=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-generic

One thought on “Compile a k/ubuntu kernel”

  1. If you want to hold the package, so that when you come to do a aptitude update – aptitude safe-upgrade, so that the kernel you have just build is not over written with the aptitude package manager then you can use

    aptitude hold

    aptitude hold linux-image-2.6.31-20-generic

    for example

Leave a Reply

Your email address will not be published.