Friday, May 2, 2008

Kernel Source Tree

In the process of Installing ports you might come across an error missing kernel source tree. I'm going to show you how to install the source tree via CD and ISO.
To install source via cd you are going to be in the / directory
1st mounts the cd-rom
#mount /cdrom
Next make this sys directory which some programs look for
#mkdir -p /usr/src/sys
link it with the actual sys directory some programs will look in /sys and other in /usr/src/sys
#ln -s /usr/src/sys /sys
Next copy ssys files from cd-rom
#cat /cdrom/src/ssys.[a-d]* | tar -xzvf -
Copy sbase files from cd
#cat /cdrom/src/sbase.[a-d]* | tar -xzvf -
Now you have all your kernel source on your hard drive.
If your like me and don't have a cdrom you can do it from and iso image as well
Make sure you are in the / directory
make the location where you are going to mount the iso
#mkdir /iso
mount the iso mine is in /root direcotry
#mdconfig -a -t vnode -f /root/7.0-RELEASE-i386-disc1.iso -u 0
#mount -t cd9660 /dev/md0 /iso
Next make this sys directory which some programs look for
#mkdir -p /usr/src/sys
link it with the actual sys directory some programs will look in /sys and other in /usr/src/sys
#ln -s /usr/src/sys /sys
Next copy ssys files from iso
#cat /iso/src/ssys.[a-d]* | tar -xzvf -
Copy sbase files from iso
#cat /iso/src/sbase.[a-d]* | tar -xzvf -
Now you have all your kernel source on your hard drive.

No comments: