[parted-devel] [BUG] Specifying 100% on "sun" partition calculates incorrect size

Chris Lamb chris at chris-lamb.co.uk
Sun Jun 22 23:51:19 UTC 2008


(Apologies for not using the Trac instance; it seems to reject all my
submissions as potential spam)

Hi,

When specifying "100%" as a maximum on a partition with a "sun" label, it
seems that the "real" size is miscalculated internally, causing parted to
report an error:

 % dd if=/dev/zero of=test.img bs=1024k count=0 seek=100
 % losetup /dev/loop0 test.img
 % parted -s /dev/loop0 mklabel sun
 % parted -s /dev/loop0 mkpart ext2 0 100%
  Error: You requested a partition from 0.00B to 105MB.
  The closest location we can manage is 0.00B to 98.7MB.
 % echo $?
 1

Replacing 100% with 98.7 works perfectly, as does replacing "sun" with
msdos. I am using parted from Git (e4474291).


Regards,

-- 
Chris Lamb, UK                                       chris at chris-lamb.co.uk
                                                            GPG: 0x634F9A20
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20080623/37a71043/attachment.pgp 


More information about the parted-devel mailing list