FANDOM


Reference

This is taken from the Reference above at the latter part for Ubuntu variation. The purpose of doing this kernel compile was to enable the NFS export of a AUFS filesystem. 12.04 has AUFS still in the release however NFS export is off by default.


A good NFS export tutorial can be found here

Example export of NFS from /etc/exports:

(note, /storage is the aufs pooled. The export will require a fsid and I believe crossmnt is also required)

/srv/nfs4       192.168.1.0/24(rw,sync,no_subtree_check)

/storage/ftp    192.168.1.0/24(rw,fsid=0,sync,no_subtree_check,crossmnt,anonuid=1000,anongid=1000)

This is usually required after editing /etc/exports

sudo service nfs-kernel-server start

or perhaps

exportfs -r

BEGIN:

Get the source for Precise

git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git


Install a couple packages you will need

sudo apt-get install kernel-package
sudo apt-get install libncurses5-dev

Copy the existing Kernel package and other control scripts

cp -a /usr/share/kernel-package ubuntu-package
cp ubuntu-precise/debian/control-scripts/{postinst,postrm,preinst,prerm} ubuntu-package/pkg/image/
cp ubuntu-precise/debian/control-scripts/headers-postinst ubuntu-package/pkg/headers/
cd ubuntu-precise


Get the existing config (Copy the kernel config file from your existing system to the kernel tree. This is the file that has the NFS export for AUFS turned off)

cp /boot/config-`uname -r` .config


Bring the config file up to date. Answer any questions that get prompted. Unless you know you are interested in a particular feature, accepting the default option by pressing Enter should be a safe choice:

make oldconfig


Change the NFS export of AUFS flag in the ncurses screen here (Do a search, i.e. / to find where aufs is)

make menuconfig


Clean the kernel source directory

make clean


Compile the source (Build the linux-image and linux-header .deb files using a thread per core + 1. This process takes a lot of time)

CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg --initrd --append-to-version=-customsds5 --overlay-dir=$HOME/linux/ubuntu-package kernel_image kernel_headers


Change to one directory level up (this is where the linux-image and linux-header .deb files were put):

cd ..


Now install the .deb files. In this example, the files are linux-image-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb and linux-headers-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb. You may receive warnings about '/lib/firmware/2.6.24-rc5-custom/' - this is expected and will only be problematic if the driver you are trying to test requires firmware:

sudo dpkg -i linux-image-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb
sudo dpkg -i linux-headers-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb


You are now ready to boot into your new kernel. Just make sure you select the new kernel when you boot:

sudo reboot

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.