From owner-freebsd-questions@FreeBSD.ORG Wed Mar 17 16:36:26 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16549106566C for ; Wed, 17 Mar 2010 16:36:26 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (dc.cis.okstate.edu [139.78.103.93]) by mx1.freebsd.org (Postfix) with ESMTP id C19348FC36 for ; Wed, 17 Mar 2010 16:36:25 +0000 (UTC) Received: from dc.cis.okstate.edu (localhost.cis.okstate.edu [127.0.0.1]) by dc.cis.okstate.edu (8.14.2/8.13.8) with ESMTP id o2HGaEwn029337 for ; Wed, 17 Mar 2010 11:36:14 -0500 (CDT) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <201003171636.o2HGaEwn029337@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29335.1268843774.1@dc.cis.okstate.edu> Date: Wed, 17 Mar 2010 11:36:14 -0500 From: Martin McCormick Subject: Re: Automatic Way to Tell if a FreeBSD system is 64 or 32-bit? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 16:36:26 -0000 Chris Rees writes: sysctl hw.machine_arch It and uname -m work beautifully. Thanks to all. One thing I discovered while trying this command out on various systems is that if the system was originally built using i386 code, it reports as i386 even though there is a 64-bit platform struggling to get out. In my script, this is not a problem because the mfsboot CDROM for 32-bit boxes chokes on a 64-bit platform and will not boot. When on a 64-bit system, it boots like gang busters and since it installs its own OS, there is no question at all. Thank you all. Martin McCormick