Date: Fri, 7 Oct 2011 12:15:29 -0700 From: Garrett Cooper <yanegomi@gmail.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Warren Block <wblock@wonkity.com>, freebsd-current@freebsd.org, Benjamin Kaduk <kaduk@mit.edu>, Arnaud Lacombe <lacombar@gmail.com> Subject: Re: aliasing (or renaming) kern.geom.debugflags Message-ID: <CAGH67wQk0jR%2Buk0oFO7Ye001vd-0UgcY-bf%2B84a8=9WtLHg%2B1Q@mail.gmail.com> In-Reply-To: <81391.1318014232@critter.freebsd.dk> References: <alpine.BSF.2.00.1110071236270.2450@wonkity.com> <81391.1318014232@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 7, 2011 at 12:03 PM, Poul-Henning Kamp <phk@phk.freebsd.dk> wro= te: > In message <alpine.BSF.2.00.1110071236270.2450@wonkity.com>, Warren Block= write > s: > >>>>> Which is the exactly right question to ask. >>>>> >>>>> The procedure documented is clearly flawed. >>>> >> >>Well, yes. =A0The goal is to unprotect the device, regardless of what may >>already be on it. =A0Then the user can overwrite it with the memory stick >>image. > > Unprotect from what ? =A0from being already mounted ? > > If you cannot open a geom provider for writing, then it is because > some piece of code in the kernel thinks it already owns the device > and don't want you to muck about with it. > > Overriding this check is just asking for panics... > > > What I usually do in cases like this is: > > =A0 =A0 =A0 =A0(umount /dev/${whatever} || true) > /dev/null 2>&1 > > And if that isn't enough, or not possible, then the user needs > to undo whatever he did to the device... My guess is that GEOM isn't letting go of the GPT table and you have multiple partitions in the GPT table and you're not destroying them hierarchically in a proper manner.. but again, that's just a guess based on hazy recollection. -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wQk0jR%2Buk0oFO7Ye001vd-0UgcY-bf%2B84a8=9WtLHg%2B1Q>