From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 13 09:27:10 2015 Return-Path: Delivered-To: freebsd-hackers@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 440ABAB3 for ; Sat, 13 Jun 2015 09:27:10 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (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 CCA40315 for ; Sat, 13 Jun 2015 09:27:09 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by wibdq8 with SMTP id dq8so34681081wib.1 for ; Sat, 13 Jun 2015 02:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=jBm5Q6KpGxDYvpD7Q7vYqNQmbqGDluVZ86N4b4zrvwo=; b=lkxIHgFxfjRu38hL+vbjbE4Z8YocLavMDYWAwt7BMpaydCqnHePx76bbOI+NHg6oAW 1jtWqHsET7B8tDy2CS7f9GBhEPMnBp9fAJTEV/b5qeFzw2zxcMg8T58kzIgv8HCdyOEY oQa1J8swjRgF6WAeWxhwWDeHFRCqyH//d27Prp1B5Z4UbazBIljmVE3NYLK0xZDWM9+6 cwH9rcgwfA6VTeIWBWNSElHWQ9RVmgUmRFp5V9YLszCUsPaAa9Dmt9fcLaY2ULBNxJ1C ucdF45cxvL2r82XJ3wAT0fmREPhygufw4FNc+CXt8jQVNbpoHm0FjEnW4Kx7gai5rZ0W EYlQ== X-Received: by 10.180.73.10 with SMTP id h10mr13931654wiv.21.1434187628080; Sat, 13 Jun 2015 02:27:08 -0700 (PDT) Received: from brick.home (eug18.neoplus.adsl.tpnet.pl. [83.20.178.18]) by mx.google.com with ESMTPSA id pf4sm9533314wjb.23.2015.06.13.02.27.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2015 02:27:06 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 13 Jun 2015 11:27:04 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Dirk-Willem van Gulik Cc: freebsd-hackers@freebsd.org Subject: Re: pivot_root() and FreeBSD Message-ID: <20150613092704.GA37870@brick.home> Mail-Followup-To: Dirk-Willem van Gulik , freebsd-hackers@freebsd.org References: <654E1C53-8536-406D-B218-EA6F20848821@webweaving.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <654E1C53-8536-406D-B218-EA6F20848821@webweaving.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 09:27:10 -0000 On 0303T1751, Dirk-Willem van Gulik wrote: > I am trying to do, in effect an PXE boot/install on a local volume - and would like the machine to cut over into normal running without a reboot*. > > So effectively I would like to do the equivalent of pivot_root() and perhaps something special for init(8), and then jettison md, nfs and what not. > > Is there any way to do this on 10.1 or -current ? Or has anyone recently done work on Adrian Steinmann his 'Pivot Root for BSD’** ? I have something similar in purpose in the works: https://reviews.freebsd.org/D2698 Perhaps you could take a look to see if it fits your use case? The code needs a rewrite, but the usage should stay the same.