From nobody Thu Jan 25 10:13:08 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 4TLGqW5PWdz58DbG for ; Thu, 25 Jan 2024 10:13:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLGqW4nKqz4MvB; Thu, 25 Jan 2024 10:13:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id Sv5fr0ak4GAIJSwjPryIDb; Thu, 25 Jan 2024 10:13:11 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id SwjNrnAYywbmvSwjOrufsb; Thu, 25 Jan 2024 10:13:11 +0000 X-Authority-Analysis: v=2.4 cv=O6wqATxW c=1 sm=1 tr=0 ts=65b23437 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=ozEGpfOSB-jdFw0aaS0A:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id D50B0346; Thu, 25 Jan 2024 02:13:08 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 92E931A6; Thu, 25 Jan 2024 02:13:08 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Miroslav Lachman <000.fbsd@quip.cz> cc: Cy Schubert , Warner Losh , "Rodney W. Grimes" , George Michaelson , Ed Maste , FreeBSD Current Subject: Re: Removing fdisk and bsdlabel (legacy partition tools) In-reply-to: <84c6f3b1-58b3-44f8-aeaf-35f78e05975d@quip.cz> References: <202401242347.40ONlWKZ099356@gndrsh.dnsmgr.net> <20240125050736.A11871AC@slippy.cwsent.com> <20240125055019.CCF1973@slippy.cwsent.com> <84c6f3b1-58b3-44f8-aeaf-35f78e05975d@quip.cz> Comments: In-reply-to Miroslav Lachman <000.fbsd@quip.cz> message dated "Thu, 25 Jan 2024 10:57:57 +0100." 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-Type: text/plain; charset=us-ascii Date: Thu, 25 Jan 2024 02:13:08 -0800 Message-Id: <20240125101308.92E931A6@slippy.cwsent.com> X-CMAE-Envelope: MS4xfC8whGAaPK+SWYox7Fu3lExTT+BoTIlAdyU1INF300rvCbRFfomHd3XOBCbhQitkuNcHJkS1JqFKXv0Qh68t6uuCapmIC0uYMKJw475/J6OcN2ryIeY2 h/AuqLXr3SiCuC1sEJv/yK6eFRfqDIxfOv4X4il1CMykApRZeFAtPBpreqg+ZgAIC+WmZ6fy18ffpuShyObU69l9AhzFRnxWkF4wFRuvrnEkImtsS8gX0Q9F fhvTN5tV8j6T7sNKtk2auatdcCSrgDuXqQhlPcn8LD1EZEIGxqk6+gu+1BDLL2uxOEFkypzmemsXHnkYoXSRZX412SGpNf81m7GU//rwe5UQEVDMTJ5JwB/D 0i617QS9 X-Rspamd-Queue-Id: 4TLGqW4nKqz4MvB 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:16509, ipnet:3.96.0.0/15, country:US] In message <84c6f3b1-58b3-44f8-aeaf-35f78e05975d@quip.cz>, Miroslav Lachman wri tes: > On 25/01/2024 06:50, Cy Schubert wrote: > > In message c > > > >> > >> What can they do that gpart can't do? > > > > This was quite a while ago, booted off my recovery USB attempting to repair > > some self caused damage. The ability to edit (vi) a file with starting > > addresses and lengths, visually using bsdlabel, was suited to my panicked > > state as I worked to recover the machine. > > > > A visual view of columns of a bsdlabel, editing a label using vi, checking > > and double checking numbers before committing them is handy.The visual > > format and the ability to adjust the numbers in an editor before committing > > them is handy. You can't do this with gpart, as it's transactional. And > > bsdinstall doesn't give one the opportunity to check the numbers in detail > > on a console before committing them. > > If you really like your editor of choice to edit partition table, you > can use gpart backup and gpart restore like this: > > gpart backup ada0 > ada0.part > vi ada0.part > gpart restore -F -l < ada0.part That would work. > > > Maybe a good GSoC project may be to replace bsdlabel's driect writes to > > disk with geom calls. Though, t doesn't need to be bsdlabel, but some kind > > of utility that displays the existing label in an editor session where > > changes can be made, using the editor, and committed. This could even be an > > enhancement to bsdinstall: call it expert mode or whatever. > > Manipulating partition table in editor session can be achieved by few > lines of shell script as a wrapper around gpart backup & gpart restore. Or just build a gpart edit mode with the functions used to implement backup and restore. Excellent idea. Thank you. A small project to work on. > > Kind regards > Miroslav Lachman -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0