From owner-freebsd-questions@freebsd.org Mon Oct 3 02:40:14 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2296AC67B9 for ; Mon, 3 Oct 2016 02:40:14 +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 8ACF1673 for ; Mon, 3 Oct 2016 02:40:14 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u932e589084177 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 2 Oct 2016 20:40:05 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u932e514084174; Sun, 2 Oct 2016 20:40:05 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sun, 2 Oct 2016 20:40:05 -0600 (MDT) From: Warren Block To: JD cc: FreeBSD Questions Subject: Re: Clone a FBSD system with something in the likes of ghost In-Reply-To: Message-ID: References: <57EC9527.7020202@rcn.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sun, 02 Oct 2016 20:40:05 -0600 (MDT) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 02:40:14 -0000 On Sun, 2 Oct 2016, JD wrote: > By clone, you mean create a new disk with identical > content to the cloned disk? Including the boot blocks > of the cloned disk? > If so, dump and restore will only perform like a full backup. > The target (copy-to) disk will not be bootable. > If you want it bootable, then there is a simlpe procedure > 1. Obtain a new disk with sufficient capacity as close as possible >     to size of the source disk. Not less than, though!! > 2. dd if= of=/dev/..... i.e. the new disk> bs=128M conv=notrunc conv=fdatasync > > When finished, without error, > the new disk will be a bootable mirror of the original. There can be problems with that. GPT secondary partitions will be in the wrong place, and this is really bad on SSDs. It also takes longer than necessary because it copies every block, many of which are unused and don't need to be copied. From owner-freebsd-questions@freebsd.org Mon Oct 3 06:25:31 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C39C8AC61EF for ; Mon, 3 Oct 2016 06:25:31 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4B7AE5E for ; Mon, 3 Oct 2016 06:25:31 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=a+9iIF4gUmP+YOfdF2zwyuAPFnC0+sCHsoaaQgw8iw0=; b=Zlw5sDxMkkP2Po+KEDC6zzhT7g X+O86Y2F8wN9WLynRiUkYZSi9/k4DZF0YBPmPQUzmLtrkSQREyNHfHQuneKXAsVG81/8qREPgiMgW m5gKmBY0SrCCbxsLJhDvbph8yTZH3b4ybmwPFBPFgZigSDRnLGk0PvZoxpaDyhiMWz/8=; Received: from [114.120.233.15] (port=56832 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1bqwgm-000dZk-IX; Mon, 03 Oct 2016 00:25:25 -0600 Date: Mon, 3 Oct 2016 14:25:16 +0800 From: Erich Dollansky To: Mario Lobo Cc: freebsd-questions@freebsd.org Subject: Re: Centralizing /usr/src compilation Message-ID: <20161003142516.7bc18920@X220.alogt.com> In-Reply-To: <20161002202006.1ff18a15@Papi> References: <20161001104224.6f276332@Papi> <20161002211312.5d04c13d@X220.alogt.com> <20161002202006.1ff18a15@Papi> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Authenticated-Sender: sl-508-2.slc.westdc.net: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 06:25:31 -0000 Hi, On Sun, 2 Oct 2016 20:20:06 -0300 Mario Lobo wrote: > On Sun, 2 Oct 2016 21:13:12 +0800 > Erich Dollansky wrote: > > > On Sat, 1 Oct 2016 10:42:24 -0300 > > Mario Lobo wrote: > > > > > I hava a src master server (10.3.51.50) where I compile src and > > > kernel. No CPUTYPE or compiler flags are set. On it, I issued > > > make buildworld and make buildkernel that proceed with no errors. > > > I shared its /usr/src and /usr/obj via nfs. > > > > > > Then, on a slave server, same version and arch as the master, it > > > has this: > > > > > do both machines have the same CPU? As you did not specify the CPU, > > the CPU in the server was used as the target. If you have different > > CPUs but want to use one kernel for all, it might will work if you > > specify the type of CPU with the least capabilities you have or you > > compile on that machine. > > > > Erich > > > > > 2>Illegal instruction (core dumped) Illegal instruction (core > > > 2>dumped) > > > > Illegal instruction sounds like the target CPU does not know an > > instruction. Of course, this could also be caused by something else. > > > > > even bury my idea for good as non workable? > > > > It should work when you set the CPU type. > > > > I also run a kernel compiled for an older Intel CPU on a newer Intel > > CPU without problems. I never tried it the other way around. > > > > Erich > > Hi Erich. Thanks for replying! > > Actually, the "slave" server is a guest VM hosted on the "master" > server. this is then completely different. I do not know how virtualisation works on FreeBSD and what a guest sees inside the virtual machine. Have a very simple try. Compile FreeBSD inside the virtual machine and check if you can distribute the binaries from one virtual machine to another one. I would use jails except in very strange situations when host and guest are both running FreeBSD. > > Like I said, the slave has the same FBSD version and arch (AMD64) as > the "master". (I know ... the jail argument, but I still didn't > master it enough to fell confident for production). > > I did not specify any CPUTYPE because I assumed that if I didn't, it > would compile for a GENERIC CPU, although I thought that through > VT-x/AMD-V, the guests sees the same CPU as the host. I do not know much about GENERIC as I hardly use it. > > Which CPUTYPE should I set? I ask because there are other physical > machines on the LAN with slightly different CPUs in which I want this > to work also. Just set none as the compiler uses then the type of CPU it is running on. Erich