usb memory stick trouble - BSD

This is a discussion on usb memory stick trouble - BSD ; i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt. i get a message operation not permitted. Can anyone say whats wrong here please?...

+ Reply to Thread
Results 1 to 7 of 7

Thread: usb memory stick trouble

  1. usb memory stick trouble

    i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt.

    i get a message operation not permitted. Can anyone say whats wrong here
    please?

  2. Re: usb memory stick trouble

    SamG wrote:
    > i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt.
    >
    > i get a message operation not permitted. Can anyone say whats wrong here
    > please?


    Some usb sticks have problems with FreeBSD. There are usb errors and
    things go astray. Look at your dmesg. I had just this problem today with
    a stick which works OK on a Linux machine - and my other sticks work OK
    on my FreeBSD machine! Clearly the usb support in FreeBSD is very
    subpar. It is quite easy to panick the machine with non working sticks.



    --

    Michel TALON


  3. Re: usb memory stick trouble

    On Tue, 05 Aug 2008 16:20:00 +0100, SamG wrote:

    > i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt.
    >
    > i get a message operation not permitted. Can anyone say whats wrong here
    > please?


    1) Check BIOS settings. Make sure that _all_ USB ports on your
    motherboard are ENABLED.

    2) If your USB sockets are built into the computer case, make sure that
    these sockets are physically connected to the motherboard inside the case
    and that they are correctly connected.

    3) Make sure your system is configured for USB devices as per Handbook:
    http://www.freebsd.org/doc/en_US.ISO...usb-disks.html
    Read the above web page carefully. There is a lot of info there, none of
    which can be ignored.

    4) Try a different USB stick (Different Make/Model) just in case the one
    you have is faulty or incompatible.

    5) Pay attention to the messages displayed by command: dmesg
    when you plug in and unplug your USB stick.



  4. Re: usb memory stick trouble

    On Tue, 05 Aug 2008 16:20:00 +0100
    SamG wrote:

    > i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt.
    >
    > i get a message operation not permitted. Can anyone say whats wrong here
    > please?


    Perhaps you have the security level set too high to allow the
    loading of the msdosfs kernel module. What does sysctl kern.securelevel
    say ?

    --
    C:>WIN | Directable Mirror Arrays
    The computer obeys and wins. | A better way to focus the sun
    You lose and Bill collects. | licences available see
    | http://www.sohara.org/

  5. Re: usb memory stick trouble

    Steve O'Hara-Smith wrote:
    > On Tue, 05 Aug 2008 16:20:00 +0100
    > SamG wrote:
    >
    >> i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt.
    >>
    >> i get a message operation not permitted. Can anyone say whats wrong here
    >> please?

    >
    > Perhaps you have the security level set too high to allow the
    > loading of the msdosfs kernel module. What does sysctl kern.securelevel
    > say ?
    >

    i used a different memory stick and it worked. i think the problem may
    have had something to do with the filesystem on it. Thanks anyway.

  6. Re: usb memory stick trouble

    SamG wrote:
    > Steve O'Hara-Smith wrote:
    > > On Tue, 05 Aug 2008 16:20:00 +0100
    > > SamG wrote:
    > >
    > >> i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt.
    > >>
    > >> i get a message operation not permitted. Can anyone say whats wrong here
    > >> please?

    > >
    > > Perhaps you have the security level set too high to allow the
    > > loading of the msdosfs kernel module. What does sysctl kern.securelevel
    > > say ?
    > >

    > i used a different memory stick and it worked. i think the problem may
    > have had something to do with the filesystem on it. Thanks anyway.


    I don't think the problem is about the filesystem on the stick, it is
    about the stick itself, the way in which it interacts with the usb
    controller. Apparently Windows and Linux are more tolerant on
    irregularities in the protocol it speaks than FreeBSD. So well behaved
    sticks work well in FreeBSD but others can do anything including
    panicing the machine.

    --

    Michel TALON


  7. Re: usb memory stick trouble

    SamG wrote:
    +---------------
    | i try to mount my memory stick by root # mount_msdosfs /dev/da0s1 /mnt.
    | i get a message operation not permitted. Can anyone say whats wrong here
    | please?
    +---------------

    Look to see whether "/dev/da0s1" [what I see on FBSD 4.10 on my laptop]
    actually *exists* or whether "/dev/da0" is all you have [which is all I
    see with FBSD 6.2 on an Asus MB]. The device must already be plugged in
    when you look [and/or compare with the console message you got when you
    plugged it in -- did it say "da0s1 at umass-sim0 bus N" or did it say
    "da0 at umass-sim0 bus N"?]. If the latter, then you'll need to use just:

    # mount_msdosfs /dev/da0 /mnt

    [By the way, you probably want to "mkdir /mnt/flash" and use that
    instead, so you don't tie up "/mnt" altogether if something hangs.]

    Note that I've found that FreeBSD is *very* finicky -- no, flat-out
    *fragile*! -- about the exact sequence of unmounting & removing USB
    flash drives. The following is the *only* sequence I've found that works
    reliably on 6.2 [note: my chosen mount point is "/cf", not "/mnt/cf"]:

    sync ; sync
    if umount -v /dev/da0
    then
    sync ; sync
    echo /cf unmounted
    camcontrol eject da0 -v
    echo 'CAUTION: *MUST* REMOVE USB FLASH DRIVE NOW!'
    else
    echo /cf failed to unmount! Try again!
    fi

    Two things to note:

    1. On my system, trying to use "umount -v -t msdos /dev/da0" *FAILS* to
    actually unmount the device, even though there's no error reported.
    If you *either* "camcontrol eject" *or* unplug the device at that
    point, that USB port [and that "umass" unit] are now wedged, and if
    you try to access the mount point the system can suddenly crash/reboot.
    [Just happened to me quite recently, actually!! ;-} ] You must use a
    plain "umount -v /dev/da0" [no "-t" option] for the mount to succeed.

    2. Once you've done the "camcontrol eject da0", you *MUST* remove
    the flash drive before doing anything else with the device!

    [Well, you can do a "camcontrol load da0" and then mount again, but
    you *can't* just mount again without either that or a remove/insert!]

    But if I obey the above sequence *exactly*, then I can plug & unplug
    USB flash drives multiple times per reboot with no problems.


    -Rob

    -----
    Rob Warnock
    627 26th Avenue
    San Mateo, CA 94403 (650)572-2607


+ Reply to Thread