Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2002 12:10:50 -0500
From:      Bob Johnson <bob@eng.ufl.edu>
To:        Hostmaster@Video2Video.Com
Cc:        questions@freebsd.org
Subject:   Re: /etc/fstab woes [please help]
Message-ID:  <3CA1FD1A.3BE8D06D@eng.ufl.edu>

next in thread | raw e-mail | index | archive | help
> Date: Tue, 26 Mar 2002 02:05:03 -0500 (EST)
> From: Peter Leftwich <Hostmaster@Video2Video.Com>
> 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: <NEC 72065B or clone> 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 <IOMEGA ZIP 100 ATAPI Floppy> [96/64/32] at ata0-slave using PIO3
> acd0: DVD-ROM <TOSHIBA DVD-ROM SD-M1212> at ata1-master using PIO4
> acd1: CD-RW <SONY CD-RW CRX160E> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CA1FD1A.3BE8D06D>