Re: Need instructions: build kernel on one machine; install on another

2002-08-13 Thread David Brinegar

See also:  http://www.freebsddiary.org/makeworld-2boxes.php


On Tue, Aug 13, 2002 at 08:56:18AM -0500, Steve Peterson wrote:
> Hi -- I'm looking for a pointer to instructions on how to take a kernel 
> built on one machine and install it on another.  I checked the handbook and 
> the FAQ to no avail, and did some searching of the mailing list that came 
> up empty.  I've built & installed kernels using "make buildkernel ; make 
> installkernel", so I'm not a total newbie to kernel building.
> 
> If the answer is to go and look at the "installkernel" target in the 
> makefile, I can handle that, but wanted to check with the list to see if 
> there's anything I should be paying attention to.
> 
> I'd be happy to take whatever I get in terms of instructions and write it 
> up as a FAQ entry.
> 
> S
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-stable" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Need instructions: build kernel on one machine; install on another

2002-08-13 Thread Chen Xu


On Tuesday, August 13, 2002, at 10:37  AM, Michael Sierchio wrote:
>
> Beware the contents of /etc/make.conf if you have machines with
> different processors (Athlon versus Pentium versus i686)

Are you saying the kernel compiled at one type of cpu will not
work on the other type of cpu EVEN the config file it right?
A generic kernel shipped with CD was certainly compiled
with only one type of cpu? I might miss something here.

> Sometimes useful to mount /usr/obj, too.
Yes, I agree. I do that all the time :-).

Chen
>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Need instructions: build kernel on one machine; install on another

2002-08-13 Thread Mike Harding


I can validate that this works - one way you can automate this is to
put the KERNCONF definition in /etc/make.conf.  We used this to bulk
update a farm of SMP and uniprocessor systems, the SMP kernel was
different for us.

One thing that can bite you is _other_ things in /etc/make.conf - like
if you use NO_SENDMAIL=yes in the base system - if /etc/make.conf
doesn't have the same options in the install systems the install will
fail.  Likewise for kerberos.  I don't know what can be done about CPU
variants unless you have a relatively homogenous setup.

What worked best for us was to keep /etc/make.conf as short as
possible, even if all of the systems ended up getting the games
directory installed...

