Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB memory key mountign problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
THE RUSSIAN
n00b
n00b


Joined: 23 Nov 2004
Posts: 21

PostPosted: Fri Nov 26, 2004 8:45 am    Post subject: USB memory key mountign problems Reply with quote

Ok, so I have my fstab, and the code for the usb is:
Code:
/dev/sda1     /mnt/usb     vfat     defaults,noauto,users,sync     0 0

Maybe something is wrong in that, but basically the problem is that if I plug the key in when the the computer is off, and turn it on, it starts up and is already mounted, but then when I unmount it, and take it out, it becomes unmountable, when I try to
Code:
mount /mnt/usb

it gives me a message saying:
Code:
mount: special device /dev/sda1 does not exist

if my fstab is wrong can somone give me the propper code or something, because I don't think turning off the comptuer everytime I want to use the key. Oh and it also works if I log off and then log back in and startx. but thats quite time consumign as well.

Thanks in advance
Val
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Fri Nov 26, 2004 9:12 am    Post subject: Reply with quote

i have a stick as well. hmm, i dont think you should use "defaults", maybe it overrides the parameters afterwards? otherwise your fstab line looks OK (if sda1 actually is your stick.
try it like this:
Code:

/dev/sda1     /mnt/usb     auto     noauto,users,sync     0 0

instead of "auto" you can also keep your "vfat", i guess.
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Fri Nov 26, 2004 9:18 am    Post subject: Reply with quote

use dmesg to see what the kernel is logging about the second plugin
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
THE RUSSIAN
n00b
n00b


Joined: 23 Nov 2004
Posts: 21

PostPosted: Fri Nov 26, 2004 9:26 pm    Post subject: Reply with quote

hmmm, changing the fstab didn't have any effect.
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Fri Nov 26, 2004 10:03 pm    Post subject: Reply with quote

hmm, i remember a stick from a cam i had problems with as well.
what gives "cfdisk /dev/sda"? are there more partitions on there apart from sda1? i once had a stick where i had to use sda4 - for whatever reason.
Back to top
View user's profile Send private message
THE RUSSIAN
n00b
n00b


Joined: 23 Nov 2004
Posts: 21

PostPosted: Fri Nov 26, 2004 10:39 pm    Post subject: Reply with quote

Ok so when I do cfdisk /dev/sda I get:
Code:

                                  cfdisk 2.12

                              Disk Drive: /dev/sda
                         Size: 128974848 bytes, 128 MB
               Heads: 8   Sectors per Track: 32   Cylinders: 984
                                                                               
    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1                    Primary   FAT16          [USB MEMORY ]       128.32
                            Pri/Log   Free Space                           0.66


     [Bootable]  [ Delete ]  [  Help  ]  [Maximize]  [ Print  ]
     [  Quit  ]  [  Type  ]  [ Units  ]  [ Write  ]

But then I also noticed that the memory key only stops working if I unmount it, take it out, and then try to mount it when it is not in, then even if I unmount it and plug the key in and try to mount it, it stops working, but if I unmount, take key out, and then don't try to mount it without the key, and mount it only when the key is in, it seems to work.
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Fri Nov 26, 2004 10:50 pm    Post subject: Reply with quote

THE RUSSIAN wrote:

But then I also noticed that the memory key only stops working if I unmount it, take it out, and then try to mount it when it is not in, then even if I unmount it and plug the key in and try to mount it, it stops working, but if I unmount, take key out, and then don't try to mount it without the key, and mount it only when the key is in, it seems to work.

jesus christ, what a hell of a sentence :lol: :lol: :lol:
btw.. no matter here if it has been unmounted or not, even if i try to mount it while unmounted or mounted and not plugged in, it works as soon as i plug it in. ;)
Back to top
View user's profile Send private message
THE RUSSIAN
n00b
n00b


Joined: 23 Nov 2004
Posts: 21

PostPosted: Fri Nov 26, 2004 11:09 pm    Post subject: Reply with quote

