| 12345678910111213141516171819202122232425262728293031323334353637 | <sect2><title>Installation of the kernel headers</title><para>We won't be compiling a new kernel yet -- we'll do that when we havefinished the installation of all the packages. But as some packages need thekernel header files, we're going to unpack the kernel archive now, set it up,and copy the header files to where they will be found by these packages.</para><para>It is important to note that the files in the kernel source directoryare not owned by root. Whenever you unpack a package as user root (like wedo here inside chroot), the files end up having the user and group ID's ofwhatever they were on the packager's computer. This is usually not aproblem for any other package you install because you remove the sourcetree after the installation. But the Linux kernel source tree is often keptaround for a long time, so there's a chance whatever userid was used willbe assigned to somebody on your machine, and that person would get writeaccess to the kernel source.</para><para>In light of this, you might want to run <userinput>chown0.0</userinput> on the linux-&kernel-version; directory to ensure all filesare owned by user <emphasis>root</emphasis>.</para><para>The kernel headers are installed by running the followingcommands:</para><para><screen><userinput>ln -s /static/bin/pwd /bin/pwd &&make mrproper &&make include/linux/version.h &&make symlinks &&cp -HR include/asm /usr/include &&cp -R include/asm-generic /usr/include &&cp -R include/linux /usr/include &&touch /usr/include/linux/autoconf.h &&rm /bin/pwd</userinput></screen></para></sect2>
 |