CompactFlash geometries ?

  • Thread starter Thread starter Quentin David Jones
  • Start date Start date
Q

Quentin David Jones

Greetings all,

We are using CompactFlash disks here, various brands, currently Apacer.

We find that the drive geometry varies even for the same make and model -
e.g. a single batch of Apacer 256M has two different geometries :

Cyl 980; T/Cyl 16; S/T 32; B/S 512 (501760 sectors)
and
Cyl 31; T/Cyl 255; S/T 63; B/S 512 (498015 sectors)

This variation sometimes causes us problems when using image write to setup
the Flash. Sometimes combinations will work with an image write even though
geometry is different, yet sometimes two disks which are the same size will
have different geometries and fail to work when written with an image,

Very odd.

Why do they vary?
Anyone have any details on CompactFlash geometries?
Is it possible to CHANGE the geometry of a Flash?

Quentin
 
Previously Quentin David Jones said:
Greetings all,
We are using CompactFlash disks here, various brands, currently Apacer.
We find that the drive geometry varies even for the same make and model -
e.g. a single batch of Apacer 256M has two different geometries :
Cyl 980; T/Cyl 16; S/T 32; B/S 512 (501760 sectors)
and
Cyl 31; T/Cyl 255; S/T 63; B/S 512 (498015 sectors)
This variation sometimes causes us problems when using image write to setup
the Flash. Sometimes combinations will work with an image write even though
geometry is different, yet sometimes two disks which are the same size will
have different geometries and fail to work when written with an image,
Very odd.
Why do they vary?
Anyone have any details on CompactFlash geometries?
Is it possible to CHANGE the geometry of a Flash?

Compact flash does not have a geometry. The geometry is artificially
generated by the BIOS or OS and may therefore change with the size.
Compact flash is an LBA media, basically a sequence of sectors and
each has a single number. Fix: Hmm. Depends on what does the
geometry-emulation. If it is the OS, then tell it to do LBA.

Arno
 
Quentin David Jones said:
Greetings all,

We are using CompactFlash disks here, various brands, currently Apacer.

We find that the drive geometry varies even for the same make and model - e.g. a single batch of
Apacer 256M has two different geometries :

Cyl 980; T/Cyl 16; S/T 32; B/S 512 (501760 sectors)
and
Cyl 31; T/Cyl 255; S/T 63; B/S 512 (498015 sectors)
The latter is the default for Windows 2000 and later, H=255 and S=63,
when the drive does not have BIOS Int13 support.

Does the USB CF reader have a driver? If so, it assigns geometry.
If not, it may come from the CHS in the partition table of MBR.
 
Thanks for reply :-)

Arno Wagner said:
Compact flash does not have a geometry. The geometry is artificially
generated by the BIOS or OS and may therefore change with the size.
Compact flash is an LBA media, basically a sequence of sectors and
each has a single number. Fix: Hmm. Depends on what does the
geometry-emulation. If it is the OS, then tell it to do LBA.

OK, I'll look more closely at the OS and BIOS options.

We are using an IDE interface to the flash, with Win2000, on a P4VMM2
mainboard with AMIBIOS and Via VT8751 and VT8233 chipset.

(The odd thing is that two Flashes of the SAME size, make and model can give
different geometries.)

Q.
 
Thanks Eric,

Eric Gisin said:
The latter is the default for Windows 2000 and later, H=255 and S=63,
when the drive does not have BIOS Int13 support.

Hmm, why do you think we get two different geometries for the same size,
make and model?

Does the USB CF reader have a driver? If so, it assigns geometry.
If not, it may come from the CHS in the partition table of MBR.

No, we are using a plain IDE interface to the CompactFlash - a 40 wire IDE
cable leading to an adaptor with no chips on it at all.

I'll look further into the BIOS and the MBR etc. and report later.

Thanks guys,

Quentin
 
Previously Quentin David Jones said:
Thanks for reply :-)
OK, I'll look more closely at the OS and BIOS options.
We are using an IDE interface to the flash, with Win2000, on a P4VMM2
mainboard with AMIBIOS and Via VT8751 and VT8233 chipset.

Do I understand this correctly that you have to insert the flash before
booting and leave it in until shutdown? If so, you need to set the
LBA option in the BIOS on each change of drive.
(The odd thing is that two Flashes of the SAME size, make and model
can give different geometries.)

If it is the same number of sectors, then this is definitely odd...

Arno
 
Hiya Arno,

A long post, summary at end.

Arno Wagner said:
Do I understand this correctly that you have to insert the flash before
booting and leave it in until shutdown? If so, you need to set the
LBA option in the BIOS on each change of drive.

