From nobody Thu Jan 25 17:49:56 2024 X-Original-To: freebsd-current@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 4TLSyj525Kz57jJK for ; Thu, 25 Jan 2024 17:50:05 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (pdx.rh.CN85.dnsmgr.net [65.75.216.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLSyj1J8Sz43mM; Thu, 25 Jan 2024 17:50:05 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Authentication-Results: mx1.freebsd.org; none Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 40PHnuQD002569; Thu, 25 Jan 2024 09:49:56 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 40PHnu4E002568; Thu, 25 Jan 2024 09:49:56 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202401251749.40PHnu4E002568@gndrsh.dnsmgr.net> Subject: Re: Removing fdisk and bsdlabel (legacy partition tools) In-Reply-To: To: Warner Losh Date: Thu, 25 Jan 2024 09:49:56 -0800 (PST) CC: Ed Maste , "Rodney W. Grimes" , FreeBSD Current X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4TLSyj1J8Sz43mM X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:10494, ipnet:65.75.216.0/23, country:US] > On Thu, Jan 25, 2024, 9:11?AM Ed Maste wrote: > > > On Thu, 25 Jan 2024 at 11:00, Rodney W. Grimes > > wrote: > > > > > > > These will need to be addressed before actually removing any of these > > > > binaries, of course. > > > > > > You seem to have missed /rescue. Now think about that long > > > and hard, these tools classified as so important that they > > > are part of /rescue. Again I can not stress enough how often > > > I turn to these tools in a repair mode situation. > > > > I haven't missed rescue, it is included in the work in progress I > > mentioned. Note that rescue has included gpart since 2007. > > > > What can fdisk and/or disklabel repair that gpart can't? As far as I know there is no way in gpart to get to the MBR cyl/hd/sec values, you can only get to the LBA start and end values: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 8388513 (4095 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 15/ sector 63 gpart show ada0 => 63 8388545 ada0 MBR (4.0G) 63 8388513 1 freebsd [active] (4.0G) 8388576 32 - free - (16K) Now I have learned that gpart backup/restore CAN get me at least basic bsdlabel -e function, but again it has no access to all the stuff stored that showsup with bsdlabel -A. Which this is now the third time I have asked "how do I do bsdlabel -A -e with gpart"? One person at least answered that with: gpart backup GEOM >backup vi backup gpart restore GEOM Now I just have to rewrite my bsdlabel GEOM >backup files to be be gpart GEOM >backup files (I have precanned sets of bsdlabel files I use to do bsdlabel -w GEOM with. > Warner -- Rod Grimes rgrimes@freebsd.org