From owner-freebsd-questions@FreeBSD.ORG Tue Jul 1 12:07:15 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3631B37B401 for ; Tue, 1 Jul 2003 12:07:15 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A03843FF7 for ; Tue, 1 Jul 2003 12:07:13 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h61J72LA031265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Jul 2003 20:07:08 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h61J72Ux031260; Tue, 1 Jul 2003 20:07:02 +0100 (BST) (envelope-from matthew) Date: Tue, 1 Jul 2003 20:07:02 +0100 From: Matthew Seaman To: Robert Gallimore Message-ID: <20030701190702.GA30826@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Robert Gallimore , questions@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-11.4 required=5.0 tests=AWL,BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: questions@freebsd.org Subject: Re: mounting a floppy X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 19:07:15 -0000 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 01, 2003 at 01:25:17PM -0500, Robert Gallimore wrote: > I am having a slight problem with FreeBSD 4.8. I cannot seem to mount a= =20 > floppy drive. I tried "mount /dev/fd0" but it comes back saying something= =20 > like an unrecognized file system or device. How do I mount my floppy driv= e=20 > in FreeBSD 4.8? Thanks! If this is a DOS format floppy, then here's a tip: don't bother trying to mount and unmount the floppy all the time. Instead, install the emulators/mtools port. This gives you a whole bunch of MS-DOS style commands, except with an 'm' prepended to the name, which let you access the floppy drive but without having to mount it first. Eg. you can do: % mdir a: If you are using a non-DOS floppy or you really need to mount the floppy for some other reason, then you're going to have to tell mount(8) all of the information it needs. There's two ways to do that: either on the mount(8) command line, or by making an entry in /etc/fstab. Eg. to mount a read-only floppy with a msdos filesystem on it as /mnt: # mount -t msdos -o ro /dev/fd0 /mnt Note that: a) you usually have to have superuser privilege to run mount(8) or umount(8). You can either install the sudo(8) port and generate the appropriate configuration there, or you can set the vfs.usermount sysctl to a non-zero value. See mount(2), sysctl(8) for details, but note that setting vfs.usermount potentially opens up a nasty security hole, so you should understand exactly what you are doing if you decide to do that. b) You have to remember to unmount the floppy before you eject it from the drive. Not doing that has undesirable effects. Similarly, if the floppy has the write protect tab set, you have to tell the system to mount it read-only. Unfortunately, the system can't actually detect that the disk is write protected automatically. Even worse, if you mount a unix format RO floppy using RW flags, even if you do nothing more than read files from the disk, the system will hang when you try and unmount the disk because the system will try and update the 'last mounted on' entry on the disk. (Solution is to pop the floppy out, toggle the write protect tab and put the disk back smartly so the write can complete). Oh -- editing files on such a disk will apparently work because the system will hold the whole 1.44Mb disk image in cache. Changes will be flushed to disk eventually, or when you try and unmount it. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/AdvWdtESqEQa7a0RAqOmAKCN9xHnAdcQ6S+JOYLZMsRrqsGjQwCeK/G9 aoeOqfnozJs16jTUsc2o1F8= =HuMY -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--