bug-parted
[Top][All Lists]
Advanced

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

Parted cylinder alignment bug


From: Marcos Felipe Rasia de Mello
Subject: Parted cylinder alignment bug
Date: Thu, 21 Apr 2011 12:55:05 -0300

As reported here:
http://article.gmane.org/gmane.comp.security.ipcop.devel/14703

I think I found a bug in parted. Usind cylinder alignment and 0% as
start, parted puts the start at sector 1 if the end of the partition
is < 1028MB or < 611MiB. It doesn't happen using GB and GiB units and
only 'cylinder' alignment is affected.

------------------
# parted -v
parted (GNU parted) 2.3
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.
------------------
# parted -s /dev/sda mklabel msdos
# parted -a cylinder -s /dev/sda mkpart primary 0% 610MiB
# parted /dev/sda u s print
Model: ATA SAMSUNG HD161HJ (scsi)
Disk /dev/sda: 312579695s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Sinalizador
 1      1s     1249280s  1249280s  primary

# parted -s /dev/sda mklabel msdos
# parted -a cylinder -s /dev/sda mkpart primary 0% 611MiB
# parted /dev/sda u s print
Model: ATA SAMSUNG HD161HJ (scsi)
Disk /dev/sda: 312579695s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Sinalizador
 1      63s    1253069s  1253007s  primary
------------------
# parted -s /dev/sda mklabel msdos
# parted -a cylinder -s /dev/sda mkpart primary 0% 1027MB
# parted /dev/sda u s print
Model: ATA SAMSUNG HD161HJ (scsi)
Disk /dev/sda: 312579695s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Sinalizador
 1      1s     2005859s  2005859s  primary

# parted -s /dev/sda mklabel msdos
# parted -a cylinder -s /dev/sda mkpart primary 0% 1028MB
# parted /dev/sda u s print
Model: ATA SAMSUNG HD161HJ (scsi)
Disk /dev/sda: 312579695s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Sinalizador
 1      63s    2008124s  2008062s  primary
------------------



reply via email to

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