From nobody Tue May 23 15:23:14 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QQdPP5239z4Cbqh for ; Tue, 23 May 2023 15:23:21 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QQdPP2YwDz4HBT for ; Tue, 23 May 2023 15:23:21 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; none Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.17.1/8.17.1) with ESMTPS id 34NFNF2N036884 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 23 May 2023 08:23:15 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.17.1/8.17.1/Submit) id 34NFNEJ4036883; Tue, 23 May 2023 08:23:14 -0700 (PDT) (envelope-from sgk) Date: Tue, 23 May 2023 08:23:14 -0700 From: Steve Kargl To: "Julian H. Stacey" Cc: Warner Losh , FreeBSD Hackers Subject: Re: gpart destroy efi partition? Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: <202305231055.34NAtLsE047127@dell.no.berklix.net> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202305231055.34NAtLsE047127@dell.no.berklix.net> X-Rspamd-Queue-Id: 4QQdPP2YwDz4HBT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 23, 2023 at 12:55:21PM +0200, Julian H. Stacey wrote: > Steve Kargl wrote: > > I did find > > > > % sysctl -a | grep da01 > > kern.geom.disk.da0.flags: 1a8 > > > > So, I suppose the question is how to clear WRITEPROTECT. > > I dont use efi & gpart but some ideas: > > Why da01 not da0 ? What is da01 ? > a typo, or pulling in some gpart kernel stuff ? > Yes, a typo. I used da0. > Is an escalated security level catching you ? I stick to default, > on 12.4-rel multi user thats: sysctl -a | grep level # kern.securelevel: -1 securelevel is -1. > Try a fresh reboot, even staying single user, > & before you touch it with any gpart invoking command, > whack it with multiple dd if=/dev/zero of=/dev/zero count=5000 > > (multiple as sometimes Ive seen first attempt doesnt seem to clear > my sticks, a 2nd reboot after dd will clear any false cached memories) > > If that doesnt work: > Try an older BSD that does know about EFI & gpart ? > Put it a Microsoft PC, or a USB to Go adapter on an android, > that probbly will complain unknown & offer to bash it back to MBR ? > Rumage around or ask friends, eg I have a tiny old match box size thing > that clones sticks. Clone your stick from some other small stick, > then repair the wrong sized MBR Thanks for the suggestions. I spent sometime on a Windows 10 system trying yo convince windows to format/destory/read/write do whatever to the memstick. FreeBSD tools are so much easier to use! From what Warner has written, I think I'll write off this memstick. It was the right size for what I needed to do, but it's now past diminishing returns to play with some more. -- Steve