[comp.sys.amiga.tech] Writing Amiga Disks from Sparc

umbirch2@ccu.umanitoba.ca (Robert Birch) (11/16/90)

This is a message I received about writing Amiga disks from a Sparc station.
I hope thsi helps everyone out.
						Robert Birch
                                              <umbirch2@ccu.umanitoba.ca>

BEGIN INCLUDED ARTICLE...

From ut-emx!mic Sun Oct 14 04:35:36 CDT 1990
Article 53 of ccwf.forum:
Path: ut-emx!mic
>From: mic@ut-emx.uucp (Mic Kaczmarczik)
Newsgroups: ccwf.forum
Subject: Re: New SPARCstations in TAY 100B
Keywords: SPARCstation floppy MS-DOS
Message-ID: <38161@ut-emx.uucp>
Date: 12 Oct 90 05:31:29 GMT
References: <38078@ut-emx.uucp> <38144@ut-emx.uucp>
Distribution: ccwf
Organization: UT Austin Computation Center, Unix/VMS Services
Lines: 150

In article <38144@ut-emx.uucp> aubrey@walt.cc.utexas.edu (Aubrey McIntosh) writes:
>In article <38078@ut-emx.uucp> mic@ccwf.cc.utexas.edu (Mic Kaczmarczik) writes:
>>	* 1.44-MByte internal 3-1/2-in floppy drive
>>
>>	Q. Can I use the 1.44 megabyte floppy disk drive to store my files?
>>	A. Yes. There are these ways:
>>	   1) Use bar(1) to treat the floppy like a small magnetic tape.
>>	   2) Use the ``mtools'' package to put an MS-DOS file system on
>>	      the diskette.
>>	      To use the mtools programs, you must put the directory
>>	      /usr/local/mtools in your path. The programs of most interest
>>	      are mkdfs (initialize a diskette), mcopy (copy files to and
>>	      from a diskette), and mdir (list files on a diskette).
>>
>>Send mail to remark or call the UNIX consulting desk at 471-0251 for
>>questions or more information.
>>Mic Kaczmarczik                  gripe@{emx,ix1,ccwf} (Unix consulting, 1-0251)
>>Unix / VMS / Cyber Services                 ...!cs.utexas.edu!ut-emx!mic (UUCP)
>>UT Austin Computation Center                      mic@emx.utexas.edu (Internet)
>>                                                            mic@utaivc (BITNET)
>
>
>So, there's something I don't know yet.  I went looking for /usr/local/mtools
>and got the following.  What should I do?
>
>
>Script started on Thu Oct 11 18:15:06 1990
>doc.cc.utexas.edu$ echo $HOME
>/home/ccwf/u0/general/aubrey
>doc.cc.utexas.edu$ ls -l /usr/local/mtools
>/usr/local/mtools not found
>doc.cc.utexas.edu$ ls -l /usr/local
>total 29
>drwxr-xr-x  2 root         2560 Oct 11 11:08 X11
>drwxr-xr-x  5 root         1536 Oct  1 16:17 X11R4
>drwxrwx--x  4 root         1024 Oct  1 11:27 adm
>drwxrwxr-x  2 root         3072 Oct 11 11:06 bin
>drwxrwxr-x  3 root         1536 Oct 11 10:53 etc
>drwxr-sr-x  3 games        1024 Apr 24  1989 games
>drwxr-xr-x  4 bin           512 Jan  8  1990 include
>drwxrwxr-x 31 root         2560 Oct 11 11:06 lib
>drwx------  2 root         8192 Jan  3  1989 lost+found
>drwxrwxr-x 18 root          512 Jan  3  1989 man
>drwxr-xr-x  4 root          512 Aug 17 10:53 mh
>drwxr-xr-x  3 root         1536 Aug 21 10:54 pbm
>drwxrwx---  2 root          512 Mar 15  1990 staff
>doc.cc.utexas.edu$ exit
>
>script done on Thu Oct 11 18:16:09 1990
>Aubrey McIntosh  /  Chemistry  /  University of Texas  /  Austin, TX 78712

