Raw USB mass storage device access

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
General_Failure
Newbie
Newbie
Posts: 2
Joined: Sat Jun 26, 2010 7:15 pm

Raw USB mass storage device access

Post by General_Failure »

Hello. I am posting here because I can't find a simple answer for something I want to do.

I want raw device access to a USB mass storage device. A CF card to be more precise. The card is not set up in a way Linux can recognise as a mountable volume.
I just want to know two things:

how can I point Wine at the block device, and how can I give the program read/write access to it?

I know it would have been easy a long time ago, but Wine has changed a lot and I'm a little lost with its advanced configuration now.
John Drescher

Raw USB mass storage device access

Post by John Drescher »

On Sat, Jun 26, 2010 at 8:30 PM, General_Failure
<[email protected]> wrote:
Hello. I am posting here because I can't find a simple answer for something I want to do.

I want raw device access to a USB mass storage device. A CF card to be more precise. The card is not set up in a way Linux can recognise as a mountable volume.
I just want to know two things:

how can I point Wine at the block device, and how can I give the program read/write access to it?

I know it would have been easy a long time ago, but Wine has changed a lot and I'm a little lost with its advanced configuration now.
You most likely need to get linux to recognize the CF card device
before you can use it in wine.

John
Martin Gregorie

Raw USB mass storage device access

Post by Martin Gregorie »

On Sat, 2010-06-26 at 19:30 -0500, General_Failure wrote:
I want raw device access to a USB mass storage device. A CF card to be
more precise. The card is not set up in a way Linux can recognise as a
mountable volume.
Reformat it as ext2?


Martin
Gert van den Berg

Raw USB mass storage device access

Post by Gert van den Berg »

On Sun, Jun 27, 2010 at 11:46, Martin Gregorie wrote:
Reformat it as ext2?
I'm getting the idea he wants to do the equivalent of dd-type access
from within Wine?

I'm also guessing that Linux have a device for the card? (Probably no
partitions that can be mounted though, since he itendes to access the
disk, not a filesystem on top if it?)

Gert
Martin Gregorie

Raw USB mass storage device access

Post by Martin Gregorie »

On Sun, 2010-06-27 at 13:37 +0200, Gert van den Berg wrote:
On Sun, Jun 27, 2010 at 11:46, Martin Gregorie wrote:
Reformat it as ext2?
I'm getting the idea he wants to do the equivalent of dd-type access
from within Wine?
I guess we'll find out when he replies.
I'm also guessing that Linux have a device for the card?
AFAIK you can do anything to a USB storage device that you can to a
directly attached disk. I haven't tried to reformat an SD or CF card,
but I have successfully used fdisk to define a USB disk drive as a
single ext3 partition and fsck to format it as ext3.
(Probably no partitions that can be mounted though, since he itendes to access the
disk, not a filesystem on top if it?)
I'd be quite surprised if a program running in normal user space, i.e.
not as root, can do that.


Martin
Gert van den Berg

Raw USB mass storage device access

Post by Gert van den Berg »

On Sun, Jun 27, 2010 at 13:48, Martin Gregorie <[email protected]> wrote:
(Probably no partitions that can be mounted though, since he itendes to access the
disk, not a filesystem on top if it?)
I'd be quite surprised if a program running in normal user space, i.e.
not as root, can do that.
Possibly after some 'sudo chmod oga+w /dev/sda' kind of commands?

Gert
Martin Gregorie

Raw USB mass storage device access

Post by Martin Gregorie »

On Sun, 2010-06-27 at 14:09 +0200, Gert van den Berg wrote:
On Sun, Jun 27, 2010 at 13:48, Martin Gregorie <[email protected]> wrote:
(Probably no partitions that can be mounted though, since he itendes to access the
disk, not a filesystem on top if it?)
I'd be quite surprised if a program running in normal user space, i.e.
not as root, can do that.
Possibly after some 'sudo chmod oga+w /dev/sda' kind of commands?
In my system (Fedora 12) both the disk and its partitions are owned by
root and are in the disk group with ug+rw permissions, so the simplest
solution may be to add the user, where wine is run, to the disk group.

This applies to both the internal disk and a USB mass storage device. I
just plugged a key-fob camera, which uses a micro-SD card to store
images, into this laptop to check:




Martin
James McKenzie

Raw USB mass storage device access

Post by James McKenzie »

Martin Gregorie wrote:
On Sun, 2010-06-27 at 14:09 +0200, Gert van den Berg wrote:
On Sun, Jun 27, 2010 at 13:48, Martin Gregorie <[email protected]> wrote:
I'd be quite surprised if a program running in normal user space, i.e.
not as root, can do that.

Possibly after some 'sudo chmod oga+w /dev/sda' kind of commands?

In my system (Fedora 12) both the disk and its partitions are owned by
root and are in the disk group with ug+rw permissions, so the simplest
solution may be to add the user, where wine is run, to the disk group.

This applies to both the internal disk and a USB mass storage device. I
just plugged a key-fob camera, which uses a micro-SD card to store
images, into this laptop to check:

Access to raw devices within Windows is very difficult without either
special kernel level code or a specific driver. Wine supports neither
of these options. However, I'm wondering if RAW access (like that
preferred by Oracle) is possible from within Windows. It may not be
impossible to do this with Wine, but it will be very difficult.

James McKenzie
Locked