Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Mounting a USB stick in SUSE 9.1

  • 11-09-2004 3:39pm
    #1
    Moderators Posts: 5,580 ✭✭✭


    After reading several reviews of SUSE 9.1 I decided to try it out after hearing it has excellent support for laptops (gets winmodems working etc). So all is grand until I went to mount my usb stick. First up when I inserted usb stick it seemed to be detected and in the GUI I got aload of hard drives icon's popped up. None of them worked or let me into the usb.

    So then I tried mounting it manually. But I could not since I had to be root. So I changed into root (later on I googled a way of allowing the pen drive to be mounted by anyone editign the fstab file it does work as it no longer tells me I'm not root when I try to mount it as a user.) So I created a mount directory in the form of /mnt/memstick

    Problem was I was having woefully difficulty mounting it and unmouting it. I got it twice but I used a different mount both times I reckon.

    I have tried the following.
    mount /dev/sda /mnt/memstick
    mount /dev/sdb /mnt/memstick
    mount /dev/sda1.................
    mount /dev/sdb1.................
    mount -t vfat /dev/sda(sdb)...................
    mount vfat /dev/sdb..............
    and others

    I have tried lots of combinations but it either tells in invaild block or can't read superblock. Is it suppose to change everytime you put it in. Got it mounted twice but then it fails to umount using similar umount commands.....i keep getting a device is busy.

    I check the USB device using cat /proc/scsi/scsi and it seems to dectect it as scsi device everytime I put in the usb stick it detects it as scsi1 scsi4 or scsi5 etc etc.......

    Can anyone tell me what I'm doing wrong. How can I mount it everytime with no problems and then umount it. By the way the usb stick is 2.0 the laptop has only usb 1.0 ports.


Comments

  • Registered Users, Registered Users 2 Posts: 1,419 ✭✭✭nadir


    perhaps it isnt being picked up properly
    if you cat /var/log/kern.log

    and have a look at the address.

    for example
    Sep 8 20:37:54 localhost kernel: usb 1-1

    then you can usbmodules --device /proc/bus/usb/001/001
    provided usbmodules is installed, and hotplug.

    it always assigns to the last address, as in if there is

    pkray root # ls /proc/bus/usb/002/00
    001 002 003

    the one you want is /proc/bus/usb/002/003
    dig it ;)

    That will try to manually load the correct module.

    lsmod before and after, and see if there is any difference.
    You should see modules like these
    ehci_hcd 34948 0
    uhci_hcd 33548 0
    ohci_hcd 30336 0
    usbcore 111836 6 ehci_hcd,uhci_hcd,usblp,ohci_hcd

    not all of thsoe are essential obvioulsy, but you may have either ehci_hcd
    uhci_hcd or ohci_hcd provided they are built as modules. Since its suse i presume they use a modular kernal, and dont just build everything in. This would let them support more hardware, with less bloat.
    As you correctly say it will show up as a scsi device and will be asigned a new device each time you insert it.
    This can be a bit annoying, but you can easily write a bash script to detect which device its currently at.
    The important thing is to look in the logs to see exactly whats going on.
    They will tell you which device its currently at.

    First off it will usually be /dev/sda1
    second time /dev/sda2 and so on, but like you point out it may switch to /dev/sdb1 at some point ;) and then to sdc1 ....

    It sounds strange that it just mounts it sometimes though. Ive had trouble with usb before, but I think that was more an issue of a bad motherboard than anything else. I had intermittent problems, in the end I found a happy kernel config, I believe I compiled it something like this
                                    <M> Support for USB                                                                                         
    
                                         [*]   USB verbose debug messages                                                                            
    
                                          ---   Miscellaneous USB options                                                                             
    
                                         [*]   USB device filesystem                                                                                 
                                         
                                         [ ]   Enforce USB bandwidth allocation (EXPERIMENTAL)                                                       
                                         [ ]   Dynamic USB minor allocation (EXPERIMENTAL)                                                           
                                         ---   USB Host Controller Drivers                                                                           
                                         <M>   EHCI HCD (USB 2.0) support                                                                            
                                         <M>   OHCI HCD support                                                                                      
                                         <M>   UHCI HCD (most Intel and VIA) support                                                                 
                                         ---   USB Device Class drivers                                                                              
                                         < >   USB Audio support                                                                                     
                                         < >   USB Bluetooth TTY support                                                                             
                                         < >   USB MIDI support                                                                                      
                                         < >   USB Modem (CDC ACM) support                                                                           
                                         <M>   USB Printer support                                                                                   
                                         <M>   USB Mass Storage support                                                                              
                                         [ ]     USB Mass Storage verbose debug                                                                      
    
                                         [*]     Datafab Compact Flash Reader support (EXPERIMENTAL)                                                 
                                         [ ]     Freecom USB/ATAPI Bridge support       
                                                                 
                                         [*]     ISD-200 USB/ATA Bridge support  
                                                                        
                                         [*]     Microtech CompactFlash/SmartMedia support 
                                                              
                                         [ ]     HP CD-Writer 82xx support (EXPERIMENTAL)                                                            
                                         [ ]     SanDisk SDDR-09 (and other SmartMedia) support (EXPERIMENTAL)                                       
                                         [ ]     SanDisk SDDR-55 SmartMedia support (EXPERIMENTAL)                                                   
                                         [ ]     Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)                                                  
                                         ---   USB Human Interface Devices (HID)                                                                     
                                         <M>   USB Human Interface Device (full HID) support                                                         
                                        
                                         [*] HID input layer support         
                                                                            
                                         [ ]   Force feedback support (EXPERIMENTAL)                                                                 
                                        
                                         [*] /dev/hiddev raw HID device support          
                                                                
                                             USB HID Boot Protocol drivers  --->                                                                     
    

    I'm not saying you need to recompile your kernel, I just remember that once thats what solved my probs, basically I compiled EHCI,UHCI and OHCI as modules and not built in. Maybe you will find a simpler solution.

    btw: when you unmount you jsut need to say umount /mnt/memstick
    thats all, and you more than likely shouldnt have to specify filesystem -t, it should autodetect that, but again, its worth a shot I guess.


  • Moderators Posts: 5,580 ✭✭✭Azza


    Okay its moutning now. But still not unmounting just get device is busy. Also I mistakenly thought I could mount it under a user but it still only lets me mount under root....any ideas?


  • Registered Users, Registered Users 2 Posts: 1,186 ✭✭✭davej


    You probably can't unmount it because it is your cwd. When umounting make sure you are not within the mountpoint (cd to the / directory) and make sure no other processes are are accessing the mountpoint.

    Have you got an entry in the /etc/fstab file for your stick ?

    dev/sda1 /mnt/usbstick vfat noauto,user 0 0

    This should allow non-root/system users to mount it.

    davej


Advertisement