Mount USB Thumb Drive

Kitcad,

In your initial post many months (weeks?) ago you said you were running QNX 6.3. So are you running 6.3 or 6.2.1? As Thunderblade has noted, there’s a pretty big difference between the two. I don’t think io-usb existed in 6.2.1 so that’s why you can’t find it.

Search around on this board and you should be able to find the 6.2.1 commands for USB with thumb drives as I know it’s been posted before.

Tim

hi tim/thunderblade,

i dont hv 6.3 license. i was using eva version and expired already. so, i have to switch it back to 6.2.1. Thanks.

By the way, do u know which topic or link which mentioned 6.2.1 command for usb? i cant find anything which cn solve this problem.

Just do a search for io-usb. It returns among others, this thread.

openqnx.com/index.php?name=P … ight=iousb

Tim

Hi Qnx gurus…

After mounting USB on Qnx. For some of the USB(s) iam not ble to create a file/folder. When iam trying to create a file/folder it gives the message "unable to create dir/file". When i tried to change the permission of the device for (r-w-x), the permissions could not be changed.

Please help…

-HideAndSeek.

Maybe a problem with the file system on that particular device. Usually it is FAT32 and there you can do anything. Try to go to the root directory of the USB device (i.e. where you mounted it to) on the command line with cd and try to do mkdir . What error is it giving?

Regards,
Albrecht

I have tried that also. It is giving “Read-Only file system” error at the command line. I tried to change the permissions in FileManager for /mntpoint but no effect.

One more case.

I was able to create a directory on one of the USB. now even that USB is also giving me the same error now.

please help me …

advance thank you…

There is a command line option to mount (-r I think) that would cause the file system to be mounted Read-Only. Maybe this has been used?

How do you actually mount the file system? Are you using the mount command explicitly or are you using some automount features (that of io-blk.so or some external program)? Can you post the complete sequence of your driver start?

I am also not sure if the USB spec for mass storage devices allows that the device itself denies write operations when certain portions of the flash are damaged, and the devb-umass driver propagates this information to the user by the error message “Read-Only File system”. Just a thought.

Regards,
Albrecht

its as follows in Qnx terminal itself.

io-usb -d ehci -d ohci

devb-umass cam pnp

mount -t dos /dev/hd1t6 /mnt/usb

This is the sequence i am following after determining the USB partition using df.

PROBLEM OCCURS HERE:

cd /mnt/usb

mkdir folder

AT THIS POINT IT RETURNS.

mkdir : READ_ONLY FileSySte,m.

History: Earlier when i used 1GB USB, this problem did not occur. Then i used 2GB USB. The directories were created without any error. After few days when the client requirement was fixed for 1GB, this problem is arising.

Can you tell me reason. Whether some portion of USB is damaged or the driver is upgrading itself to run for USB’s with the recent Highest storage capacity.

please reply.

Thank you.

HideAndSeek,

Very strange. So your saying both USB thumb drives (the 1 and 2 gig) worked (you could create a directory) and now neither one works?

I’m assuming you’ve rebooted your QNX machine at least once?

First, I did a ‘strings * | grep “READ_ONLY”’ in /bin, /usr/bin, /sbin, /usr/sbin and that string isn’t in ANY executable anyplace. So it’s not coming from mkdir, that’s for sure. Something else in the O/S that isn’t located in any of those directories is causing the problem.

Here’s some things to try:

  1. Reboot your QNX system and after it boots issue the commands you did above. When it fails, do a ‘sloginfo’ (dump the system log file) and post what you get here as I hope the problem is getting logged there.

  2. Can you copy a file to or remove one from the usb drive? Try putting a text file there in Windows, then see if you can open it for edit in QNX (and see if you get a readonly message issued). Then try removing it from QNX etc.

Tim

Are you sure that this sequence of characters

comes from the mkdir command? Or did you type this?

Tim, I guess it says “read-only file system” and that would be the result of strerror(errno) or something which is coded in libc. That’s why you cannot find it in /sbin or the like, but rather in /lib. Or has every application the static errno strings compiled right into it? Wouldn’t make sense to me.

I dimly remember that there are conditions where mount goes automatically into read-only mode but forgot the details.

Regards,
Albrecht

Another thought: It seems you are using QNX 6.3. The latest USB patch as of April 2006 has a new io-blk.so that reasonably supports automount. Try this. I think the command line goes like this:

devb-umass cam pnp blk automount=hd1:/mnt/usb or something. Just look up the docs for io-blk.so

io-blk.so prints errors to the QNX slogger, so after the command, do

#sloginfo

to see what happend (if it didn’t work)

Are you sure that nothing else is mounted on /mnt/usb ? In QNX, you can overload path names which can indeed cause very curious behaviour.

Regards,
Albrecht

If you have QNX Neutrino 6.3 w/ Service Pack 3, CD-ROM and USB flash drives are automatically mounted for you by default. If you have a custom built Neutrino, then it is a different story. Otherwise, just put your CD in your CD-ROM or your USB flash drive into a USB port. And run “df” or “ls /fs” to see the directories where they are mounted in. Mine shows “/fs/cd0” for CD-ROM and “/fs/hd10-dos-1” for my PNY Attache 1GB USB flash drive. Run “unmount /fs/cd0” or “unmount /fs/hd10-dos-1” to unmount CD-ROM or USB flash drive, respectively. Note that your USB flash drive may not be compatible. If you find a problem, see QNX’s website for compatibility. Another thing is that I have not tried this in previous versions or SP (service pack) of QNX Neutrino. (I am a newbie to QNX) Maybe somebody can comment on that.

If you have QNX Neutrino 6.3 w/ Service Pack 3, CD-ROM and USB flash drives are automatically mounted for you by default. If you have a custom built Neutrino, then it is a different story. Otherwise, just put your CD in your CD-ROM or your USB flash drive into a USB port. And run “df” or “ls /fs” to see the directories where they are mounted in. Mine shows “/fs/cd0” for CD-ROM and “/fs/hd10-dos-1” for my PNY Attache 1GB USB flash drive. Run “unmount /fs/cd0” or “unmount /fs/hd10-dos-1” to unmount CD-ROM or USB flash drive, respectively. Note that your USB flash drive may not be compatible. If you find a problem, see QNX’s website for compatibility. Another thing is that I have not tried this in previous versions or SP (service pack) of QNX Neutrino. (I am a newbie to QNX) Maybe somebody can comment on that.