bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: v3.0: scripting, args, boundaries


From: Jim Meyering
Subject: Re: v3.0: scripting, args, boundaries
Date: Sun, 14 Aug 2011 23:17:39 +0200

Neal Murphy wrote:
> On Sunday 14 August 2011 14:10:46 Jim Meyering wrote:
>
> I'll get back to most of it. But this one I can answer now.
>> > And where do partitions really start and end? If I use units of MiB, then
>> > I can start a partition at 1MiB and end it at 200MiB. But parted insists
>> > that the partition is 199MiB. So it seems the specified end is really
>> > the block *after* the last block of the parttion. But only for MiB.
>>
>> Do you mean that the length is 199MiB?
>> Wouldn't you expect that if it starts at 1MiB and goes to 200MiB?
>
> Oops. Sorry, I left out the word 'size'; I meant to say "partition size is
> 199MiB', as you surmised.

You may presume that 1MiB == 2^20B
Since you are specifying start and end bytes, you probably want to use
1MiB as the starting offset and one byte (or one sector) less than 200MiB
as the ending offset, so that any following partition can start on the
200MiB boundary.

If you choose a partition starting at 1MiB and ending at 200MiB,
it will have length one sector longer than 199MiB.

I.e., the partition start and end numbers that you specify resolve
to sector numbers, not "1MiB" block numbers as you seem to want.
Sorry.

> So since I wrote zeroes to the first 10MiB and last 10MiB of the device,
> parted should not have found any vestiges of GPT or any other partitioning
> scheme. Yet it persists in making me verify that I really mean to execute
> mklabel, even though it found no partition scheme. And (s)fdisk insist that
> there is GPT scheme on the drive, even though I zeroed out the usual suspects.
>
> If I run 'mkpart /dev/sda mklabel gpt' it demands I verify my intention before

Please show actual commands and output (i.e., copy and paste from a
terminal).  I presume you mean "parted", not "mkpart" above.

> writing the new label, and it does so write. I then make a partition of some
> size. If I then run 'mkpart -s /dev/sda mklabel gpt', it finishes without
> doing anything; the partition I made is still there. Does parted read the in-
> core partition in some places and the on-disk partition in others?

Hmm...
That's twice in a row that you've reported using the "mkpart" command.
Please clarify.  "mkpart" is a parted sub-command.
If you really are running a program named "mkpart", then
parted is not involved.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]