View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 24 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Sun Aug 20, 2006 6:04 pm 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
Interesting!

I can get USB pen devices to work.. but I can't get my USB harddisk drive to automount. (I can manually mount the drive!)

Here's my setup that makes the USB pen to work...

Here's how I identified the USB Pen device:
Code:
dmesg | grep scsi -A 9


It came up as sdb instead of sdc

my /etc/auto.master file:
Code:
# $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(5).
# /var/autofs/misc      /etc/auto.misc
# /var/autofs/net               /etc/auto.net
# KNOPPIX automounts for floppy and cdrom(s), see knoppix-autoconfig
/mnt/auto     /etc/auto.mnt   --timeout=2
/var/autofs/usb /etc/auto.usb   --timeout=2
/mnt/auto       /etc/automount.sh       --timeout=2
#/mnt/removable auto.removable


my /etc/auto.usb file:
Code:
# Format of file:
# mountpoint options device
#sda     -fstype=vfat,uid=1002,gid=1002,umask=002,noatime        :/dev/sda1
sdb     -fstype=vfat,uid=1002,gid=1002,umask=002,noatime        :/dev/sdb1
#sdc     -fstype=vfat,uid=1002,gid=1002,umask=002,noatime        :/dev/sdc1
#sdd     -fstype=vfat,uid=1002,gid=1002,umask=002,noatime        :/dev/sdd1


my symbolic link command:
Code:
ln -s /var/autofs/usb/sdb /mnt/usbpen


Here are a couple of "discoveries"..
1. multiple usb devices can "compete" for the link.. so I setup sdb for the mount point at "/mnt/usbpen".
2. you can use the "rm" command to remove links that you don't use.

Here's what I tried to get my USB harddisk drive to work...

The same dmesg command identified my usb harddisk drive as "sda" ..

Quote:
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
Vendor: ST380211 Model: 0A Rev: 0811
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: assuming drive cache: write through
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: assuming drive cache: write through
sda: sda1
sd 1:0:0:0: Attached scsi disk sda


I went through the same basic steps.. uncommented the sda line in the /etc/auto.usb file .. set the symbolic link with
Code:
ln -s /var/autofs/usb/sda /mnt/usbdrive

then restarted the autofs with
Code:
/etc/init.d/autofs restart


.. and "nada".. it doesn't mount!

Manually, I can mount the drive using
Code:
mount /dev/sda1 /mnt/manualusbdrive

and it works OK. (I like to use nuvexport on it to create the mpg files for burining DVD on this drive.. one advantage.. it's faster, since it's on a different I/O channel than the main hard drive (with the captured programs) and the DVD drive.)

I have noticed that Linux get cranky if I just "yank out" the drive's usb connector on the hot system.. so I will always use
Code:
umount /dev/sda1

_________________
// Brian - Hardware:
ASUS P5P800 - P4 3Ghz, 500 GB PATA HD
ASUS P5K-V - P4 Core2 Duo, 500 GB SATA HD
Hauppauge PVR-350, IR Blaster, Comcast Digital Cable
http://tech.groups.yahoo.com/group/KnoppMyth/
KnoppMyth R5F27 >> R5.5


Top
 Profile  
 
 Post subject: I got it working!!!!
PostPosted: Fri Nov 17, 2006 1:25 am 
Offline
Joined: Tue Aug 16, 2005 11:50 am
Posts: 181
Location: Douglasville, GA
Finally!! Holy CARP!

I've had a 3.5" bay Multi-card reader in my machine since I built it over a year ago. I have never gotten it to work.

Today I got my Sanyo HD1A delivered, and decided it was time. I followed the instructions here: https://www.scientificlinux.org/documentation/howto/multicard.reader.sl4x to get the SCSI LUNS setup right. (It turns out that a multi-card reader isn't like a USB hub with a bunch of single USB card readers. It needs a little extra "massaging".)

There are also a few gems here http://www.cs.sfu.ca/~ggbaker/personal/cf-linux

Then I followed Cesman's instructions that he put in his first post on the first page of this thread. Other than the fact that I had to kill -9 the /usr/sbin/automount... it was pretty much exactly like he explained. However, I called my mount point /mnt/sd_card and then did:
Code:
ln -s /mnt/sd_card /myth/video/SD\ CARD\ READER

...so that I could scan for video on an SD card from within MythTV.

All is well is the Bronosky household. Let's have a baby! (I bought this video camera cause we are expecting our first in January.)


Top
 Profile  
 
 Post subject: works for root only
PostPosted: Thu Nov 30, 2006 9:52 pm 
Offline
Joined: Tue Nov 28, 2006 5:18 pm
Posts: 4
i'm no expert and am likely doing something wrong but based on the above instructions i could not access the usb flash at all, however after hacking at it i did manage to get it working (see below).

two changes to /etc/auto.usb fixed the problem:

