Subject: Re: How to read MS-DOS file from NetBSD

From: Greg Spiegelberg <[email-masked]>

# >    I'm using NetBSD 0.9, and not familiar with it.
# >    How can I read DOS files from floppy ?
# >    I found a program in /usr/local/bin named mread, which seems like
# >       what I want.
# >    But how to use it ?
# >    I use 'man mread', and found no entry of that.
# 
# I haven't installed NetBSD/intel, so the following might be wrong...
# 
# There's a package out there called "Mtools" which enables you to access
# MS-DOS-disks via commands as mdir, mcopy, ... AFAIK, mread is one of them, but
# not intended to be used by users directly.
# 
# Als, "mount -t msdosds /dev/fd0c /mnt" or such should work.

It's 'mount_msdos /dev/? /mnt' and is umounted the same as any other.
BTW, when mount_msdos'ing multiple floppies, be sure to umount as you
swap them.

--
          ,,,  Boo!        
         (o O) /         
+-----ooO-(_)-Ooo------+	Greg "TwoTone" Spiegelberg 
     gspiegel@owens		UNIX Systems Administrator, SAIC
+------------Oooo.-----+	RidgeNet, Ridgecrest, Ca. 
      .oooO  (   )      	NAWCWPNS, China Lake, Ca. 
      (   )   ) /       
       \ (   (_/        
        \_)

---

From: Peter Galbavy <[email-masked]>

> BTW, when mount_msdos'ing multiple floppies, be sure to umount as you

Now maybe there's an idea for someone... make the "disk changed" bit
or whatever filter through the floopy driver, and umount / mount the
new disk ? I know there are many problems likely... just a cute thing
to do.

Regards,
-- 
Peter Galbavy					work: [email-masked]
Wonderland					rest: [email-masked]
						play: http://www.wonderland.org/
"The 'net interprets censorship as damage and routes around it." - John Gilmore

---

From: [email-masked] (Alistair G. Crooks)

> BTW, when mount_msdos'ing multiple floppies, be sure to umount as you

Just a few comments here:

1.  To find out the usage of mread, use the mread command with no
parameters, and it'll print out a usage message.  e.g.

root@pumpy:.../arch/i386/conf(18)# mread
Mtools version 2.0.7, dated 6 Sep 92
Usage: mread [-tnm] msdosfile unixfile
       mread [-tnm] msdosfile [msdosfiles...] unixdirectory
root@pumpy:.../arch/i386/conf(19)# 

This is from a version I compiled in mid-June, but the only things I
changed were to do with disc partitions.

2.  mtools is useful in the situation where you don't have root
permissions.  e.g.

ingres@pumpy:/usr/ingres(1)% mount -t msdos /dev/fd0a /mnt
msdos: mount: Permission denied
ingres@pumpy:/usr/ingres(2)% who am i
ingres   vga     Sep  1 09:49
ingres@pumpy:/usr/ingres(3)% 

3. The above syntax is for
NetBSD 1.0_BETA (PUMPY) #12: Wed Aug 31 10:31:42 BST 1994
The syntax has changed since 0.9, where I *think* it was

mount -t pcfs /dev/fd0c /mnt

4.  You can certainly call mount_msdos(8) directly if you wish - my own
personal preference is to stick with mount(8).

5.  I think there's a case for modifying mount(8) to judge for itself
what kind of a filesystem it's being presented with, and to use a file
like /etc/magic to decide what kind of filesystem's there.

6.  You could also look at the .profile on the installation disk that
uses mread and/or mount to read the installation packages from the
floppy - this will tell you the syntax.

Alistair
--
Alistair G. Crooks ([email-masked])			     +44 252 346377
Amdahl European HQ, Dogmersfield Park, Hartley Wintney, Hants RG27 8TE, UK.
[These are only my opinions, and certainly not those of Amdahl Corporation]