From owner-freebsd-questions@FreeBSD.ORG Thu Feb 12 23:06:02 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 A9BBF642 for ; Thu, 12 Feb 2015 23:06:02 +0000 (UTC) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74964AF5 for ; Thu, 12 Feb 2015 23:06:01 +0000 (UTC) Received: by ierx19 with SMTP id x19so15763795ier.3 for ; Thu, 12 Feb 2015 15:05:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=P6yNQTu9U+fePDQz3qfYDl5CgQE3NRDnMtP0myOfsPk=; b=kPQZTbccJ7lxxg2U9Ttw7g+lkH3cUlvSkaPI7OohDdq6KokzDSfBPHqDQqzpTsLzIO +1Nd31nrsI+Fmy0qT15AHt5YIEIuHn37U/9SxsJTBIwrvkLwlqMk7tZYMvIJaI6Z7XqO 1KvDz/Nmb8aO+NhxMoLDzOiSvfOeN0qvyhfOCWhsjERwMofbXFnp7KsjY3fP7EmXaMu4 fKyv3LkLzPooZzUGA/kVnUgWGI2G+TRHBYbQUiLkjdxV8Smn1PNpQr25HRH9N8NMZQwE vDXl4b2o9N3oNuWGhPHlGbdpgq7tCYaqiCX6U9KstLm4a05WwbdE51v+YyjbW7i7A7Wi yHCw== MIME-Version: 1.0 X-Received: by 10.50.80.12 with SMTP id n12mr944451igx.29.1423782355635; Thu, 12 Feb 2015 15:05:55 -0800 (PST) Sender: vrwmiller@gmail.com Received: by 10.64.225.82 with HTTP; Thu, 12 Feb 2015 15:05:55 -0800 (PST) In-Reply-To: References: Date: Thu, 12 Feb 2015 18:05:55 -0500 X-Google-Sender-Auth: xX7m5qL0QRDiRLPBR1Lawnwr_uc Message-ID: Subject: Re: Automatic Installation From: Rick Miller To: Felipe Agnelli Barbosa Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 23:06:02 -0000 On Thu, Feb 12, 2015 at 12:46 PM, Felipe Agnelli Barbosa wrote: > Hi guys, > > I'm finding a way to automate the installation from the FreeBSD server, > with PXE. > I saw some examples like with PXE/TFTP, dhcp, nfs and sysinstall, another > examples with Cobbler(but until version 9.0[0]). > > So, what i would to know is your experience about it and what you guys > think the best way to automate the process of installation from FreeBSD. > Maybe I will join the Puppet or Chef in that process. At a high level, there's no difference between a PXE auto install between 8.x and 10.x. DHCP, TFTP, and network accessible media are all that are needed. The differences are in the low level implementations and tools. A FreeBSD PXE Workflow diagram[1] (see references) illustrates the overall flow. The diagram specifically refers to an 8.x implementation, but also applies to 10.x just with different tools. I've implemented this with, both, FreeBSD 8.x and 10.x, but skipped 9.x for various reasons. My blog[2] has a number of posts[3] related to auto installing FreeBSD that are written specifically for 8.x, but some of the content is still relevant for 10.x. Time has been the biggest reason nothing has been posted about my experiences with 10.x. Cobbler was the platform used and, IIRC, the only real change necessary for 10.x was to update the distro signatures. The patch was not submitted back due to time pressure and the implementation was sub-optimal. Time pressure has also prevented retrofitting. 8.x was implemented using a customized bootonly ISO to fire up an automated sysinstall, but 10.x introduced bsdinstall and a bug[4] that prevented the bootonly ISO from working. So, the 10.x implementation used a customized mfsBSD[5] image implementing automated bsdinstall. The installerconfig implemented here is custom and written in such a manner that it bypasses bsdinstall's main functions, but this is not required. It was implemented this way to leverage features of Cobbler that enabled more dynamic control of installations via Cobbler. The bsdinstall man page[6] covers scripting an install. Cobbler provides management of DHCP and hosts the iPXE, mfsBSD, and installation media. iPXE is transferred via TFTP and retrieves mfsBSD over HTTP which, in turn, runs bsdinstall and installs a binary distribution fetched via HTTP from Cobbler. The DHCP server responds with a filename for the client to download. [1] http://hostileadmin.com/images/FreeBSD_PXE_Install_Workflow.gif [2] http://blog.hostileadmin.com/ [3] http://blog.hostileadmin.com/?s=cobbler [4] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190939 [5] http://mfsbsd.vx.sk [6] https://www.freebsd.org/cgi/man.cgi?query=bsdinstall HTH -- Take care Rick Miller