[vox-tech] Disks and CDROMs from Linux (Was re: [vox] a very novice Linux user)

Karsten M. Self vox-tech@lists.lugod.org
Thu, 23 Jan 2003 01:35:54 +0000


on Wed, Jan 22, 2003 at 04:20:47PM -0800, Bill Kendrick (nbs@sonic.net) wrote:
> On Mon, Jun 10, 2002 at 04:04:29PM -0700, David Jeffrey Barnum wrote:
> > How do you access floppies and CD-ROMs using Debian.  And can you access 
> > Windows formatted disks using Debian?  I downloaded some programs for 
> > Linux in WIndows.  Thanks for the help.
> > 
> 
> If you stick a floppy into your drive, and then issue the command:
> 
>   mount /floppy
> 
> ...it _should_ Just Work(tm).

...a few notes.

This assumes your floppy is at /floppy.  Debian puts it there by
default.  Some folks (/me raises hand) prefer to aggregate removeable
media under the /mnt/ directory.

You'll also find that your GNOME or KDE desktop (if you're using this)
has a click-and-drag file manager which automagickally handles mounting
files.

*And* (GNU/Linux is about choice, including the choice to stop reading
this email here), you can install software to handle all of this
automatically.  That would be an automounter, the two standards in
Debian being the 'automount' and 'amd' packages.

I don't use these, so of someone wants to step in and describe config,
I'd appreciate this.  Using an automounter, you'd simply point to the
apporpriate directory:  /floppy or /cdrom if you're set up this way.


> Also, there's also another way to access Windows floppy disks under
> Linux.  There's a collection of programs known as "mtools"
> (I guess "m" = "MSDOS")

I'd probably not worry about these -- they're there, but you don't have
to use them.



> One last thing... you said you downloaded some Linux software using Windows.
> If the Windows you're speaking of happens to be the copy of Windows installed
> on the same system as your Linux system (e.g., a dual-boot, and you simply
> rebooted into Linux), then accessing the files on the Windows side of your
> computer is VERY easy.  (And MUCH more convenient than copying to floppy
> and then rebooting :^) )

> I'll let someone else explain that, though, since I don't have Windows
> on any of my boxes, so I don't know the exact incantation to get to the
> files.  (It's another "mount" command, but typically with more options.)

This depends on the legacy MS Windows filesystem you're using.  The
standards are 'FAT32' for legacy MS Windows 95/98/ME, and 'NTFS' (NT,
2K, XP).  GNU/Linux sees these as 'vfat' and 'ntfs' respectively.

The main difference is:  you can read and write 'vfat'.  'ntfs' is best
used read-only (there are some limited exceptions, but you don't want to
go there).

If your legacy MS Windows partition is the first on your primary IDE
drive (/dev/hda1 in GNU/Linux parlance), and you want to restrict access
to, say, group 'win', you'd want an /etc/fstab entry
similar to:

    # For Win(95|98|ME)
    /dev/hda1  /mnt/windows  vfat auto,noexec,nosuid,nodev,gid=win,fmask=0660,dmask=0750 0 0

    # For NTFS:
    /dev/hda1  /mnt/ntfs     ntfs auto,ro,noexec,nosuid,nodev,gid=win,fmask=0440,dmask=0550 0 0


The various options:

  - /dev/hda1:  the device the partition is on.

  - /mnt/windows | /mnt/ntfs:  The mount point for the partition under
    GNU/Linux.  This directory must exist.  It's where you'll find your
    legacy MS Windows files.

  - vfat | ntfs:  the filesystem type.

  - options:  You want to read the 'mount' manpage for what these are.
    Briefly:

    - auto:  mount this partition "automatically" at boot time (note
      that thid is different from automounting removeable media).

    - ro|rw:  Mount the partition read-only (or read-writeable).

    - (no)(exec|suid|dev):  allow or disallow certain features of a
      filesystem.  Several of these are overkill (vfat doesn't support
      suid bits or device files).  Essentially, this restricts the
      ability to invoke special file features which can be used to
      compromise your GNU/Linux system.

    - gid=...:  Set the effective group ID for accessing this partition.
      GNU/Linux user and group permissions don't apply to vfat or ntfs.
      legacy MS Windows *does* have user and group ownerships for NTFS,
      but these don't apply to GNU/Linux.  The idea is to restrict
      access to files on these partitions to a special group of users
      (those belonging to the 'win' group) under GNU/Linux.  Other users
      won't be able to read or modify data.

    - fmask|dmask:  Default permissions "masks" to apply to files and
      directories, respectively, on the partitions.  This allows _group_
      write access on the vfat filesystem, read-only access for ntfs,
      and no access for "world" users (those not part of the 'win'
      group).

You can tune these settings to fit your needs.o

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
  Two wrongs don't make a right, but three lefts do.