Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
60 user(s) are online (52 user(s) are browsing Forums)

Members: 0
Guests: 60

more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
usb storage question
Quite a regular
Quite a regular


See User information
I hope it's the rigth forum for this question:
there are 2 type of usb disk-on-keys.

1. Storage only, can have one or more partitions. Under Linux recognized as /dev/sd(something)1

2. Usually a mp3 player, has "no partition", under Linux seen as /dev/sd(something).

How do I mount the later under AOS4? Nothing interesting in t:usb.log


Thanks,
Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: usb storage question
Home away from home
Home away from home


See User information
@Jack

I had the impression that when the OS4 USB stack doesn't
automatically mounts a device by startup you won't be able
to use it (yet).

Using a "mounter" kind of programs afterwards doesn't work
with USB ... or am i completely mistaken here?

Go to top
Re: usb storage question
Quite a regular
Quite a regular


See User information
@Raziel

Quote:

I had the impression that when the OS4 USB stack doesn't
automatically mounts a device by startup you won't be able
to use it (yet).


Grrr... Means the Iriver and Swimp3 will be reloaded only via Linux...


Quote:

Using a "mounter" kind of programs afterwards doesn't work
with USB ... or am i completely mistaken here?


Isn't mounter for scsi?
usb-storage isn't wrapped by scsi like in linux afaik

Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: usb storage question
Home away from home
Home away from home


See User information
@Jack

"automatically mounts a device by startup"
grrr, scrap the "by startup" bit, i meant by plugging it in
OR on startup (when already plugged in)

mounter

yes, bad example (as it is already covered in the now
edited part of my first answer)

sorry bout that

Go to top
Re: usb storage question
Just popping in
Just popping in


See User information
@Jack

The Mounter is for every removable partitioned storage
medium (SCSI, IDE, SATA etc) except for USB. The mounter
for partitioned and unpartitioned USB media is
usbmassstorage.usbfd, when Utilities/USBInspector shows
a massstorage medium with a loaded driver its very likely
that typing Ctrl-Alt-M or using Commodities Exchange will
bring up the MassStorage commodity which shows media,
partitions and filesystem types and offers formatting.
What does it display for the drive in question?

Go to top
Re: usb storage question
Quite a regular
Quite a regular


See User information
@TetiSoft

Quote:

MassStorage commodity which shows media


Can't find it here (used "find" - no avail. )



TIA,
Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: usb storage question
Not too shy to talk
Not too shy to talk


See User information
@Jack

The MassStorage commodity is created at runtime from the USB-Stack, but only if a MassStorageDevice is attached to USB.

Go to top
Re: usb storage question
Just can't stay away
Just can't stay away


See User information
Hi@ZeroG

...but only if a MassStorageDevice is attached to USB.

Erm, the 'Final' edition doesn't work MSD very well. If the USB memory stick is installed in the hub before cold boot, I get a mounting error ; this never happened before. I've actually have gotten a 'babble' error message! OK, I think Detlef mentioned a stack size problem with USB. Who and what can I change??

Go to top
Re: usb storage question
Just can't stay away
Just can't stay away


See User information
@Jack

Use Commodities/Exchange to access it.

Resized Image

Go to top
Re: usb storage question
Not too shy to talk
Not too shy to talk


See User information
@Snuffy

Hi.
Quote:

Erm, the 'Final' edition doesn't work MSD very well.

You dont have 'July' installed???

Quote:

If the USB memory stick is installed in the hub before cold boot, I get a mounting error ; this never happened before. I've actually have gotten a 'babble' error message! OK, I think Detlef mentioned a stack size problem with USB. Who and what can I change??


How does your T:usb.log look?

Assumed that you use July:
Sounds like you have July-Update or USB-HW problems.
Try to copy the USB-Files from 'Final' over 'July' and see what happens.

BTW: Have you send your usb.log to Detlef?

Go to top
Re: usb storage question
Just popping in
Just popping in


See User information
@Jack

Quote:

Quote:

MassStorage commodity which shows media

Can't find it here (used "find" - no avail. )

Then read again what I wrote:
Quote:

when Utilities/USBInspector shows
a massstorage medium with a loaded driver its very likely
that typing Ctrl-Alt-M or using Commodities Exchange will
bring up the MassStorage commodity

When USBInspector doesnt show a massstorage device
have a look at T:USB.log. When this doesnt show the
attempt to use a massstorage device, enable Info logging
with Prefs/USB. When this crashes edit ENVRC:USB/System/LOGINFO
by hand (set to 1). When your A1 has no USB fix, the
behaviour when attching an USB device is undefined.

Go to top
Re: usb storage question
Just can't stay away
Just can't stay away


See User information
@ZeroG

You dont have 'July' installed???
Well, yes I think that's were it starts.

BTW: Have you send your usb.log to Detlef?
Yeh, I posted it at YahooOS4ML.

Sounds like you have July-Update or USB-HW problems.

No, the SanDisk worked fine for the last three years before the update.

Go to top
Re: usb storage question
Quite a regular
Quite a regular


See User information
@TetiSoft & ZeroG



