Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!media-lab!lacsap From: lacsap@media-lab.MEDIA.MIT.EDU (Pascal Chesnais) Newsgroups: comp.sys.next Subject: Re: Ejecting the floppy Summary: use dump to back onto multiple floppies Message-ID: <4970@media-lab.MEDIA.MIT.EDU> Date: 21 Jan 91 21:55:46 GMT References: <10365@pasteur.Berkeley.EDU> Distribution: usa Organization: MIT Media Lab, Cambridge, MA Lines: 40 In article <10365@pasteur.Berkeley.EDU>, carlton@cs.berkeley.edu (Mike Carlton) writes: > Can anyone tell me how to eject a floppy disk under software control? > And how to tell when a new one has been inserted? > > Why do I want to do this? Well, I'd like to write a 'split' like > program to write files larger than the size of a floppy to a series > of disks (e.g. a compressed tar file of my home directory :-). > The first thing you may want to consider is that the floppy driver deals with floppy volumes and not floppy drives. That is to say I can do: /etc/mount /dev/fd0a /mnt_a it will ask me to put the diskette in for volume 0 /etc/mount /dev/fd1a /mnt_b it will eject the volume 0 diskette and then it will ask me for volume 1 then when I refer to /mnt_a/foo it will automatically eject volume 1 and ask me for the volume 0 diskette. So for your application I would split the big compresses tar file into files that would fit onto a diskette. You will want to have the diskettes initialized as a UNIX filesystem. The I would mount the filesystems I am interested in, copy the split file onto the right volume and then cleanly unmount and eject each of the volumes. now the thing you will have to remember is that you want to cleanly umount the floppy before using the disk command to eject the disk... the safest way to remove a floppy from the machine is to first try to drag the floppy into the recycler in the browser. If you want to backup a whole filesystem you probably want to use the dump(8) command, which you can tell how much a floppy can hold. The documentation is online, Librarian is your friend. Maybe someone will write an application to do this for people. pasc -- Pascal Chesnais, Research Specialist, Electronic Publishing Group Media Laboratory, E15-348, 20 Ames Street, Cambridge, Ma, 02139 (617) 253-0311 email: lacsap@plethora.media.mit.edu (NeXT)