Hi Ernest,
Ernest jw ter Kuile wrote:
On Friday 29 September 2006 16:01, Paul Sokolovsky wrote:
Hello Marcus,
Regarding the algorithm for detectionm itself, again, it worked for
cards for matted in WinXP/Canon camera. For sanely partitioned card I
was getting "msdos" disk label (aka partition table) type, "loop" only
for partitionless. Have no idea why Ernest has "loop" for both.
Wel, I managed to make my CF completly unreadable to parted... but
not, to my surprise, to anything else ;o)
I had noticed that although there was a partition defined, the first part if
the boot sector still mentioned the file system.
So I blanked the first sector and added again a clean partition table. For
this I have used cfdisk as that is what I know best. The result is that I
now have a perfectly working CF card which parted refuse to even open:
By blanking the first sector I assume you mean:
dd if=/dev/zero of=/dev/sda bs=512 count=1
Right?
terkuile:/home/ernest# parted -s /dev/sda print
No Implementation: Partition 1 isn't aligned to cylinder boundaries. This is
still unsupported.
This seems quite clear. You haven't done the right thing.
AFAIK fdisk automatically aligns to cylinder boundaries.
cfdisk does not (for as long as I remember), and is the
reason I stopped using it all those years ago.
By specifying "unit cyl", parted can create partitions
that are aligned.
while using fdisk:
terkuile:/home/ernest# fdisk /dev/sda -l
Disk /dev/sda: 1045 MB, 1045094400 bytes
33 heads, 61 sectors/track, 1014 cylinders
Units = cylinders of 2013 * 512 = 1030656 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1014 1020560+ 5 Extended
/dev/sda5 1 31 31140+ 4 FAT16 <32M
/dev/sda6 32 952 926956 83 Linux
/dev/sda7 953 1014 62372+ 82 Linux swap / Solaris
hmm ... didn't you just say you blanked the partition table?
Perhaps you didn't remove/insert the card afterward?
-or- run partprobe (in the parted package).
and the kernel itself:
terkuile:/home/ernest# cat /proc/partitions
major minor #blocks name
3 0 156290904 hda
3 1 6835626 hda1
3 2 1 hda2
3 5 64228 hda5
3 6 149388403 hda6
3 64 78150744 hdb
3 65 131071 hdb1
3 66 78019672 hdb2
22 64 293036184 hdd
22 65 7815622 hdd1
22 66 284671800 hdd2
22 67 546210 hdd3
8 0 1020600 sda
8 1 1 sda1
8 5 31140 sda5
8 6 926956 sda6
8 7 62372 sda7
As above.
And again W2k had no trouble either.
Doesn't count ;)
If there were errors, you wouldn't know about it anyway.
I would have like to try reading it using my ibook, but I have given it to my
Moms. I suspect OSX would have had not problems either.
Either way, we should switch to more robust method then, be it fdisk
print cmd or /proc/partitions parsing.
No.
I suspect that /proc/partitions is the way to go. For one thing if the kernel
does not recognise a CF as having a partition then even if any parted, fdisk,
cfdisk or any other program _does_ see the partition, then you would not be
able to mount it anyway.
IMHO your knowledge and opinion are flawed.
Sorry Marc, if you really like parted, keep on using it. For me, maybe in the
futur it will be ready, but right now it does not seem to be able to do some
basic things.
Improve your understanding of partitions and filesystems, and you will see
that not only is parted the only choice, but that ?fdisk are totally unsuitable
for most of the tasks performed in RR.
parted does the right job for RR, and it does it now.
btw: My name is Marcus not Marc.
I reblanked the disk and this time used parted to partition it. And now I
have a CF which parted recognises as such, along with every other program
that worked before.
Is that then the only way to make parted happy ? Only partition tables
actually written using parted are acceptable ?
This is to do with cylinder boundaries.
Get rid of cfdisk, and readjust your thinking.
And yes, you are probably right (I can hear you think all the way from the
Netherlands) that parted does it the correct way, while fdisk, being much
older, probably does only a partial Job. But should parted then not be
able to read that partition table ?
fdisk has it's place, which is why it's in RR at all, however it is
only a partitioning tool. It also has a problem in that the user would
have to be frequently asked to eject/insert the card when (certain) changes
were made to the partitions. Forget the inconvenience, why bring a user
(introducing another source of error) into what is a reasonably involved
process? This user intervention can be avoided by only one way that I
know of .... can you guess?
# partprobe
strangely enough, this is a tool in the parted package! :)
and is one of the many reasons that parted is, will and has to be used.
parted does a great job of what it's designed to do, and is more of a
"partition and filesystem" toolkit.
I say use it to partition it a new disk, but don't use it for detecting the
current situation. It is just too fragile.
It WILL be used to do (all) the work in RR because I know it works.
How do you come to this conclusion?
What is fragile about it?
Every report I've seen, and test I've run has given me the correct information.
I'll send a bug report to the parted developpers.
It seems that you run off with a conclusion before gathering very much
information. You also seem to have assumed that a number of different
problems are but one, and that it's all because of parted.
I declare that you are wrong!
The only commonalities between all the partition and filesystem problems
that you have brought to this list have been cfdisk, your system, and you.
Take cfdisk out of the equation for a while, and then see how you go.
The only "bugs" that I have seen in parted have been while I've been
manipulating mbr or FAT by hand. Even then it stops/exits with a sane
message (basically telling me I should know better;).
I wish you would reconsider your opinion about filing a bug report.
You have not shown the evidence to support your conclusion.
btw:
I don't recall you mentioning which distro you're using. It also seems
that you are running a much newer version of parted than both RR
(and I) use. (The version RR uses is determined by the hh.org src, not me).
To level the playing field, you should probably also test with a 0.6.x
version of parted, which might help to identify what your problem
actually is.
Marcus.
ps. can you use less words and more facts? :)
_______________________________________________
Hx4700-port mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/hx4700-port