From owner-freebsd-current@FreeBSD.ORG Fri Oct 7 18:53:23 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83240106566B for ; Fri, 7 Oct 2011 18:53:23 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 3E6CD8FC08 for ; Fri, 7 Oct 2011 18:53:22 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id p97IrMFM002773; Fri, 7 Oct 2011 12:53:22 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id p97IrMWJ002770; Fri, 7 Oct 2011 12:53:22 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 7 Oct 2011 12:53:22 -0600 (MDT) From: Warren Block To: Arnaud Lacombe In-Reply-To: Message-ID: References: <80750.1318010551@critter.freebsd.dk> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Fri, 07 Oct 2011 12:53:22 -0600 (MDT) Cc: Poul-Henning Kamp , freebsd-current@freebsd.org, Benjamin Kaduk Subject: Re: aliasing (or renaming) kern.geom.debugflags X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2011 18:53:23 -0000 On Fri, 7 Oct 2011, Arnaud Lacombe wrote: > Hi, > > On Fri, Oct 7, 2011 at 2:13 PM, Warren Block wrote: >> On Fri, 7 Oct 2011, Poul-Henning Kamp wrote: >> >>> In message , Benjamin >>> Kaduk >>> writes: >>> >>>> Now, an ordinary user who is >>>> doing this for the first time might ask, "why do I need to do something >>>> with 'debugflags' in order to make a USB stick? >>> >>> Which is the exactly right question to ask. >>> >>> The procedure documented is clearly flawed. >> >> Probably a misunderstanding on my part, since I suggested it to Glen. Can't >> recall the circumstances exactly. >> >> The next question would be: what is the correct procedure? >> > I'd guess the procedure involves shooting your feet: > > from `sys/geom/geom_subr.c': > > /* If foot-shooting is enabled, any open on rank#1 is OK */ > if ((g_debugflags & 16) && pp->geom->rank == 1) > ; Well, yes. The goal is to unprotect the device, regardless of what may already be on it. Then the user can overwrite it with the memory stick image. The current documentation is sysctl kern.geom.debugflags=16 dd if=memstick.img of=/dev/whatever0 bs=64k