Date: Tue, 1 Jul 2003 20:07:02 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Robert Gallimore <howlingrooster@hotmail.com> Cc: questions@freebsd.org Subject: Re: mounting a floppy Message-ID: <20030701190702.GA30826@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <Law9-F45QptgFrYILoy00005b23@hotmail.com> References: <Law9-F45QptgFrYILoy00005b23@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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/--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030701190702.GA30826>