before (didn't work at all):
Code:
sda -fstype=vfat,uid=1002,gid=1002,umask=002,noatime :/dev/sda


first change sda->sda1 at end of line (can now access as root only):
Code:
sda -fstype=vfat,uid=1002,gid=1002,umask=002,noatime :/dev/sda1


second change uid and gid => mythtv (can now access as root or mythtv):
Code:
sda -fstype=vfat,uid=mythtv,gid=mythtv,umask=002,noatime :/dev/sda1


reminder: after editing you need to do (as root):
Code:
/etc/init.d/autofs restart


Top
 Profile  
 
 Post subject: Re: works for root only
PostPosted: Fri Dec 01, 2006 8:01 am 
Offline
Joined: Tue Aug 16, 2005 11:50 am
Posts: 181
Location: Douglasville, GA
jsmith wrote:
before (didn't work at all):
Code:
sda -fstype=vfat,uid=1002,gid=1002,umask=002,noatime :/dev/sda

I don't know where you got /dev/sda from. Cesman didn't say to put that in there. But good job on figuring it out and correcting it. From what I understand /dev/sda refers to the device itself, /dev/sda/1 refers to the first partition on the device, /dev/sda2 refers to the second partition, and so on. Most removable drives only have 1 partition, so it's generally reliable to use /dev/sdx1

jsmith wrote:
second change uid and gid => mythtv (can now access as root or mythtv):
Code:
sda -fstype=vfat,uid=mythtv,gid=mythtv,umask=002,noatime :/dev/sda1

It seems that somehow the mythtv user's user and group numbers are not standard. This may be the result of having followed a specific upgrade path. But again, congratulations of the catch. We, as non-experts, must celebrate these little victories to keep from getting frustrated and giving up. You solve enough of these problems, and pretty soon you are an expert.

It's not following directions that makes you a great Linux user. It's finding directions, and modifying them to work for your system that makes you great. We are on the path to greatness my friend! :lol:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 01, 2006 10:28 am 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
This should be a non issue in the next release...

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 01, 2006 9:10 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
HI,

If cesman fixes all the issues, then there won't be any little challenges :) so then would folks stop learnng?

I usually # mkdir /stick and then make a manual entry into /etc/fstab like so:
/dev/sda1 /stick vfat defaults,user,noauto,showexec,umask=022 0 0
I also # chown mythtv:mythtv /stick so user mythtv can use it to move pictures, copy in the latest Tux issue and also move some tweaks around.

I may have to try the auto feature since it was so kindly added.

Mike


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 01, 2006 9:16 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
When it comes to KnoppMyth, my goal is the user have little or no challenges. Learning shouldn't be done on a PVR box, I'd hope that KnoppMyth would just work. Now, this is a community... I'd greatly accept and appreciate it if a user did try to learn (on a test system) so they can then contribute fixes back to the project. This way, KnoppMyth wouldn't require little fixes. :)

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
PostPosted: Mon Dec 04, 2006 7:27 pm 
Offline
Joined: Tue Nov 28, 2006 5:18 pm
Posts: 4
Thanks for the kind words Richard, and for fixing the USB flash automount in the next release Cesman.

My noisy PC is in the garage and the DVD-ROM in the living room at the end of a USB cable extender. After more trial and error hacking it is now automounting inserted DVDs.

Here are my notes:

Code:
automount usb cdrom
-------------------

[unplug usb cable to ext usb cdrom and wait then plug back in wait bit
dmesg > dmesg.txt
vi dmesg.txt
:$
[look for sr0 or something that is your cdrom
:q

su -
[enter root passwd

cd /etc

vi auto.mnt
=
i
#added usbcdrom [sr0 found in dmesg output
usbcdrom        -fstype=auto,user,exec,ro       :/dev/sr0
<esc>:wq
=

cd /mnt

ln -s /mnt/auto/usbcdrom usbcdrom
[above /mnt/auto/usbcdrom determined by name used in /etc/auto.mnt file

/etc/init.d/autofs restart

[insert cd or dvd into ext usb cdrom
cd /mnt/usbcdrom

ls
[should see files on ext cdrom if it all worked


There is likely a better way but this worked for me.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 10:37 pm 
Offline
Joined: Thu Jan 01, 2004 9:21 pm
Posts: 84
Location: Fort Collins, CO USA
Ok, I've read so many wikis and threads here about automounting USB drives but most seem old and indicate that it will be done different in the future (maybe scripted?). And the comments in the existing /etc/auto.* files and the reaction of my drive to just plugging it in on R5.5 leave me somewhat confused.

I've probably just missed the latest correct answer, but if so, others probably have too. So, in an attempt to update these many threads (and get it working for me) with the real definitive howto, could someone point me in the right direction on how this should be done now on R5.5? And if it's been this way for a couple versions, which version did it start with? Then, I'll point the other threads in the direction of the answer. Thanks.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu