Results 1 to 8 of 8

Thread: 5.0.1 usb-storage problem.

  1. #1
    Member registered user
    Join Date
    Jul 2003
    Posts
    30

    5.0.1 usb-storage problem.

    Hi,

    I am using a HD install of 5.0.1 and am having difficulty with usb-storage when I attach my KonicaMinolta 7d to an usb port. The camera is detected and a hard disk icon appears on the screen indicating sda. When I try to mount the device, the mount fails with an error indicating all sorts of possibilities including wrong options. I look in /etc/fstab and see that the following line has been added:

    /dev/sda /media/sda vfat noauto,users,exec,umask=000,shortname=winnt,uid=kn oppix,gid=knoppix 0 0

    The uid and gid seem strange to me so I edited the line leaving instead:

    /dev/sda /media/sda vfat noauto,users,exec,umask=000,shortname=winnt 0 0

    and I can then mount the device /dev/sda and get access to my photos. I really hope that I don't have to manually change fstab every time I want access to my camera. Incidently, it all works fine when I boot from the CD.

    I haven't found the code which causes the line to be added to /etc/fstab. I was looking for a shell script that does the trick. The closest code I can find is /usr/share/knoppix-installer/templates/etc/hotplug/usb/usb-storage but I don't see how that is called. Apparently, /lib/modules/2.6.17/kernel/drivers/usb/storage/usb-storage.ko
    is executed.

    Is there a reasonable way to correct the situation? Is there something tricky like moving the script from /usr/share/knoppix-installer to a different place?

    By the way, I have read many of the injunctions against using a Knoppix hard disk install.

    Thanks in Advance,
    Don

  2. #2
    Member registered user
    Join Date
    Jun 2006
    Posts
    59
    humm, does knoppix ask for a usr name when you install it? maybe you are using a differnt usr name then knoppix. btw, fstab is initially built with the knoppix-autoconfig found in /ect/init.d. I had problems hot pluging my usb pendrive, i just boot with it pluged in and have no problems. also, how are you mounting this device? you just click on the desktop icon i would think and konqueror would do the rest. sry i'm not much more help.

  3. #3
    Member registered user
    Join Date
    Jul 2003
    Posts
    30
    I think I found out how to get it working. My first attemp, which worked was to execute the following script after the icon appeared on the screen:

    #! /bin/sh
    # This is a small script to mount the camera and
    # open emacs. When emacs is closed, the camera is
    # unmounted.
    sleep 1
    echo "sleeping 4"
    sleep 1
    echo "sleeping 3"
    sleep 1
    echo "sleeping 2"
    sleep 1
    echo "sleeping 1"
    sudo mount -t vfat /dev/sda /media/sda
    sleep 1
    emacs /media/sda/dcim
    sudo umount /dev/sda
    echo "camera is unmounted."

    Then scouring around in /etc/ I found the file /etc/udev/knoppix.rules and modified it so that it used my user id and group rather than that of knoppix. It now works as I expected it to work.

  4. #4
    Member registered user
    Join Date
    Jun 2006
    Posts
    59
    You might want to iterate like this,

    Code:
    #!/bin/bash
    for i in 5 4 3 2 1;do sleep 1; echo "sleep $i"; done
    echo "you have now waited 6 seconds... Yippie!!"
    
    # insert commands here :)
    exit
    But the question remains... if you just wait for 6 secs, does clicking on the desktop icon that appears work? If not, I should find out why... could be the udev device management (which is cool and IBM supported so I don't mind looking into it ) and KDE.

  5. #5
    Member registered user
    Join Date
    Jul 2003
    Posts
    30
    If I change /etc/udev/knoppix.rules to use my userid and group, rather than "-u knoppix -g knoppix", then clicking on the icon works. Otherwise, the mount fails because of the userid and group of "knoppix".

    When I am running from the Knoppix CD, it works because the user is "knoppix". I think that the knoppix-install script overlooked changing this the knoppix.rules file.

  6. #6
    Member registered user
    Join Date
    Jun 2005
    Posts
    51
    Ok, good work finding out this /etc/udev/knoppix.rules thing.

    But what can i do when i want to have multi-user system...?

  7. #7
    Member registered user
    Join Date
    Jun 2006
    Posts
    59
    wow posmanet, i read your 11 posts and i don't see where I talked to you... but whatever, udev rules run as root. You could make rules which call script that either su to a lower permission level or check for current user in the case of new device after init boot. Is that what you are asking?

  8. #8
    Member registered user
    Join Date
    Jun 2005
    Posts
    51
    Hello Zrebel,

    sorry if You were irritated by my direct entrance in this discussion - i just wanted to say something like:
    "Oh, wow, yes, i've had the same problem and already tried to solve it myself - now i searched on this forum for it and promptly found the solution here, and i'm happy about this!"

    ...for the multiuser thing: Yes, calling a script sounds plausible for me and its new to me that this is possible with the udev stuff. (I'm the classical fixed-fstab guy and didnt read much yet about udev.). Thanks for the tip.

    Greetings

Similar Threads

  1. USB storage device
    By jjbergdolt in forum Hardware & Booting
    Replies: 19
    Last Post: 07-29-2005, 06:08 AM
  2. usb-storage
    By jjbergdolt in forum Hardware & Booting
    Replies: 0
    Last Post: 07-23-2005, 05:08 PM
  3. usb-storage
    By tommy in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 10-22-2004, 07:37 AM
  4. usb mass storage problem
    By hadrien001 in forum Hdd Install / Debian / Apt
    Replies: 8
    Last Post: 06-03-2003, 07:30 PM
  5. data storage
    By Sucker in forum General Support
    Replies: 1
    Last Post: 02-03-2003, 09:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$13.99



HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture

HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin

$12.90



A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G picture

A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G

$13.99



HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM picture

HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM

$9.64



Lot of 2 32GB DDR4 2666 PC4-21300 SODIMM RAM Modules Mixed Brand picture

Lot of 2 32GB DDR4 2666 PC4-21300 SODIMM RAM Modules Mixed Brand

$60.00



Samsung 16GB 2Rx4 PC4-2400 RDIMM DDR4-19200 ECC REG Registered Server Memory RAM picture

Samsung 16GB 2Rx4 PC4-2400 RDIMM DDR4-19200 ECC REG Registered Server Memory RAM

$20.99



Samsung 128GB (4x 32GB) M86B4G70DM0-CMA3 PC3-14900L 4Rx4 DDR3 ECC Reg Server Mem picture

Samsung 128GB (4x 32GB) M86B4G70DM0-CMA3 PC3-14900L 4Rx4 DDR3 ECC Reg Server Mem

$39.99



8GB PC3L-12800S 1600MHz SODIMM DDR3 RAM | Grade A picture

8GB PC3L-12800S 1600MHz SODIMM DDR3 RAM | Grade A

$12.00



A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM picture

A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM

$287.96



A-Tech 128GB 2x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM picture

A-Tech 128GB 2x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM

$143.98