Yup. It is there when a recognizable media is present. I wrongly assumed the commodity is an external standalone app...

I enabled all the logging, and (probably independently) swimp3 appeared there but as "unitialized", regardless it's set to "auto" (usb1c:) or "fat" (usb2:) filesystem (it is initialized btw, and contains data).
Size is correct.

t:usb.log's tail:

sd_RequestType: 0x80
sd_Request : 0x06
sd_Value : 0x0002
sd_Index : 0x0000
sd_Length : 0x0A00
W: [69A7F920][USB FD fkt start] | USBFktGetCfgDescriptors | Error reading config dsc from Fkt 0x6A29C9C0
E: [69A7F920][USB FD fkt start] | USBFktGetCfgDescriptors | Failed to read config from Fkt 0x6A29C9C0 - error -35
E: [69A7F920][USB FD fkt start] | FD launcher | Failed to read CfgDsc

thanks,
Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: usb storage question
Just popping in
Just popping in


See User information
@Jack

Quote:

2. Usually a mp3 player, has "no partition", under Linux seen as /dev/sd(something).
How do I mount the later under AOS4? Nothing interesting in t:usb.log
...
swimp3 appeared there but as "unitialized", regardless it's set to "auto" (usb1c:) or "fat" (usb2:) filesystem (it is initialized btw, and contains data).
Size is correct.

Ok, now we know that neither Linux nor OS4 do believe that
the medium contains a valid MBR, and we know that
CrossDOSFileSystem also believes that the medium is not
an unpartitioned FAT12/FAT16/FAT32 medium. Does Linux
believe its using FAT? If yes, which blocksize? If no,
why should OS4 be able to handle such a proprietary file
system?

Go to top
Re: usb storage question
Quite a regular
Quite a regular


See User information
@TetiSoft
Quote:

Ok, now we know that neither Linux nor OS4 do believe that
the medium contains a valid MBR, and we know that


No MBR: correct.
Linux can access it (the whole disk as a block device using FAT instead of accessing block device that represents a single partition).

Quote:

CrossDOSFileSystem also believes that the medium is not
an unpartitioned FAT12/FAT16/FAT32 medium. Does Linux
believe its using FAT? If yes, which blocksize?


I can query the parameters of the medium.
Can I tell OS4 to mount the whole device? (like one can mount trackdisk.device, with propper block/whatever sizes/numbers, like telling Linux to mount /dev/sdb instead of /dev/sdb1).
Will experiment with it when I'll have a chunk of time...

Imho MBR-less usb storage is common enough to be implemented "out of the box" in OS4 (as far as I know lot of flash-based mp3 players are MBR-less).

Jack

Edit: typos


Edited by Jack on 2007/10/7 21:29:39
Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: usb storage question
Just popping in
Just popping in


See User information
@Jack

Quote:

Linux can access it (the whole disk as a block device using
FAT instead of accessing block device that represents a
single partition).

Thanks for the info. Then CrossDOSFileSystem _should_ be
able to access it too...

Quote:

Can I tell OS4 to mount the whole device? (like one can mount trackdisk.device, with propper block/whatever sizes/numbers, like telling Linux to mount /dev/sdb instead of /dev/sdb1).
Will experiment with it when I'll have a chunk of time...

Yes, when the filesystem selector in the massstorage commodity
is set to "FAT" (or "Default"), the complete medium is
mounted as-is, with LowCyl 0.

Quote:

Imho MBR-less usb storage is common enough to be
implemented "out of the box" in OS4 (as far as I know lot
of flash-based mp3 players are MBR-less).

AFAIK this works with at least some mediums...

You can experiment with mountlists, different filesystems
etc. When e.g. the commodity shows "USB0" as device,
"MountInfo USB0:" will create a mountlist for the
complete medium, when its "USB1C" then "MountInfo USB1C"
will create a mounlist for the first partition of a
MBR-partitioned medium etc. Caution: CrossDOSFileSystem
actively modifies the LowCyl, HighCyl and Interleave values,
so those may _not_ match the real values which were used
by massstorage.usbfd for mounting, to be sure to get better
values, set the filesystem selector to FFS or SFS first
(dont format of course) and change the DOSType.

When you have mountlists, you can try to use them with different
versions of CrossDOSFileSystem, FAT95 or XFSD. You can also
try to use MountDOS from Aminet when the medium is smaller
than 2 or 4 GB (MountDOS doesnt support NSD...) to get
mountlists.

Hope it helps...

Go to top
Re: usb storage question
Quite a regular
Quite a regular


See User information
@TetiSoft

