Re: partition 1 does not end on cylinder boundary

From: John Reiser (jreiser_at_BitWagon.com)
Date: 01/31/04


Date: Sat, 31 Jan 2004 14:25:06 -0800


> $ fdisk /dev/hda
> disk /dev/hda: 255 heads, 63 sectors, 3736 cylinders
>
> Nr Af Hd Sec Cyl Hd Sec Cyl Start Size Id
> 1 80 1 1 7 254 63 1023 112518 30587697 07
> 2 00 0 0 0 0 0 0 0 0 0
> 3 00 0 0 0 0 0 0 0 0 0
> 4 00 0 0 0 0 0 0 0 0 0

Those numbers are unusual and inconsistent.

DOS partitions usually start and end on a cylinder boundary,
except that a primary partition may start at C/H/S of 0/1/1
(which is the second track) because the first sector has
the MBR (Master Boot Record) and the rest of the first track
is reserved (for GRUB [or Cedilla :-)].) Primary partition Nr 1
above begins at C/H/S 7/1/1 which is one track into a cylinder.

A Size of (30587697 + 63) corresponds to 1904 cylinders
[1904 == (30587760 / (255 * 63))] yet the table says that
primary partition Nr 1 ends after cylinder 1023. Ordinarily
a program such as Partition Magic would correct this by relying
on the LBA info (30587697 sectors starting at 112518), but
perhaps PM objects to not starting on a cylinder boundary.

Let's try to figure the layout of the beginning of the drive
when it had a /boot partition (that was later deleted.)
Cylinders are numbered from 0 thru 3735, Heads [tracks] are numbered
from 0 thru 254, and Sectors within a track are numbered from 1 thru 63.
LBA (Logical Block [sector] Address) begins at 0.

         --lowest--- ---highest-- ---LBA--- --sectors-
  Nr Af Hd Sec Cyl Hd Sec Cyl Start Size Id
          0 1 0 0 1 0 0 1 MBR (Master Boot Record)
          0 2 0 0 63 0 1 62 rest of 1st track; reserved
   1 00 1 1 0 254 63 6 63 112392 83 ext2/ext3 54.9MB /boot
          0 1 7 0 63 7 112455 63 0 unused track [partitioning mistake]
   2 80 1 1 7 254 63 1910 112518 30587697 07 NTFS 14.9GB Windows [not on Cyl boundary]
          0 1 1911 254 63 3735 30700215 29318625 0 14.3GB unused rest of disk

So the NTFS partition does not start on a cylinder boundary, but instead
starts one whole track later. This is unusual; many softwares expect
partitions to start and end on cylinder boundaries (except for the partition
that is adjacent to the very first track which contains the MBR and 62
sectors of "reserved" space.)

Evaluate the following strategy to see how well it might meet your needs:
Backup the NTFS data, run fdisk, create a new empty DOS partition table,
re-create the /boot and NTFS partitions [in order] by entering _exactly_
the right numbers to describe where they were [are], write out the partition
table, exit, reboot. Re-run fdisk, print the partition table, check it.
Boot a Linux rescue disk, run fsck on both partitions.

[If you want Partition Magic to work, my guess is that you'll have to
align the NTFS partition to a cylinder boundary.]

-- 


Relevant Pages

  • Re: HD partition not ending on a cylinder boundary
    ... Partition 1 does not end on a cylinder boundary ... no modern hard disk has the actual same geometry as it reports due to ... I don't do Windows, but I've heard ... cylinder boundaries, there are no real other problems. ...
    (comp.os.linux.hardware)
  • Re: Partition Magic finds drive error
    ... >>> I tested a new USB external hard drive with Partition Magic's ... Still, when creating 'basic' partition tables, all tools I am aware of will ... create partitions at cylinder boundaries. ... The noise has nothing to do with the PM error. ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Partitioning problems on Maxtor 80Gb drive
    ... >> Partition 1 does not end on cylinder boundary. ... >I choose install LILO on master boot record. ... >cylinder boundaries and the number of heads is not correct. ... Undoubtedly your problem is geometry related. ...
    (comp.os.linux.setup)
  • Re: ext3 resizing partition and yast woes
    ... just not the partition on it. ... Partition 1 isn't aligned to cylinder boundaries. ... Need to add support for this. ... The operating system thinks the geometry on /dev/sdc is ...
    (comp.os.linux.hardware)
  • RE: Change Tracks Per Sector on system Partition
    ... mirroring system partitions of a cluster to an offsite SAN due to differing ... We cannot physically read the file system boot sector usually at ... If your software mirror a Windows NT/2000/2003 operating system partition ... another disk that is translated as 32spt, ...
    (microsoft.public.windows.server.setup)