From owner-freebsd-questions@FreeBSD.ORG Fri May 29 15:46:27 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A23782EB for ; Fri, 29 May 2015 15:46:27 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 554111113 for ; Fri, 29 May 2015 15:46:26 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t4TFkIct004158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 29 May 2015 09:46:19 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t4TFkIto004151; Fri, 29 May 2015 09:46:18 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 29 May 2015 09:46:18 -0600 (MDT) From: Warren Block To: David Newman cc: freebsd-questions@freebsd.org Subject: Re: Missing boot loader (was: Re: creating a virtual clone) In-Reply-To: <55687BE9.40803@networktest.com> Message-ID: References: <5522C5DE.1050005@networktest.com> <55687BE9.40803@networktest.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 29 May 2015 09:46:19 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2015 15:46:27 -0000 On Fri, 29 May 2015, David Newman wrote: > On 4/6/15 9:28 PM, Olivier Nicole wrote: > >> My solution is http://www.cs.ait.ac.th/~on/technotes/archives/2015/01/30/how-to_clone_a_freebsd_virtual_machine_on_vmware/index.html >> certainly not the best/fastest, but it works. > > Thanks for this. After following the clone instructions, restore appears > to work, but the system comes up with a "Missing boot loader" error. > > This is perhaps because the next-to-last step from the live CD is: > > cd / > mount -o rw /dev/da0p1 /mnt > gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptboot -i 1 da0 > > And that returns "/dev/da0p1: Operation not permitted" even though da0p1 > is the target system's root/boot partition. In this code, da0 is the source disk, where the bootcode files are read. It is mounted on /mnt. So there are two reasons that gpart cannot write bootcode to da0p1. First, it is mounted, and second, it is filesystem partition, not a freebsd-boot partition. The target disk cannot be da0p1. Maybe it is a simple typo, and either the second or third line was meant to be ada0 rather than da0.