From owner-svn-src-head@freebsd.org Mon May 25 07:18:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E0AD2F65DB; Mon, 25 May 2020 07:18:48 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49VpNm39Rbz4TZs; Mon, 25 May 2020 07:18:48 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68008E7CD; Mon, 25 May 2020 07:18:48 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04P7ImAT037852; Mon, 25 May 2020 07:18:48 GMT (envelope-from murray@FreeBSD.org) Received: (from murray@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04P7Imkg037851; Mon, 25 May 2020 07:18:48 GMT (envelope-from murray@FreeBSD.org) Message-Id: <202005250718.04P7Imkg037851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: murray set sender to murray@FreeBSD.org using -f From: Murray Stokely Date: Mon, 25 May 2020 07:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361443 - head/usr.sbin/fdformat X-SVN-Group: head X-SVN-Commit-Author: murray X-SVN-Commit-Paths: head/usr.sbin/fdformat X-SVN-Commit-Revision: 361443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2020 07:18:48 -0000 Author: murray (doc committer) Date: Mon May 25 07:18:47 2020 New Revision: 361443 URL: https://svnweb.freebsd.org/changeset/base/361443 Log: Add example usage for formatting a floppy disk. Adding a more self contained example here in the fdformat man page will allow us to modernize and streamline the FreeBSD Handbook by cutting out some of this legacy material. While here, address some other minor grammatical nits in this man page. Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24971 Modified: head/usr.sbin/fdformat/fdformat.8 Modified: head/usr.sbin/fdformat/fdformat.8 ============================================================================== --- head/usr.sbin/fdformat/fdformat.8 Mon May 25 06:25:31 2020 (r361442) +++ head/usr.sbin/fdformat/fdformat.8 Mon May 25 07:18:47 2020 (r361443) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2017 +.Dd May 23, 2020 .Dt FDFORMAT 8 .Os .Sh NAME @@ -46,12 +46,12 @@ where .Ar device may either be given as a full path name of a device node for a floppy disk drive -(e.g.\& +(e.g.,\& .Pa /dev/fd0 ) , or using an abbreviated name that will be looked up under .Pa /dev -(e.g.\& +(e.g.,\& .Dq Li fd0 ) . .Pp The options are as follows: @@ -133,6 +133,30 @@ Exit status 1 is returned on any errors during floppy formatting, and an exit status of 2 reflects invalid arguments given to the program (along with an appropriate information written to diagnostic output). +.Sh EXAMPLES +To format a new double-sided, high-density (HD) 1.44 MB disk +inserted in the first floppy disk drive, issue: +.Pp +.Dl "/usr/sbin/fdformat -f 1440 /dev/fd0" +.Pp +After low-level formatting the disk with +.Nm , +create a disk label so that the system can determine the size and +geometry of the disk. +The supported geometry values are listed in +.Pa /etc/disktab , +and we will use +.Va fd1440 +for this example. +To write the disk label, use +.Xr bsdlabel 8 : +.Pp +.Dl "/sbin/bsdlabel -B -w /dev/fd0 fd1440" +.Pp +The floppy is now ready to be high-level formatted with a file system. +To format the floppy disk with FAT, issue: +.Pp +.Dl "/sbin/newfs_msdos /dev/fd0" .Sh DIAGNOSTICS Unless .Fl q @@ -150,6 +174,7 @@ exact cause of the error) will be printed for up to 10 entire formatting process has completed. .Sh SEE ALSO .Xr fdc 4 , +.Xr bsdlabel 8 , .Xr fdcontrol 8 , .Xr newfs 8 , .Xr newfs_msdos 8