Yes, using this IDE interface does not allow hot-plug.
We insert each Flash before power on, and power-off before removing it.

The BIOS is and was set to Auto,
and when I now select User mode with Auto-detect, it shows LBA on.

If it is the same number of sectors, then this is definitely odd...

Before writing the image, there were two different LBA totals :
501760
vs
498015
But AFTER writing an image, they all have the SAME geometry
(the same as the Flash used to create the image.)

Just to recap the process -
I had 12 Flashes, brand new,
I prepared one Flash by formatting and loading the files,
(this original Flash had the 980 Cyl. geometry)
then I saved this Flash image for writing to the remainder
(using an image utility developed here, not by me)
The BIOS was set to Auto during this process.
(I did not observe the BIOS geometry during this process.)


As I went through the process of writing the image to each Flash,
I noticed that BEFORE the image write some had this geometry :
Cyl 980; T/Cyl 16; S/T 32; B/S 512 (501760 sectors)
and others had this geometry :
Cyl 31; T/Cyl 255; S/T 63; B/S 512 (498015 sectors)
(this geometry was reported by our image writer before writing.)

Now, having written an image based on the Cyl.980 geometry
all my Flashes report as the Cyl.980 geometry.

So, in summary -
UNFORMATTED Flashes reported two different geometries to the Win2000
but now
the Flashes loaded with an image report the SAME geometry
(makes sense - it's the same as the original Flash geometry.)


Latest news :
=========
I have now done some further tests with a new batch of BRAND NEW un-written
Flashes of the same make, model and size :

If I put in a new Flash, BIOS shows the Cyl.980 geometry,
when I power-off and insert another Flash
and reboot into BIOS again,
it stills shows the Cyl.980 geometry.
I did this for six new un-written Flashes.

Then,
I removed the Flash,
booted into BIOS with NO Flash,
used auto-detect which showed Not Installed
then set it back to Auto,
then rebooted into Win2000
(so the BIOS sees no drive at all in that location.)
Then,
I powered-off, inserted another un-written Flash,
booted into BIOS and auto-detect to check the geometry.
I did this cycle two times,
the BIOS still detects as the 980.Cyl geometry.

Next,
I tried another approach -
I inserted a new un-written Flash,
with the BIOS set to Auto
booted into Win2000,
used my Image writer to check the geometry
and the first one I tried reported the Cyl.31 geometry!
Then,
I rebooted into BIOS and it detected it as Cyl.980 geometry
then
I rebooted to Win2000 and it showed as Cyl.980 geometry to the OS!


Summary
======

The BIOS seems to always manually auto-detect as the Cyl.980 geometry,
both for un-written and written Flashes.
(By manual auto-detect I mean: Disk type set to "User" and "Enter" pressed
in BIOS to auto-detect.
This is distinct from the having BIOS set to "Auto" and booting straight
thru into Win2000.)

But,
the Win2000 OS sometimes reports the Cyl.31 geometry
and sometimes the Cyl.980 geometry for un-written Flashes,
yet always reports the Cyl.980 geometry for written Flashes.

Final oddity -
I just tried a new Flash, did a manual auto-detect in BIOS
and the BIOS reported the Cyl.980 geometry,
then
I booted into Win2000 and my image utility reported
the Cyl.31 geometry !

In other words - a single new UN-written Flash may report different geometry
in the BIOS than the OS.

Bizarre.

Q.
 
Thanks for reply :-)



OK, I'll look more closely at the OS and BIOS options.

We are using an IDE interface to the flash, with Win2000, on a P4VMM2
mainboard with AMIBIOS and Via VT8751 and VT8233 chipset.

(The odd thing is that two Flashes of the SAME size, make and model can give
different geometries.)

Different firmware revisions on the CF drive, I'll bet.
 
Previously Quentin David Jones said:
Hiya Arno,
A long post, summary at end.
Yes, using this IDE interface does not allow hot-plug.
We insert each Flash before power on, and power-off before removing it.
The BIOS is and was set to Auto,
and when I now select User mode with Auto-detect, it shows LBA on.
Before writing the image, there were two different LBA totals :
501760
vs
498015
But AFTER writing an image, they all have the SAME geometry
(the same as the Flash used to create the image.)
Just to recap the process -
I had 12 Flashes, brand new,
I prepared one Flash by formatting and loading the files,
(this original Flash had the 980 Cyl. geometry)
then I saved this Flash image for writing to the remainder
(using an image utility developed here, not by me)
The BIOS was set to Auto during this process.
(I did not observe the BIOS geometry during this process.)

