• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

recompiling kernel on freebsd system

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
ok ... so i have two servers running just fine and i have a free box to play with. what do i have to install "distribution" wise in order to compile the server? i normally do custom and just choose "bin" "dict" "local" "ports" "local" and i just leave the SRC distribution out. I dont see a need for me to recompile, but i've gotten to the point where now i want to mess with the internal stuff.
 

Rainsford

Lifer
Apr 25, 2001
17,515
0
0
You need src. Detailed instructions can be found in the freebsd handbook on freebsd.org. Just follow the instructions to synchronize your source (I prefer cvsup) and then making world. Enjoy, as long as you take your time and don't rush through it, it's not all that hard.
 

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
hmmmm ... i only installed src-sys (the kernel src) tree. I went ahead following the instructions found in the handbook and it gave me some error about not being able to go into a certain directory.

if i recall i did

make buildkernel KERNCONF=MYKERNEL

then some error msg about not being able to go into

/usr/src/i386/usr.bin.make

something like that.
 

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
Originally posted by: lilcam


yep ... thats wut i followed except for the first step. when i had initially installed this box i installed the src-sys distribution. i didnt install anything else besides that in the 'src' tree.
You can install the system source without installing the kernel source. You should be able to grab it from the cd or the current via CVS. Kernel developer install will give you a gui-less sytem with full source btw! :)
 

LuckyTaxi

Diamond Member
Dec 24, 2000
6,044
23
81
ok ... explain somthing to me. I love CVSup but im sure i am not utilizing it to its fullest potential. I normally just update my ports and leave the SRC alone. Am I wrong in doing this?
 

Rainsford

Lifer
Apr 25, 2001
17,515
0
0
You can use CVSup for ports and SRC (just use different config files for the different tasks). What I have is one supfile for updating my ports tree, and another for updating my src tree. I track the RELENG_4_7 source which is updated with all patches for 4.7 so it's up to date, but doesn't include any "new" features like stable or current (at least that is my understanding, the different branches can be confusing). So I just run cvsup with one supfile or the other to update the ports or the OS source itself.
 

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
Originally posted by: lilcam
ok ... explain somthing to me. I love CVSup but im sure i am not utilizing it to its fullest potential. I normally just update my ports and leave the SRC alone. Am I wrong in doing this?

If you want the security updates for the base system (openssh, sendmail, etc) I'd pull src. I track RELENG_4_7 as well which is security updates only.

I use:
#/usr/local/etc/cvsup/src-supfile
*default host=cvsup6.freebsd.org
*default base=/usr
*default prefix=/usr
*default release=cvs
*default tag=RELENG_4_7
*default delete use-rel-suffix
*default compress
src-all

#/usr/local/etc/cvsup/ports-supfile
*default host=cvsup6.freebsd.org
*default base=/usr
*default prefix=/usr
*default release=cvs
*default tag=.
*default delete use-rel-suffix
*default compress
ports-all

Now I run:
/usr/local/bin/cvsup -g -L 2 /usr/local/etc/cvsup/src-supfile
nightly which will check source. The output is mailed to me via cron. If there a change I know I need to go back and check my email for security advisories and if they apply either patch or do a build/install world/kernel cycle.

I can run cvs up on ports-supfile weekly or whatever to be sure the ports tree is reasonably up to date.

Then I have my /usr/src and /usr/ports shared out over NFS so all the other bsd boxes don't have to fetch and store them.