public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Clayton <nathanclayton@daftwazzock.com>
To: linux-newbie@vger.kernel.org
Subject: Re: USB Mass Storage Devices
Date: Sun, 26 Oct 2003 01:24:30 -0700	[thread overview]
Message-ID: <3F9B84BE.4020302@daftwazzock.com> (raw)
In-Reply-To: <bne88l$jap$1@sea.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2499 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pete Shinners wrote:

| Thorsten Alge wrote:
|
|> I want to use my usb hd and my usb mp3-player an my linux computer.
|> if i plug them on on after one, they will assigned as sda (i.e. my
|> usb hd) and sdb (my mp3-player) . so i can add them to /etc/fstab.
|> the problem is; if i plug on only one of them or in another order,
|> the device files are changed to and the mount points are not
|> correct. my first idea was to use volume labels. that works fine
|> with my ext2 partition but i don't helps on my vfat partitions. the
|> compactflash cards an two of my partitions on my usb-hd must be
|> vfat partitions. any ideas how to fix?
|
|
| i have this same problem and i cannot get it resolved. i believe with
|  "devfs" you can get consistent device names?? not sure, but debian
| does not have devfs, so i need a different solution. i was hoping
| there was some "hotplug" script that would link the plugged in device
|  to whatever system device it was assigned to, but i have found
| nothing.
|
| help please?

~From what I understand, devfs is a virtualization of the /dev device
tree so that when you plug in devices, they can appear and disappear
once you unplug them (an example of this would be to do something like
plug in a scanner and it appears as "/dev/scanner/scanner0", and have it
disappear once it is gone). But what happens when you plug in a mass
storage device isn't the same as plugging in a new peripheral (at least
to the computer), you are plugging what the computer sees as a new
harddrive, and it assigns those in the order that it sees them, in one
case, your portable hdd first, in another, your MP3 player.

I just whipped up the attached script, I think that it, slightly
modified might help you out a bit (just type in the script name, m or u
for mount or unmount, and the letter of the device (i.e. a for sda, b
for sdb, etc.) I haven't used them so there may be a few bugs. Modify it
for your mp3 player according to what you need too. It might have to be
setuid root, or something similar. Try it as a user first.

Check for the TODO parts, and modify to what you need.

Hope that was helpful, if you need any more help, just email.

Nathan Clayton

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/m4S7XN24wxDWCsYRAuQTAKCQUnV6oftRejonR1VBqDmqq3u0fACgnfhF
L822Kp75NEjff9X8XuaqbwY=
=O2w3
-----END PGP SIGNATURE-----

[-- Attachment #2: usbhdmount.sh --]
[-- Type: application/x-sh, Size: 1430 bytes --]

      reply	other threads:[~2003-10-26  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-25 16:02 USB Mass Storage Devices Thorsten Alge
2003-10-25  9:29 ` James Miller
2003-10-25 16:22 ` Pete Shinners
2003-10-26  8:24   ` Nathan Clayton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F9B84BE.4020302@daftwazzock.com \
    --to=nathanclayton@daftwazzock.com \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox