From owner-freebsd-questions@freebsd.org Thu Mar 22 13:28:23 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA762F6720D for ; Thu, 22 Mar 2018 13:28:22 +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 6AA4374657 for ; Thu, 22 Mar 2018 13:28:22 +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 w2MDSFe7017398 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 22 Mar 2018 07:28:15 -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 w2MDSEBC017395; Thu, 22 Mar 2018 07:28:15 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 22 Mar 2018 07:28:14 -0600 (MDT) From: Warren Block To: Victor Sudakov cc: freebsd-questions@freebsd.org Subject: Re: Solved. Re: Dualboot and ZFS In-Reply-To: <20180322012621.GA15678@admin.sibptus.transneft.ru> Message-ID: References: <20180115144747.GA65526@admin.sibptus.transneft.ru> <20180115151526.GA66342@admin.sibptus.transneft.ru> <20180116034929.GB89443@admin.sibptus.transneft.ru> <20180131082738.GA46395@admin.sibptus.transneft.ru> <547e65d16ef16667f61d88463ca73079@roundcube.fjl.org.uk> <20180319025914.GA57490@admin.sibptus.transneft.ru> <20180322012621.GA15678@admin.sibptus.transneft.ru> User-Agent: Alpine 2.21 (BSF 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (wonkity.com [127.0.0.1]); Thu, 22 Mar 2018 07:28:15 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 13:28:23 -0000 On Thu, 22 Mar 2018, Victor Sudakov wrote: > Warren Block wrote: >> On Mon, 19 Mar 2018, Victor Sudakov wrote: >>> >>> sysctl kern.geom.debugflags=0x10 >> >> Please reconsider doing this without it being required. It means "allow >> destroying mounted partitions" and is usually not necessary. > > It is recommended, or even required ("must") by the zfsboot(8) man page: The vagueness here is from the "If the drive is currently in use". It could easily be replaced with "If the user wants to destroy data from a drive that is currently being used". I would argue that we should remove or rewrite that, as it is misleading. Overwriting a drive that is "in use" is generally exactly the opposite of what people want. > EXAMPLES > zfsboot is typically installed using dd(1). To install zfsboot on the > ada0 drive: > > dd if=/boot/zfsboot of=/dev/ada0 count=1 > dd if=/boot/zfsboot of=/dev/ada0 iseek=1 oseek=1024 > > If the drive is currently in use, the GEOM safety will prevent writes and > must be disabled before running the above commands: > > sysctl kern.geom.debugflags=0x10 > > zfsboot can also be installed in an MBR slice: > > gpart create -s mbr ada0 > gpart add -t freebsd ada0 > gpart create -s BSD ada0s1 > gpart bootcode -b /boot/boot0 ada0 > gpart set -a active -i 1 ada0 > dd if=/boot/zfsboot of=/dev/ada0s1 count=1 > dd if=/boot/zfsboot of=/dev/ada0s1 iseek=1 oseek=1024 > > > >