From nobody Thu Jan 25 09:57:57 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 4TLGV334WGz58CPm for ; Thu, 25 Jan 2024 09:58:03 +0000 (UTC) (envelope-from SRS0=/AfJ=JD=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLGV30wGRz4HBG; Thu, 25 Jan 2024 09:58:02 +0000 (UTC) (envelope-from SRS0=/AfJ=JD=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 54800D78A8; Thu, 25 Jan 2024 10:58:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quip.cz; s=private; t=1706176680; bh=M622S6m7LFKPiNjp8EBSIxEc5JtCEQvL2vUGvQg0z80=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=ioGb7XblzZHkTcYKqS0UjciItEa5o1stACg/IiNePYBN4Y8fTqPGdHqfFKfL//9nl cn2T3E+odavFFP1/f8g3ZM+jeeymQQ8xciDwafM19JLbE7Syco5J2OJHkEkeFVa4ug 2UDXLumI6kHMvtNhNP4Dpg9Oj9AOACRZxBSLq2Eo= Received: from [192.168.145.49] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id E84B6D7899; Thu, 25 Jan 2024 10:57:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quip.cz; s=private; t=1706176679; bh=M622S6m7LFKPiNjp8EBSIxEc5JtCEQvL2vUGvQg0z80=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=aKDgnr2qVg8oXhDH0GE5BTHgusqHEbLrD89EO6F2Tnc0yTYOvKhw/8bwtm6iB1zyN Cju924vWfLAaod0EU58ZtOdU9XC4zITwCwp08rHxGwWK6z+lzgB7EuteGt0mn/NvCK LpT1lpDdFl4V/ssuDgQeaz5/HeeaxCeSWL+ZGPpk= Message-ID: <84c6f3b1-58b3-44f8-aeaf-35f78e05975d@quip.cz> Date: 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 User-Agent: Mozilla Thunderbird Subject: Re: Removing fdisk and bsdlabel (legacy partition tools) Content-Language: en-US To: Cy Schubert , Warner Losh Cc: "Rodney W. Grimes" , George Michaelson , Ed Maste , FreeBSD Current References: <202401242347.40ONlWKZ099356@gndrsh.dnsmgr.net> <20240125050736.A11871AC@slippy.cwsent.com> <20240125055019.CCF1973@slippy.cwsent.com> From: Miroslav Lachman <000.fbsd@quip.cz> In-Reply-To: <20240125055019.CCF1973@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4TLGV30wGRz4HBG 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:42000, ipnet:94.124.104.0/21, country:CZ] On 25/01/2024 06:50, Cy Schubert wrote: > In message > >> 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 > 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. Kind regards Miroslav Lachman