Here's my own 1..2..3 on mounting a USB something-or-another (Note: I don't automount. I always mount by hand.):
1. Make sure I've
compiled a kernel w/ all the USB modules in it that I have some understanding of. Alternately, the bigger pre-compiled Slackware kernels have ALL the USB modules compiled into them.
2. Start Slackware and get it all warm and happy. USB hardware at this time is unplugged and/or turned off.
3. Now that Slack is up, hotplug the USB hardware by plugging it in and/or turning it on.
4. And now the hard part... "
tail /var/log/messages". (You might need to wait a little bit until the hotplug system works it magic.) In this usually root controlled log, a system message will be added saying that hotplug has started and the USB hardware is being assigned a device.
5. Time to decode the message. Look for key words. Here's an example of what I get when I hotplug my USB memory stick:
Code:
Aug 30 16:22:36 rain kernel: USB Mass Storage support registered.
Aug 30 16:22:41 rain kernel: Vendor: Model: USB Flash Memory Rev: 1.04
Aug 30 16:22:41 rain kernel: Type: Direct-Access ANSI SCSI revision: 00
Aug 30 16:22:42 rain kernel: SCSI device sde: 2004992 512-byte hdwr sectors (1027 MB)
Aug 30 16:22:42 rain kernel: sde: Write Protect is off
Aug 30 16:22:42 rain kernel: SCSI device sde: 2004992 512-byte hdwr sectors (1027 MB)
Aug 30 16:22:42 rain kernel: sde: Write Protect is off
Aug 30 16:22:42 rain kernel: sde: sde1
Aug 30 16:22:42 rain kernel: sd 4:0:0:0: Attached scsi removable disk sde
Aug 30 16:22:42 rain kernel: sd 4:0:0:0: Attached scsi generic sg4 type 0
Key words "
SCSI device sde" and "
sde: sde1". Why are they key words? Because I know that my memory devices look something like "
/dev/hda" or "
/dev/sda". It specifically tells me in the log that I have a SCSI device, so I know it'll have to look like "
/dev/sda" or maybe "
/dev/sda1" or in this case sde1 means "
/dev/sde1".
6. If you haven't already done this, you need a mount point. Mount points are the directories that will hold your USB hardware. Off of the / directory, I created "
/td" because it's a "thumb drive." (
mkdir /td)
7. Quick and dirty:
mount /dev/sde1 /td and there you have it. (
umount /td and there you don't have it!)
8. Slow and slick: add the following line to your
/etc/fstab:
Code:
/dev/sde1 /td vfat noauto,user,rw,exec 1 0
Decode: "
vfat" is the disk partitioning scheme.
"
noauto,user,rw,exec" from the man and howtos for mount:
Don't automatically mount this at bootup, Allow the ordinary "
user" to mount this drive, As
read-
write, Permit the
execution of binaries from the drive.
"
1 0" have to do with "dump"ing. I have no idea what that means, but I know it ought to be "1 0".
Quote:
Inserted very damning note: Since Slackware is adding your devices sequentially, if you have a couple devices that use the SCSI device scheme, your memory stick may mount as /dev/sde (which happens to be the 5th memory device after my 4 hard drives). Or it may be /dev/sdf, if, say, I hotplugged a digital camera into Linux and the camera got /dev/sde first! The digital camera could be mounted, then with mount /td. I mean, it's a device and fstab knows /dev/sde1 goes with /td. But then your memory stick, sitting at /dev/sdf1 is out of luck. Maybe automounters are smart enough to discriminate. I dunno.
|
9. If you have chosen the "Slow and slick" method, you will then be able to
mount your drive as a user, which is awfully nice if you typically run Slack as a user.
mount /td
umount /td
10. Always, always, always remember to
umount before you pull your hardware. Man, have I gotten bit by that over and over! It doesn't matter if you're on Microsoft or Linux, umounting writes something or another that closes up those files you wrote to your memory stick. Don't do it, and your last file you wrote just doesn't seem to be the right size... if you can even mount the memory stick ever again!!!
--vonSt