Only the SPARCstations have floppy disk drives, on the front right
side of the pizza box; doc is not yet a SPARCstation.  

Here's how to put an MS-DOS file system on a 1.44M floppy:

1) Log into a SPARCstation and add /usr/local/mtools to your path:
	set path = ($path /usr/local/mtools) ; rehash

2) Insert a floppy into the drive.  To format the disk at high-density
and install an MS-DOS file system on it, type
	mkdfs -f -h

If you want to use a low-density 720K disk instead, type
	mkdfs -f

You only need to put a file system on the disk the first time you use
it as an MS-DOS diskette; you definitely want to reformat the disk if
it has previously been used on a Macintosh, since the disk formats are
quite different. 

3) To copy files to and from a formatted and initialized floppy, use
the mcopy program. For example, to copy the files file1, file2, and
file3 to the root of the MS-DOS file system on the floppy, type
	mcopy file1 file2 file3 a:/

To copy a single file on the MS-DOS floppy to your Unix directory, type
	mcopy a:/file1 .

The data in the file is copied AS-IS, with no format translation; you
can use the -t option to mcopy to translate text files into the MS-DOS
notion of a text file, and vice versa. 

4) You can use the mdir command to list files on the MS-DOS floppy:
	mdir

5) You can also remove files:
	mdel mdsos-filename

6) To eject the disk, type
	eject

at the shell prompt.

The mtools programs are best for situations where MS-DOS compatability
is important.  For example, for a while I transferred files from work
to my Amiga by writing MS-DOS diskettes, carrying them home in my
pocket, and reading them using an MS-DOS file system handler on the
Amiga.  

If Unix compatability and raw storage capacity are more important
considerations than MS-DOS compatability, you might consider using
bar(1) instead; it acts much like tar(1), but handles multiple
floppies. It also preserves more of the Unix characteristics of the
files, such as the name, creation time, and Unix protection mode. 

To use bar, you must

1) First format a floppy disk using the fdformat program.  To format
and verify a high-density diskette, insert a floppy in the drive, type
	fdformat -v

at the shell prompt, and respond to fdformat's prompts as appropriate. 

2) Once the diskette is formatted, you can use bar much like tar,
bearing in mind that the ``tape device'' in this case is a floppy drive.

For example, to copy some files from your Unix home directory to the
floppy, you could type
	bar cvf /dev/rfd0c file1 file2 file...

The ``c'' flag indicates you wish to create a new archive on the
floppy, the ``v'' flag requests verbose messages, the ``f'' and
``/dev/rfd0c'' indicate that the archive device is the internal floppy
drive, and the rest of the argument list consists of the files you
want to archive.

3) To list the archive, type
	bar tvf /dev/rfd0c

4) To extract a file from the archive (*overwriting* any files by the
same name), you can type
	bar xvf /dev/rfd0c filename

5) As with the MS-DOS file system, you can type
	eject

to retrieve the diskette from the maw of the floppy drive.

When using *any* of the floppy reading utilities, please make sure to
read the whole man page for the utility you're using, particularly any
BUGS and WARNINGS sections.  Mtools is not a supported part of SunOS,
so we may or may not have a remedy if you find problems with the
programs.

-- 
Mic Kaczmarczik                  gripe@{emx,ix1,ccwf} (Unix consulting, 1-0251)
Unix / VMS / Cyber Services                 ...!cs.utexas.edu!ut-emx!mic (UUCP)
UT Austin Computation Center                      mic@emx.utexas.edu (Internet)
                                                            mic@utaivc (BITNET)


END INCLUDED ARTICLE...







-- 
---------------Greg-Harp---------------greg@ccwf.cc.utexas.edu----------------
AMIGA! //  
      // Don't you just hate those long signature files?  I mean, there oughta
    \X/  be a law.  If I were in control, .sigs would get cut off if they were