Hi Leslie,

[EMAIL PROTECTED] wrote:
Hello Marcus,

On Thu, Oct 12, 2006 at 09:36:41AM +1100, Marcus Brown wrote:

Recently I realised (while testing smaller cards) that the cylinder
size was defaulting to 8225kB when creating and new label + partition.
Of course, this is way too large for a 16MB card ;)
Indeed.  But why do you need the cylinder size?

TBH, I'm not really sure :)
However, the original intention had been to be able to create partitions
using parted with "unit cyl" so that the partitions were aligned to
cylinder boundaries.

I also discovered by trial and error, that some of my dodgy scripts, like
converting logical-to-primary only worked with "unit cyl", although I
can't seem to prove that anymore :( (even with the old version of RR).
(see below)

In addition, creating a label+partition using any unit sets the unusual
cylinder size, which only seems to cause problems elsewhere later
(these cards need to be capable of being modified by non-parted
partitioning programmes, and non-Linux OSes).


The way I've got around this is by using fdisk to create the label and
partition instead, which usually results in a cylinder size of 32KB.

It also takes a lot longer to execute :(.

I've also had to start working in sectors, rather than cylinders,
which is a bit more painful.
I guess.  The libparted-based GNU fdisk (currently beta, ready for
release soon) has, like its util-linux counterpart, options to set the
CHS values.  parted will get this in the mid-term future, too (I invite
you to create a patch in any case).

err... yes ... C :))
I'd like to think I was 'multi-lingual' but my proficiency in C is not
good, and I certainly wouldn't know where to start until I know what the
problem is and the history behind it. This may, of course, change in the
near future ;)


Convert logical to primary -------------------------- Initially, I had
a function (which worked) which was written because cards formatted by
PocketPC contained an extended partition with a single logical fat32.
It worked by performing a dummy resize of partition 5, removing both
table entries, and creating a new primary with the same start/end as
the previous logical. For some reason this no longer works, (although
I can't tell you when/why it stopped;) any suggestions on how to do
this properly?
It's hard to say without knowing exactly about the disk layout and the
steps you performed.  Give us more information and we might be able to
help.

I've gone to a bit of effort to attempt to prove this theory to myself,
and you, however, I've run out of time atm, so I though it best to post
my results so far. See attached notes.


  I wish you all the best for your project and hope that we can resolve
these issues with you.

Thanks :)


  Leslie

ps. hope this is the right list :)
Yes, anything remotely Parted goes here :)



Ah, good. I thought my questions may have been more 'user' oriented
rather than 'devel'.



Marcus.

Attachment: 20061013 logical-to-primary tests on 256MB SD.txt.gz
Description: GNU Zip compressed data

Attachment: 20061013 logical-to-primary tests on 512MB SD.txt.gz
Description: GNU Zip compressed data

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to