*BSD News Article 11974


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA2305 ; Mon, 01 Mar 93 10:53:10 EST
Newsgroups: comp.os.386bsd.questions
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!saimiri.primate.wisc.edu!usenet.coe.montana.edu!osyjm
From: osyjm@cs.montana.edu (Jaye Mathisen)
Subject: Re: Rebuilding the kernel
Message-ID: <1993Feb26.174613.1225@coe.montana.edu>
Sender: usenet@coe.montana.edu (USENET News System)
Organization: CS
References: <001.2miu0.561.930226193741Z.CC-MAIL*/O=DOE/PRMD=GOV+USDOE.G02/ADMD=ATTMAIL/C=US/@mailgw>
Date: Fri, 26 Feb 1993 17:46:13 GMT
Lines: 79

In article <001.2miu0.561.930226193741Z.CC-MAIL*/O=DOE/PRMD=GOV+USDOE.G02/ADMD=ATTMAIL/C=US/@mailgw> blansfie@mailgw.er.doe.gov writes:
>     Hi,
>     
>     How do you rebuild a 386bsd kernel?  If someone could just point me in 
>     the right direction as to anything to read that will help.  I have 
>     installed all the new patches but I'm at a loss as to where to go from 
>     here.   
>     
>     Any help appreciated and reciprecated!

As root:

1)  If you've just installed the patchkit, you have to make a new
config program, but you only need to do this once.

% cd /usr/src/usr.sbin/config
% make ; make install ; make clean

2)

% cd /sys/i386/conf

If you want to just use the GENERICISA kernel, skip the next step.
I personally recommend making a copy of GENERICISA to "YOUR-MACHINE-NAME-IN-CAPS",
and working on that one so you can always go back.

% cp GENERICISA "YOURMACHINENAMEINCAPS"
% vi "YOURMACHINENAMEINCAPS"

make the changes you think are necessary to the config file.
You should change the line that says 'ident GENERICISA'
to 'ident YOURMACHINENAMEINCAPS'.  In fact, I think this
is a must.  Note, if your machine name has a digit in it, 
like bsdpc2, you must put it in "'s, like 'ident "BSDPC2"'
or you will get a syntax error when running config.

3) Config the kernel

% config YOURMACHINENAMEINCAPS
or
% config GENERICISA

as appropriate.  There should be no errors here.  If you get
some, fix the config file and run 'er again.i

4) Build the kernel

% cd /sys/compile/YOURMACHINENAMEINCAPS
or 
% cd /sys/compile/GENERICISA

I usually run make clean first, just to be safe.
You might not need to, but it can't hurt, just makes
the compile take longer.

% make clean 
% make depend
% make

5)  Install the new kernel

If the make complete w/o any errors, it should print
out some info about the kernel (text/bss sizes, etc.)

Backup the original kernel

% cp /386bsd /386bsd.alt
% cp 386bsd /386bsd

6) Reboot and enjoy
% shutdown -r now

Of course, if you  muffed the kernel config, you'll have
to boot fixit.fs, mount your root fs, and cp /386bsd.alt to 
/386bsd, then reboot and fix whatever's wrong.
-- 
 Jaye Mathisen, COE Systems Manager                (406) 994-4780
 410 Roberts Hall,Dept. of Computer Science
 Montana State University,Bozeman MT 59717	osyjm@cs.montana.edu