Re: aliasing (or renaming) kern.geom.debugflags

From: Benjamin Kaduk <kaduk_at_MIT.EDU>
Date: Fri, 7 Oct 2011 14:54:37 -0400 (EDT)
On Fri, 7 Oct 2011, Warren Block wrote:

> On Fri, 7 Oct 2011, Arnaud Lacombe wrote:
>
>> Hi,
>> 
>> On Fri, Oct 7, 2011 at 2:13 PM, Warren Block <wblock_at_wonkity.com> wrote:
>>> On Fri, 7 Oct 2011, Poul-Henning Kamp wrote:
>>> 
>>>> In message <alpine.GSO.1.10.1110071341430.882_at_multics.mit.edu>, 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

I presume that Poul-Henning was not claiming that the documentation did 
not match the functional procedure, but rather that the procedure needed 
to achieve the goal (of a functional USB stick) is flawed.  (Even if it is 
correctly documented.)

-Ben
Received on Fri Oct 07 2011 - 16:54:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:18 UTC