Haha, English is my second language man. Lol :lol: . Plus
Quote:
no matter here if it has been unmounted or not, even if i try to mount it while unmounted or mounted and not plugged in, it works as soon as i plug it in.

that is not much better :D

But yeah, is there a way to make my key, so it works like yours? :)
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Fri Nov 26, 2004 11:18 pm    Post subject: Reply with quote

THE RUSSIAN wrote:

Quote:
no matter here if it has been unmounted or not, even if i try to mount it while unmounted or mounted and not plugged in, it works as soon as i plug it in.

that is not much better :D

i know ;)
Quote:

But yeah, is there a way to make my key, so it works like yours? :)

i have no clue, seriously. maybe it has something to do with hotplug? if i plug it in (i have not mounted it yet) i get:
Code:

Nov 27 00:17:33 hds <6>usb 1-1.1: new full speed USB device using address 6
Nov 27 00:17:33 hds scsi3 : SCSI emulation for USB Mass Storage devices
Nov 27 00:17:33 hds Vendor: Sony      Model: MSAC-US1          Rev: 1.00
Nov 27 00:17:33 hds Type:   Direct-Access                      ANSI SCSI revision: 02
Nov 27 00:17:33 hds SCSI device sdc: 126848 512-byte hdwr sectors (65 MB)
Nov 27 00:17:33 hds sdc: assuming Write Enabled
Nov 27 00:17:33 hds sdc: assuming drive cache: write through
Nov 27 00:17:33 hds /dev/scsi/host3/bus0/target0/lun0: p1
Nov 27 00:17:33 hds Attached scsi removable disk sdc at scsi3, channel 0, id 0, lun 0
Nov 27 00:17:33 hds Attached scsi generic sg4 at scsi3, channel 0, id 0, lun 0,  type 0
Nov 27 00:17:33 hds USB Mass Storage device found at 6
Nov 27 00:17:34 hds scsi.agent[991]: disk at /devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1.1/1-1.1:1.0/host3/3:0:0:0

i use hotplug, and also generic scsi support. it worked out of the box then, i had nothing to configure manually.
this is with both, kernel 2.6.x and 2.4.27
ah, btw, i also have:
CONFIG_USB_DEVICEFS and CONFIG_USB_STORAGE set in kernel
Back to top
View user's profile Send private message
THE RUSSIAN
n00b
n00b


Joined: 23 Nov 2004
Posts: 21

PostPosted: Fri Nov 26, 2004 11:35 pm    Post subject: Reply with quote

Haha hmm, ok well I guess i jsut have to keep using my bootleged ways.
Thanks for helpin, and if you do somehow figure out a way, I am all ears. :D


Thanks,
Val
Back to top
View user's profile Send private message
tisham
n00b
n00b


Joined: 25 Oct 2004
Posts: 24

PostPosted: Sat Nov 27, 2004 12:43 am    Post subject: Honking my little tutorial Reply with quote

I went through exploring the whole usb key thing system with scsi emulation and usb block driver and posted up a little howto in documentation,tips and tricks.
Note that the vfat line is good needs to be in my fstab actually coz,auto wants to mount the fat32 as fat and deny me the long file names i love.
The plug in plug out problem he, i think it is a fstab + mtab thing.
Suppose you pull out the key while it is still open in say konqueror or you are simply inside one of the directories in the shell.The kernel will note that there is a certain file system that it can no longer access,hence they are unmounted,but since there are processes still accessing it the entry is not removed from mtab,only the devices is removed from /dev.Makes sense ?
Next time you insert the key, the scsi emul sadly notes that there is already an entry in mtab and does not create /dev/sda*.But have a deeper look there may be entries in /dev/scsi/host*/bus0/target0/lun0/, /dev/sd** is merely a symlink/alias to the real scsi mess below, which is an alias to the usb mess further below.So your file system thinks there is this device that should be there but can't access and your kernel thinks there is this device that should not be there and won't give you access. I am being homomorphic but what the hell.Btwn. i am not really sure what thinks what :D
So long hope i helped you polish up your english if nothing else.
Cheers,
Tisham.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum