From owner-freebsd-questions Wed Mar 27 9:11: 1 2002 Delivered-To: freebsd-questions@freebsd.org Received: from wasp.eng.ufl.edu (wasp.eng.ufl.edu [128.227.116.1]) by hub.freebsd.org (Postfix) with ESMTP id 0897137B421 for ; Wed, 27 Mar 2002 09:10:53 -0800 (PST) Received: from eng.ufl.edu (scanner.engnet.ufl.edu [128.227.152.221]) by wasp.eng.ufl.edu (8.9.3/8.9.3) with ESMTP id MAA09182; Wed, 27 Mar 2002 12:10:50 -0500 (EST) Message-ID: <3CA1FD1A.3BE8D06D@eng.ufl.edu> Date: Wed, 27 Mar 2002 12:10:50 -0500 From: Bob Johnson X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en, eo MIME-Version: 1.0 To: Hostmaster@Video2Video.Com Cc: questions@freebsd.org Subject: Re: /etc/fstab woes [please help] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Tue, 26 Mar 2002 02:05:03 -0500 (EST) > From: Peter Leftwich > Subject: /etc/fstab woes [please help] > > One moment it works, the next, he no a-worka! :( Can someone explain what > is best to use in my /etc/fstab file based on these dmesg entries? > > fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 > fdc0: FIFO enabled, 8 bytes threshold > fd0: <1440-KB 3.5" drive> on fdc0 drive 0 > afd0: 96MB [96/64/32] at ata0-slave using PIO3 > acd0: DVD-ROM at ata1-master using PIO4 > acd1: CD-RW at ata1-slave using PIO4 > > [More often than not, I will be using "-t msdos" zip100 floppies/media.] > There is no single fstab entry that works on all combinations of zip disks and drives, because for some idiot reason, some M$ operating systems treat them as big floppies (thus, no partition table) and others treat them as little hard drives (with a partition table). Using zip disks to move files between operating systems is thus a pain. In an effort to fix the situation, the friendly folks at iomega produced drives with a jumper that tells the drive to skip the partition table and make it look like those sectors don't even exist, so if you put a "giant floppy" formatted disk in one of those drives, you lose some of the data, but if you put a "mini harddrive" formatted disk, it looks like it is actually a "giant floppy". The end result is that I have three Zip entries in my fstab: two of them handle the two MS-DOS formats, and the third lets me use UFS-formatted Zip disks, just in case I get the urge. /dev/afd0 /zip msdos rw,noauto,longnames 0 0 /dev/afd0s4 /zipx msdos rw,noauto,longnames 0 0 /dev/afd0s4 /zipu ufs rw,noauto 0 0 The first of these works with factory-formatted disks, at least on my drive. I think that means that "giant floppy" is the factory standard. > Ooh, I just thought of a killer question! Is there a way to have > /etc/fstab entries basically *create* the mounted "directory" points and > `rm -rf /dir` the directories when something is unmounted? That is... why > must the user first "mkdir /cdromdrive" or whatever before issuing a > command like "mount -t cd9660 /dev/acd01 /cdromdrive?" This way, if I > tried to "cd" to a directory that was not a mount point, I would be told > the directory does not exist rather than being able to cd to it and do ls > and see just the usual "." and ".." -grrr. I suppose you could write a pair of scripts that do exactly what you now have to do manually, and name them something like "mountzip" and "umountzip". If you want it to happen automagically when a user inserts the disk in the drive, you want to look at amd(8), although it works via NFS and NFS can be a security problem if it is not used correctly. I don't know if amd creates a security problem as a result, but it is something I would ask about before using it, unless the system in question isn't connected to the Internet and you don't have to worry about it. >[...] > Thanks, everyone, someone? > > - -- > Peter Leftwich > President & Founder > Video2Video Services > Box 13692, La Jolla, CA, 92039 USA > +1-413-403-9555 > - Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message