As I went through the process of writing the image to each Flash,
I noticed that BEFORE the image write some had this geometry :
Cyl 980; T/Cyl 16; S/T 32; B/S 512 (501760 sectors)
and others had this geometry :
Cyl 31; T/Cyl 255; S/T 63; B/S 512 (498015 sectors)
(this geometry was reported by our image writer before writing.)
Now, having written an image based on the Cyl.980 geometry
all my Flashes report as the Cyl.980 geometry.
So, in summary -
UNFORMATTED Flashes reported two different geometries to the Win2000
but now
the Flashes loaded with an image report the SAME geometry
(makes sense - it's the same as the original Flash geometry.)

Latest news :
=========
I have now done some further tests with a new batch of BRAND NEW un-written
Flashes of the same make, model and size :
If I put in a new Flash, BIOS shows the Cyl.980 geometry,
when I power-off and insert another Flash
and reboot into BIOS again,
it stills shows the Cyl.980 geometry.
I did this for six new un-written Flashes.
Then,
I removed the Flash,
booted into BIOS with NO Flash,
used auto-detect which showed Not Installed
then set it back to Auto,
then rebooted into Win2000
(so the BIOS sees no drive at all in that location.)
Then,
I powered-off, inserted another un-written Flash,
booted into BIOS and auto-detect to check the geometry.
I did this cycle two times,
the BIOS still detects as the 980.Cyl geometry.
Next,
I tried another approach -
I inserted a new un-written Flash,
with the BIOS set to Auto
booted into Win2000,
used my Image writer to check the geometry
and the first one I tried reported the Cyl.31 geometry!
Then,
I rebooted into BIOS and it detected it as Cyl.980 geometry
then
I rebooted to Win2000 and it showed as Cyl.980 geometry to the OS!


The BIOS seems to always manually auto-detect as the Cyl.980 geometry,
both for un-written and written Flashes.
(By manual auto-detect I mean: Disk type set to "User" and "Enter" pressed
in BIOS to auto-detect.
This is distinct from the having BIOS set to "Auto" and booting straight
thru into Win2000.)
But,
the Win2000 OS sometimes reports the Cyl.31 geometry
and sometimes the Cyl.980 geometry for un-written Flashes,
yet always reports the Cyl.980 geometry for written Flashes.
Final oddity -
I just tried a new Flash, did a manual auto-detect in BIOS
and the BIOS reported the Cyl.980 geometry,
then
I booted into Win2000 and my image utility reported
the Cyl.31 geometry !
In other words - a single new UN-written Flash may report different geometry
in the BIOS than the OS.

There is one other option. The flashes may actually be of different size.
Maybe the manufacturer could not get enough flash chips and mixed two
batches.

Arno
 
Compact flash does not have a geometry. The geometry is artificially
generated by the BIOS or OS and may therefore change with the size.
Compact flash is an LBA media, basically a sequence of sectors and
each has a single number.

So it is with harddrives. Babblebot utterly clueless, as always.
Fix: Hmm. Depends on what does the geometry-emulation.

Like the drive controller, maybe, babblebot?
If it is the OS, then tell it to do LBA.

Yeah, really simple that. Simpleton.
 
Do I understand this correctly that you have to insert the flash before
booting and leave it in until shutdown? If so, you need to set the
LBA option in the BIOS on each change of drive.

Babblebot hasn't got a clue, yet still has an answer.
If it is the same number of sectors, then this is definitely odd...

Nope. Nothing that says that a geometry has to completely fit the size.
Partition size though may be limited to/by the last full track depending
on what partitioning software you use.
 
Thanks for reply,
very busy, wasn't ignoring you :-)
There is one other option. The flashes may actually be of different size.
Maybe the manufacturer could not get enough flash chips and mixed two
batches.

Yes, we suspect that may be the issue.

Q.
 
Hiya,

Thanks to all for replies :-)

Missing Person said:
Different firmware revisions on the CF drive, I'll bet.

Could be,
I'll look into that too, next free moment.

Q.
 
Quentin David Jones said:
Thanks for reply,
very busy, wasn't ignoring you :-)

Doesn't change the geometry for a small difference in size: Geometry NE Size.
Geometry is only used to tell the system the offsets where to expect the File
System attributes on partitioned media, like bootrecord, allocation tables
directories etc., it isn't necessarily used to also address it that way (in CHS).
CHS is limited to 8GB anyway. Access is likely in LBA except for maybe
the very early bios bootstage

Geometry NE number of flash chips.
Yes, we suspect that may be the issue.

Nah, more likely the media came pre-partitoned/pre-formatted
differently, like Gisin suggested.
When you overwrite that with an image of your own they
then all show the geometry that was contained in the image.
 
Back
Top