From owner-freebsd-questions@FreeBSD.ORG Fri Sep 7 19:31:06 2012 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 D8E4F106566C for ; Fri, 7 Sep 2012 19:31:06 +0000 (UTC) (envelope-from markham_breitbach@ssimicro.com) Received: from mail.ssimicro.com (mail.ssimicro.com [64.247.129.10]) by mx1.freebsd.org (Postfix) with ESMTP id A55CF8FC08 for ; Fri, 7 Sep 2012 19:31:06 +0000 (UTC) Received: from markham.ssimicro.com (markham.ssimicro.com [64.247.130.99]) (authenticated bits=0) by mail.ssimicro.com (8.14.4/8.14.4) with ESMTP id q87JOxWw010446 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT) for ; Fri, 7 Sep 2012 13:24:59 -0600 (MDT) Message-ID: <504A4A0B.10908@ssimicro.com> Date: Fri, 07 Sep 2012 13:24:59 -0600 From: markham breitbach User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: gpart and mbr give "no operating system" message at boot. 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: Fri, 07 Sep 2012 19:31:07 -0000 I am trying to partition a disk to be used as the primary boot disk for a FreeBSD 8.3 installation using gpart to install an MBR partition. The system is an existing FreeBSD 5.2.1 system at a remote location (ie impossible to boot from CD/netboot/etc), but has no data of value. To do this I am copying /boot and mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can wipe the drive and do a clean install of 8.3. After booting to the MFS I do this: dd if=/dev/zero of=/dev/ad2 bs=1m count=1 gpart create -s mbr ad2 gpart add -b63 -t freebsd ad2 gpart create -s bsd ad2s1 gpart add -i1 -s 1g -t freebsd-ufs ad2s1 gpart add -i2 -s 1g -t freebsd-swap ad2s1 gpart add -i4 -s 2g -t freebsd-ufs ad2s1 gpart add -i5 -s 1g -t freebsd-ufs ad2s1 gpart add -i6 -t freebsd-ufs ad2s1 gpart set -a active -i 1 ad2 gpart bootcode -b /boot/mbr ad2 newfs /dev/ad2s1a newfs -U /dev/ad2s1d newfs -U /dev/ad2s1e newfs -U /dev/ad2s1f followed by a sysinstall and some configuration. When I reboot I get a message that says "Operating system not found" and the system hangs. If I follow the same procedure but create a gpt partition it works swimmingly. I am OK with using a gpt partition if needed, but for the sake of curiosity I would like to know why I can't make the MBR partition partition work. Am I missing something?