Thanks for the extensive info.
Will have to carve out a time for it (motivation --- exists, time --- doesn't)

Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: usb storage question
Quite a regular
Quite a regular


See User information
@TetiSoft

Quote:

when its "USB1C" then "MountInfo USB1C"
will create a mounlist for the first partition of a
MBR-partitioned medium etc. Caution: CrossDOSFileSystem
actively modifies the LowCyl, HighCyl and Interleave values,
so those may _not_ match the real values which were used
by massstorage.usbfd for mounting, to be sure to get better
values, set the filesystem selector to FFS or SFS first
(dont format of course) and change the DOSType.


Ok, the swimp3 is actually with MBR, fat16, linux reports:
16 heads 56 sectors/track, 571 cylinders
first partition is fat16,
there's also a warning about different physical/logical beginnings/endings:
physical: 0,1,44, logical: 0,1,52
physical: 755,15,0 logical: 571,6,48

I assume that dostype should be 0x46415400. Or 16 instead of 00?
Should I follow physical or logical mapping?
Should the "Interleave" match the highest cylinder?
Need an advice on the arithmetics...

Also tried to generate mountinfo for usb0c: in ffs mode, but when MBR is shown, can't switch the fs type.

Here's the mountinfo for the device as it appears in the commodity:
Quote:

/* USB0C: (08/10/07 09:27) */
Surfaces = 1
SectorsPerTrack = 1
Interleave = 511999
LowCyl = 107
HighCyl = 511999
Buffers = 200
BufMemType = 1
DosType = 0x46415432
Device = usbdisk.device
FileSystem = L:CrossDOSFileSystem
GlobVec = -1


Edit: also tried the original mountlist with 00 and 16 at the end of Dostype, no avail.
The other player (iriver t10) doesn't show up in the commodity, althought an attachment window pops up
TIA,
Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top
Re: usb storage question
Just popping in
Just popping in


See User information
@Jack

Quote:

Ok, the swimp3 is actually with MBR, fat16, linux reports:
16 heads 56 sectors/track, 571 cylinders
first partition is fat16,
there's also a warning about different physical/logical beginnings/endings:
physical: 0,1,44, logical: 0,1,52
physical: 755,15,0 logical: 571,6,48

I assume that dostype should be 0x46415400. Or 16 instead of 00?

A "FAT" DosType is no standard AFAIK. CrossDOSFileSystem
may work with it but the PC0 mountlist uses 0x4D534400
("MSD") and massstorage.usbfd uses "FAT2" 0x46415432 which
ensures that formatting is tried in FAT32 mode first.

Quote:

Should I follow physical or logical mapping?

massstorage.usbfd happily ignores physical track/head/sector
values because those are outdated since many years.
I dont know if CrossDOSFileSystem uses physical or
logical values, eventually it even contains a check
that both must match somehow and refuses to work with
this broken MBR while Linux contains some magic code
which selects the most reasonable alternative?

Quote:

Should the "Interleave" match the highest cylinder?

As already written CrossDOSFileSystem modifies it anyway.
massstorage.usbfd does not specify Interleave at all and
a standard AmigaOS filesystem ignores this.

Quote:

Need an advice on the arithmetics...

For a "normal" Amiga filesystem only LowCyl and HighCyl
are important, and when LowCyl is 0 then HighCyl is ignored
and the whole medium is used. For CrossDOSFileSystem
AFAIK _both_ LowCyl and HighCyl are completely ignored,
it always uses the complete medium when the device name
doesnt end with a letter from C to Z, when it ends with
"C" it uses the first MBR partition etc.

In your example with 56 sectors/track and "logical: 0,1,52"
I'd calculate the start of the first partition to be at
sector 0 head 1 track 52 = 1*56+52=108. The mountlist
as modified by CrossDOS says LowCyl 107, not 108, strange...

When the player doesnt contain important data and has
an option to format the medium in case he cant understand it,
I'd simply try to partition and format the medium from some
OS which knows how to create a valid MBR, e.g. Linux or Windows,
and not the builtin player firmware...

Quote:

Also tried to generate mountinfo for usb0c: in ffs mode, but when MBR is shown, can't switch the fs type.

The massstorage commodity doesnt allow you to try to switch
the filesystem of a partition on an MBR-partitioned medium
to something which is not FAT. It would not work. FFS only
works with RDB-partitioned media or with flat media.
You are only allowed to switch to FFS after selecting the
MBR entry, which implies that the MBR would be destroyed
after formatting with FFS and that you are aware of that.

Quote:

The other player (iriver t10) doesn't show up in the commodity, althought an attachment window pops up

USBInspector and T:USB.log may help to find out whats wrong here.

Go to top
Re: usb storage question
Quite a regular
Quite a regular


See User information
@TetiSoft

Quote:

When the player doesnt contain important data and has
an option to format the medium in case he cant understand it,
I'd simply try to partition and format the medium from some
OS which knows how to create a valid MBR, e.g. Linux or Windows,
and not the builtin player firmware...


I won't do it unless I find an indication that the firmware won't be lost while rewriting the mbr (the player is too expensive, it's waterproof).
Luckily I have some linuces around to hook it up...
Meanwhile I will experiment with mountlists, the letter at the end is very important piece of info (I wondered why there's always a "C" at the end of volume name when mr is used).
Just tried the 108, and it didn't work.

BTW: mediatoolbox reports these physical values:
8000 cylinders, 16, sectors, 4 heads
And logical size:
64 blocks per cylinder
8000 cylinders...

iriver info will follow later...

Thanks for helping
Jack

Resized Image
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project