[Parted-maintainers] Bug#706023: parted: mkpart screws up value if	start is 1 plus a unit
    Len Sorensen 
    lennartsorensen at ruggedcom.com
       
    Tue Apr 23 15:11:26 UTC 2013
    
    
  
Package: parted
Version: 2.3-12
Severity: normal
Tags: upstream
If you try to create a partition starting at 1MiB and ending at the end
of the disk by doing:
mkpart primary 1MiB -1s
You can a warning about alignment (which is obviously wrong given 1MiB
is perfectly aligned), and the start is instead 63s.
If you do:
mkpart primary 2MiB -1s
you get exactly what you asked for, and the start is sector 4096 (512byte
sectors of course).
If you do:
mkpart primary 1MiB -1Mib
you get exactly what you asked for and the start is sector 2048.
mkpart primary 2048s -1s
also does what you ask for.
mkpart primary 1024KiB -1s
also works perfectly.
It seems that if you use different units for the two values, and the
first value is 1, then it does something messed up.
Using 1.0MiB doesn't change the behaviour, it is still broken.
-- 
Len Sorensen
-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
powerpc
Kernel: Linux 3.8-trunk-amd64 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages parted depends on:
ii  libblkid1           2.20.1-5.3
ii  libc6               2.17-0experimental2
ii  libdevmapper1.02.1  2:1.02.77-1
ii  libparted0debian1   2.3-12
ii  libreadline6        6.2+dfsg-0.1
ii  libtinfo5           5.9-10
ii  libuuid1            2.20.1-5.3
parted recommends no packages.
Versions of packages parted suggests:
pn  parted-doc  <none>
-- no debconf information
    
    
More information about the Parted-maintainers
mailing list