*BSD News Article 94859


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.netspace.net.au!tornado!mheath
From: mheath@netspace.net.au (Mark Heath)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: how to access floppy drive
Date: 1 May 1997 06:37:36 GMT
Organization: Netspace Online Systems
Lines: 55
Message-ID: <5k9dng$8dk$1@otis.netspace.net.au>
References: <5k90b2$jd1@dailyplanet.wam.umd.edu>
NNTP-Posting-Host: netspace.net.au
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:40081

Rahmat Qurbani (tamhar@wam.umd.edu) wrote:

:    I recently installed FreeBSD-2.2.1 to my system, I was wondering 
: how to access my floppy drive, in dos its either a: or b: but do not
: know the command in unix(specially in FreeBSD) of how to access the floppy
: drive? Also, is there a way to access my dos files when I am running
: FreeBSD, in other words the dos files located in my hard drive?
:    Any suggestions will be greatly appreciated. thanks.

There are a few ways to do this, Depending on what you want to do with 
your floppies.

For reading dos floppies, the easiest thing to do is get the mtools 
package, make and install it. 
Then all you need to do is add an M to the dos command of your choice. eg:

mdir a:
mcopy a:file file
etc.

or you can mount the floppy so that FreeBSD treats it like the rest of 
the file system
(as root)

mount -t msdos /dev/fd0 /mountpoint

where mountpoint is where you want to mount the floppy
then you can simply do:

ls -la /mountpoint
cp /mountpoint/file ~/file

this can be extended to include harddisks

mount -t msdos /dev/<harddrivedevicepartition> /mountpoint
where harddrivedevicepartition is something like wd0s1

when you're finished using the floppy type:

umount /mountpoint


or if you're a true guru, you just read and write to the raw floppy:

cp file /dev/rfd0
dd if=/dev/fd0 of=image
tar -cvMf /dev/rfd0 files...
etc.

--
-- mark heath 		| Netspace Online Systems http://www.netspace.net.au/
mark@crafti.com.au	| SAM002 member - Society Against Microsoft
mheath@netspace.net.au	| +61(0)411 224 397
WW91IGhhdmUgc3VjY2Vzc2Z1bGx5IHVuIGVuY29kZWQgdGhpcyBmaWxlLgo=
SPAMBOTS PLEASE NOTE: I dont run ANY Microsoft products or live in America