From owner-freebsd-questions@freebsd.org Sun Aug 21 01:00:16 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 D2DA0BB92E2 for ; Sun, 21 Aug 2016 01:00:16 +0000 (UTC) (envelope-from rcarter@pinyon.org) Received: from h2.pinyon.org (h2.pinyon.org [65.101.5.250]) (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 CF8F61612 for ; Sun, 21 Aug 2016 01:00:15 +0000 (UTC) (envelope-from rcarter@pinyon.org) Received: by h2.pinyon.org (Postfix, from userid 58) id 1E8A134E21; Sat, 20 Aug 2016 18:00:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pinyon.org; s=DKIM; t=1471741214; bh=hDsfZTTRabCZs3cUpT/aiJgIN7D1SyuwRcxBvXIYnKU=; h=Subject:To:References:From:Date:In-Reply-To; b=elfKgVD3ZNwwd6rJNC9AhPiNVObRlCY3/OJQ2GAqqiiEvVUcY+thBTggFIBy7x3h7 kSlQ1MsRLIMqhi7kwtptbeFD0IhW+L4dyCxNdzzhSXkd5J+IaPInUkzzoNBFKZSd6x E4By/aFp+RXxdVz5WBHMBKWtNIJ4A2UssIul0LTs= X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on h2.pinyon.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.1 Received: from [10.0.10.15] (h4.esturion.net [65.101.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by h2.pinyon.org (Postfix) with ESMTPSA id 434EF34E16 for ; Sat, 20 Aug 2016 18:00:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pinyon.org; s=DKIM; t=1471741213; bh=hDsfZTTRabCZs3cUpT/aiJgIN7D1SyuwRcxBvXIYnKU=; h=Subject:To:References:From:Date:In-Reply-To; b=qcXcOtHXT4teELlU5CuWewn7EqUV9jEieMBbshQ9nK53C+XWuJtgw5jEnqm4XXwaV iX77As16FRA532Yof6X34Jm+WSySqVbiZEWtqKLBjT14ZtAGGpFupVoyU0z0a1upHJ 3PjlwAoH6gp8D05KtTBXwUf9EHHoHKu3b7ONDppA= Subject: Re: erm shot my foot off with zfs, q on rescue To: freebsd-questions@freebsd.org References: <614e5532-b929-1e68-aa86-2e75b157565a@gmail.com> From: "Russell L. Carter" Message-ID: <893652a5-f4e6-4d81-d940-7ee5760bf29a@pinyon.org> Date: Sat, 20 Aug 2016 18:00:12 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2016 01:00:16 -0000 On 08/20/16 17:26, Ben Woods wrote: > On Sunday, 21 August 2016, Shamim Shahriar > wrote: > >> On 21/08/2016 00:44, Russell L. Carter wrote: >>> >>> Hi, >>> >>> So I misfired and hosed my 10/stable zfs / mounts by running >>> >>> zfs set mountpoint=/ zroot/zetc >>> >>> so that now I don't seem to actually have any of the uh mandatory >>> system directories visible. (turns red) >>> >>> No emergency thankfully, I've got three border gateways and just got >>> all three happily configured so if I had to I could just reinstall >>> this poor innocent one that I accidentally shot in the face. >>> >>> But as it happens I pulled it and have it interfaced with a keyboard >>> and monitor and have booted a USB 10.3 stable install image. I >>> dropped into the shell, and ran zfs list and it comes up with nothing. >> I'm not sure it is supposed to -- your boot disc has no knowledge of >> available pools or the zfs available. The better way of doing it, if I >> understand right as to what you are trying to do, would be to run >> >> zpool import >> >> that will show you available zpools. >> >> Then you can import the pool using >> >> zpool import >> >> you can even set different mountpoints etc., the export it, and then fix >> the mountpoints as to where they are supposed to be. >> >> Hope this helps. >> Regards >> > > I normally get zpool to temporarily mount the datasets in the /mnt > directory when I have booted from a USB disk image, so that it doesn't > overwrite the root for the currently running system. This doesn't affect > the mountpoint for future boots, and still lets you set the mountpoint > parameter for future boots. > > You use: > # zpool import -R /mnt myzpool > > More details here: > http://man.freebsd.org/zpool That worked, and a zfs destroy -f zroot/zetc did the job. Many thanks, Russell > Regards, > Ben > >