lkml.org 
[lkml]   [1998]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Can this CD/Floppy Behaviour be Done? [offtopic?]


On Mon, 7 Dec 1998, Dennis Grant wrote:

> Hello all,
>
> I was futzing with my system in user-space last night, and I wonder if
> there's a way to do something:
>
> One of the behaviours I really miss from my Amiga days is the ability to
> auto-detect and auto-mount removeable media filesystems.
>
> For example, if one inserted a CD into the drive, as the tray sucked in
> and the drive spun up, the Amiga CD driver would (if it was a CD-ROM)
> mount the filesystem for you. If it was a CDDA, it would (optionally)
[snip]
> If you inserted a floppy into the drive, it would detect the change and
> mount the floppy for you. As each floppy was named with a volume name,
[snip]
> Both behaviours are very user-intuative, and add major ease-of-use
> points to a workstation-style machine.
>
> Is it possible, using current tools, to duplicate this behaviour? If
> not, is it worth adding?
>

Sort of. If you enable autofs support in the kernel and compile up the
autofs daemon you get Solaris-style mount-on-use-dismount-after-idle type
behaviour. This is particularly handy combined with the auto fstype in
/etc/fstab which allows the kernel to autodetect what filesystem is on the
media before it mounts it:

[root@cocoa rc.d]# cat /etc/auto.master
# $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/mnt /etc/auto.mnt

[root@cocoa rc.d]# cat /etc/auto.mnt
# $Id: auto.misc,v 1.2 1997/10/06 21:52:04 hpa Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

zip -fstype=auto,exec :/dev/sda4
cdrom -fstype=iso9660,exec,ro :/dev/hdc
floppy -fstype=auto,sync :/dev/fd0
dosa -fstype=vfat,sync,gid=103,umask=002 :/dev/fd0
doss -fstype=vfat,gid=103,umask=002 :/dev/sda4
amigazip -fstype=affs,exec :/dev/sda1

If I pop a floppy in /dev/fd0 and type ls /mnt/floppy autofs will mount it
with the appropriate options and fstype. I can't remember right now why I
didn't do the same thing for my Zip drive, but I'm sure I had my reasons
(something to do with VFAT LFNs, I suspect...)

> Thank you,
>
> DG

Best Regards,
Alex.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.680 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site