[Parted-maintainers] Bug#491511: Acknowledgement (off-by-one: parted should consider cylinders one-indexed rather than zero-indexed)

Omari Stephens xsdg at mit.edu
Sun Jul 20 03:05:08 BST 2008


This is actually worse than I suspected.  The logic for setting the start 
cylinder and setting the end cylinder behave _differently_ on this account:


01:49:22> [root{perl}@~]
#parted /dev/sdc unit cyl p
Model: ATA MAXTOR STM332062 (scsi)
Disk /dev/scsi/host3/bus0/target0/lun0/disc: 38913cyl
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 38913,255,63.  Each cylinder is 8225kB.
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags


01:49:24> [root{perl}@~]
#parted /dev/sdc unit cyl mkpart
Partition type?  primary/extended? p
File system type?  [ext2]? xfs
Start? 1
End? 1216
Information: You may need to update /etc/fstab.


01:49:42> [root{perl}@~]
#parted /dev/sdc unit cyl print
Model: ATA MAXTOR STM332062 (scsi)
Disk /dev/scsi/host3/bus0/target0/lun0/disc: 38913cyl
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 38913,255,63.  Each cylinder is 8225kB.
Partition Table: msdos

Number  Start  End      Size     Type     File system  Flags
  1      1cyl   1215cyl  1215cyl  primary


01:49:45> [root{perl}@~]
#fdisk -l /dev/sdc

Disk /dev/sdc: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000385a6

    Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               2        1216     9759487+  83  Linux

--xsdg





More information about the Parted-maintainers mailing list