- Mike H.

   Date: Tue, 13 Aug 2002 10:35:14 -0400
   Cc: [EMAIL PROTECTED]
   From: Chen Xu <[EMAIL PROTECTED]>
   Sender: [EMAIL PROTECTED]
   X-Loop: FreeBSD.ORG
   X-Spam-Status: No, hits=-2.3 required=5.0
   tests=IN_REP_TO,DOUBLE_CAPSWORD
   version=2.31
   X-Spam-Level: 


   On Tuesday, August 13, 2002, at 10:20  AM, Dmitry Agafonov wrote:
   >
   > We have compiled kernels (make buildkernel KERNCONF=LALALA) on one machine,
   >  and then after nfs-mounting /usr/src and /usr/obj to target machine - 
   > make installkernel KERNCONF=LALALA
   > This works fine and is very good for poor-cpu/ram machines :)
   >


   > The question still remains - can one build a number of kernels and
   > then install them? This will save some time on updating a number
   > of machines: 3 steps (cvsup'ing and world and kernel(s) building)
   > may be fully automated.

   I don't see why you cann't do it for many machines. One can just
   make buildkernel KERNCONF=LALALA
   ...
   make buildkernel KERNCONF=ZAZAZA

   then nfs mount to each machine to installkernel. Only problem is
   that you have to do `installkernel KERNCONF=$cornel_config`
   on each target boxes, which makes fully auto a problem. \

   Chen


   To Unsubscribe: send mail to [EMAIL PROTECTED]
   with "unsubscribe freebsd-stable" in the body of the message


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Need instructions: build kernel on one machine; install onanother

2002-08-13 Thread Chris BeHanna

On Tue, 13 Aug 2002, Chen Xu wrote:

> On Tuesday, August 13, 2002, at 10:20  AM, Dmitry Agafonov wrote:
> >
> > We have compiled kernels (make buildkernel KERNCONF=LALALA) on one machine,
> >  and then after nfs-mounting /usr/src and /usr/obj to target machine -
> > make installkernel KERNCONF=LALALA
> > This works fine and is very good for poor-cpu/ram machines :)
> >
>
>
> > The question still remains - can one build a number of kernels and
> > then install them? This will save some time on updating a number
> > of machines: 3 steps (cvsup'ing and world and kernel(s) building)
> > may be fully automated.
>
> I don't see why you cann't do it for many machines. One can just
> make buildkernel KERNCONF=LALALA
> ...
> make buildkernel KERNCONF=ZAZAZA
>
> then nfs mount to each machine to installkernel. Only problem is
> that you have to do `installkernel KERNCONF=$cornel_config`
> on each target boxes, which makes fully auto a problem. \

Why?

for i in mach1 mach2 mach3 mach4
do
ssh $i /root/upgrade.sh
done


And upgrade.sh contains something like:

mount -t nfs buildmachine:/usr/src /usr/src
cd /usr/src
make installkernel KERNCONF=MYKERNEL KODIR=/modules
umount /usr/src


Of course, it needs a little polish, but you get the idea.

-- 
Chris BeHanna  http://www.pennasoft.com
Principal Consultant
PennaSoft Corporation
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Need instructions: build kernel on one machine; install on another

2002-08-13 Thread Olivier Tharan

* Dmitry Agafonov <[EMAIL PROTECTED]> (20020813 18:20):
> The question still remains - can one build a number of kernels and
> then install them? This will save some time on updating a number
> of machines: 3 steps (cvsup'ing and world and kernel(s) building)
> may be fully automated.

You can put several kernel names in the KERNCONF variable in make.conf:

KERNCONF=   SUZIE WEIRDOS HOBBES

The only trick which I learned some days ago is you have to put the name
of the local kernel first in the list (here SUZIE will be the kernel I
install on the build machine with 'make installkernel').

On the other machines, you only need to put the machine's kernel name in
the KERNCONF variable in make.conf.

olive
-- 
C makes it easy to shoot yourself in the foot.  C++ makes it harder, but
when you do, it blows away your whole leg.  -- Bjarne Stroustrup on C++

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Can someone MFC the patch in bin/37717?

2002-08-13 Thread Fred Clift


As the subject says, can someone MFC the patch in bin/37717?  It is not
terribly critical, but it's a simple little fix that I'm concerned aobut
only for vanity-type reasons :).  That, and it's one less local patch I
have to worry about applying...


Fred

--
Fred Clift - [EMAIL PROTECTED] -- Remember: If brute
force doesn't work, you're just not using enough.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Need instructions: build kernel on one machine; install on another

2002-08-13 Thread Greg Panula

Chen Xu wrote:
> 
> On Tuesday, August 13, 2002, at 10:37  AM, Michael Sierchio wrote:
> >
> > Beware the contents of /etc/make.conf if you have machines with
> > different processors (Athlon versus Pentium versus i686)
> 
> Are you saying the kernel compiled at one type of cpu will not
> work on the other type of cpu EVEN the config file it right?
> A generic kernel shipped with CD was certainly compiled
> with only one type of cpu? I might miss something here.

I use an Althon CPU in my "world-builder" box and I haven't run into any
problems with worlds&kernels built on that box for Intel based
machines(P90-PIII450).  The worldbuilder has an empty /etc/make.conf.

I think Michael was just warning about CPU specific stuff in
/etc/make.conf on the machine doing the actual building.  Take a look at
/etc/defaults/make.conf for various CPU specific variables that can be
set.

greg

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Can someone MFC the patch in bin/37717?

2002-08-13 Thread Bosko Milekic


On Tue, Aug 13, 2002 at 09:32:54AM -0600, Fred Clift wrote:
> 
> As the subject says, can someone MFC the patch in bin/37717?  It is not
> terribly critical, but it's a simple little fix that I'm concerned aobut
> only for vanity-type reasons :).  That, and it's one less local patch I
> have to worry about applying...

  Done.  Thank you.
 
> Fred
> 
> --
> Fred Clift - [EMAIL PROTECTED] -- Remember: If brute
> force doesn't work, you're just not using enough.

-- 
Bosko Milekic * [EMAIL PROTECTED] * [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Need instructions: build kernel on one machine; install onanother

2002-08-13 Thread Chris BeHanna

On Tue, 13 Aug 2002, Greg Panula wrote:

> Chen Xu wrote:
> >
> > On Tuesday, August 13, 2002, at 10:37  AM, Michael Sierchio wrote:
> > >
> > > Beware the contents of /etc/make.conf if you have machines with
> > > different processors (Athlon versus Pentium versus i686)
> >
> > Are you saying the kernel compiled at one type of cpu will not
> > work on the other type of cpu EVEN the config file it right?
> > A generic kernel shipped with CD was certainly compiled
> > with only one type of cpu? I might miss something here.
>
> I use an Althon CPU in my "world-builder" box and I haven't run into any
> problems with worlds&kernels built on that box for Intel based
> machines(P90-PIII450).  The worldbuilder has an empty /etc/make.conf.
>
> I think Michael was just warning about CPU specific stuff in
> /etc/make.conf on the machine doing the actual building.  Take a look at
> /etc/defaults/make.conf for various CPU specific variables that can be
> set.

Right.  IF you're going to set a CPUTYPE in /etc/make.conf, it has
to be set to the lowest common denominator of all of the machines that
are going to be installing from the build machine.

Of course, if one has the disk space, one can do a few
cross-builds using the MAKEOBJDIRPREFIX environment variable, then
install from the appropriate cross-build.  That's not terribly
sensible until the base compiler is GCC-3.1, which has support for
some of the newer CPUs.

Example:

env MAKEOBJDIRPREFIX=/usr/obj.p3 make buildworld CPUTYPE=p3

-- 
Chris BeHanna  http://www.pennasoft.com
Principal Consultant
PennaSoft Corporation
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Problems with make buildworld from 4.3 RELEASE to Current Stable

2002-08-13 Thread Ruslan Ermilov

On Mon, Jun 03, 2002 at 07:28:31PM +0300, Ruslan Ermilov wrote:
> On Mon, Jun 03, 2002 at 05:14:04PM +0200, Gareth Hopkins wrote:
> > Howdie,
> > 
> > I am trying to upgrade a couple of boxes from 4.3 RELEASE to the
> > current stable and am getting the following error (same error on two
> > different boxes sofar)
> > 
> > cc -O -pipe -I/usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/include  
>-I/usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/asn1 
>-I/usr/src/kerberos5 /lib/libasn1/../../../crypto/heimdal/lib/roken 
>-I/usr/src/kerberos5/lib/libasn1/..  /../include  
>-I/usr/obj/usr/src/kerberos5/lib/libasn1 -Wall -I/usr/src/kerberos5/li 
>b/libasn1/../../include -I/usr/src/kerberos5/lib/libasn1/../../include -DHAVE_CONFI 
>G_H -DINET6 /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/asn1/gen.c 
>/usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/asn1/gen_copy.c /usr/src 
>/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/asn1/gen_decode.c /usr/src/kerbe 
>ros5/lib/libasn1/../../../crypto/heimdal/lib/asn1/gen_encode.c /usr/src/kerberos5/l 
>ib/libasn1/../../../crypto/heimdal/lib/asn1/gen_free.c /usr/src/kerberos5/lib/libas 
>n1/../../../crypto/heimdal/lib/asn1/gen_glue.c /usr/src/kerberos5/lib/libasn1/../..  
>/../crypto/heimdal/lib/asn1/gen_length.c /usr/src/kerberos5/lib/libasn1/../../../cr 
>ypto/heimdal/lib/asn1/hash.c /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal 
>/lib/roken/emalloc.c lex.o /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/l 
>ib/asn1/main.c parse.o /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/a 
>sn1/symbol.c /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken/getar 
>g.c /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken/warnerr.c prin 
>t_version.o /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken/get_wi 
>ndow_size.c /usr/src/kerberos5/lib/libasn1/../../../crypto/heimdal/lib/roken/strupr 
>.c -o asn1_compile
> > /tmp/cc1kbFDn.o: In function `main': /tmp/cc1kbFDn.o(.text+0x47): undefined 
>reference to `setprogname'
> > /tmp/ccHkcD1A.o: In function `arg_printusage':
> > /tmp/ccHkcD1A.o(.text+0x68e): undefined reference to `getprogname'
> > /tmp/ccq5EvQS.o: In function `warnerr':
> > /tmp/ccq5EvQS.o(.text+0x17): undefined reference to `getprogname'
> > print_version.o: In function `print_version':
> > print_version.o(.text+0x19): undefined reference to `getprogname'
> > *** Error code 1
> > 
> > Stop in /usr/src/kerberos5/lib/libasn1.
> > *** Error code 1
> > 
> > Stop in /usr/src.
> > *** Error code 1
> > 
> > I have already gone through the make cleandir twice in /usr/src aswell
> > as rm -rf /usr/obj/* and then cvsupping again. Still getting the same
> > error. I have the following included in the /etc/make.conf
> > 
> > MAKE_KERBEROS5= yes
> > ENABLE_SUID_K5SU= yes
> > 
> > Anything else that I need to do?
> > 
> Please try this patch:
> 
[Patch elided.]

The patch has been committed to 5.0-CURRENT.
MFC in three days.


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age



msg48597/pgp0.pgp
Description: PGP signature


Re: Need instructions: build kernel on one machine; install on another

2002-08-13 Thread Scott Lambert

On Tue, Aug 13, 2002 at 10:35:14AM -0400, Chen Xu wrote:
> 
> On Tuesday, August 13, 2002, at 10:20  AM, Dmitry Agafonov wrote:
> >
> >We have compiled kernels (make buildkernel KERNCONF=LALALA) on one machine,
> > and then after nfs-mounting /usr/src and /usr/obj to target machine - 
> >make installkernel KERNCONF=LALALA
> >This works fine and is very good for poor-cpu/ram machines :)
> >
> >The question still remains - can one build a number of kernels and
> >then install them? This will save some time on updating a number
> >of machines: 3 steps (cvsup'ing and world and kernel(s) building)
> >may be fully automated.
> 
> I don't see why you cann't do it for many machines. One can just
> make buildkernel KERNCONF=LALALA
> ...
> make buildkernel KERNCONF=ZAZAZA
> 
> then nfs mount to each machine to installkernel. Only problem is
> that you have to do `installkernel KERNCONF=$cornel_config`
> on each target boxes, which makes fully auto a problem. \

>From my buildeverything script:

  THIS_HOSTS_KERNEL=`uname -a | sed 's|.*/sys/||' | awk '{print $1}'`
  make installkernel KERNCONF=$THIS_HOSTS_KERNEL 

There is probably a less expensive way to gather the installed kernel's 
config file name, but I just threw this together and ran it.

-- 
Scott LambertKC5MLE   Unix SysAdmin
[EMAIL PROTECTED]  

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Need instructions: build kernel on one machine; install on another

2002-08-13 Thread Steve O'Hara-Smith

On Tue, 13 Aug 2002 17:24:37 +0200
Olivier Tharan <[EMAIL PROTECTED]> wrote:

OT> * Dmitry Agafonov <[EMAIL PROTECTED]> (20020813 18:20):
OT> > The question still remains - can one build a number of kernels and
OT> > then install them? This will save some time on updating a number
OT> > of machines: 3 steps (cvsup'ing and world and kernel(s) building)
OT> > may be fully automated.
OT> 
OT> You can put several kernel names in the KERNCONF variable in
OT> make.conf:
OT> 
OT> KERNCONF=   SUZIE WEIRDOS HOBBES
OT> 
OT> The only trick which I learned some days ago is you have to put the
OT> name of the local kernel first in the list (here SUZIE will be the

You can also set INSTALLKERNEL= WIERDOS to push SUZIE out.

-- 
C:>WIN  | Directable Mirrors
The computer obeys and wins.|A Better Way To Focus The Sun
You lose and Bill collects. |  licenses available - see:
|   http://www.sohara.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message