Find the answer to your Linux question:
Results 1 to 7 of 7
Hello, Recently I found about TestDisk utility. Out of pure curiosity I used it on my Linux machine. I was very surprised to see that TestDisk reported incorrect number of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie blnl's Avatar
    Join Date
    Jan 2009
    Location
    The Netherlands
    Posts
    165

    [SOLVED] Incorrect number of heads/cylinders !


    Hello,

    Recently I found about TestDisk utility. Out of pure curiosity I used it on my Linux machine.
    I was very surprised to see that TestDisk reported incorrect number of heads/cylinders on my HDD.

    Please see testdisk.log for more details.

    I do not understand how is this possible. My computer is functioning fine. Both Linux and Windows systems are up and running without any hiccups. I did not experience any data loss/corruption.
    Is it possible that TestDisk is wrong?
    I also used gparted application to test my partitions. It did not find any issues.
    Is there another tool that I could use to get a second opinion?

    Can anyone help me to fix the drive geometry, without loosing my data.

    I'm also curious to know, why this happened? I did not do anything strange with my HDD drive and/or partitions. For partitioning of my drives I always use either the Windows Disk Management tool or Linux partition tool (at installation). One of these tools is not doing the proper job. Or is this maybe a firmware issue, which contains wrong geometry settings.

    Thanks in advance,
    Boris
    Fedora_20@Dell_Latitude_E6410
    Ubuntu_14.04_LTS@HP_Compaq_DC7100

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Lets check existing parititon structure of your disk first.
    Post the output of fdisk -l command here.
    Code:
    su -
    /sbin/fdisk -l
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux Newbie blnl's Avatar
    Join Date
    Jan 2009
    Location
    The Netherlands
    Posts
    165
    The output of fdisk -l is:
    Code:
    Disk /dev/sda: 40.0 GB, 40007761920 bytes
    255 heads, 63 sectors/track, 4864 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8b2bec62
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        1276    10249438+   7  HPFS/NTFS
    /dev/sda2            1277        1372      771120   82  Linux swap / Solaris
    Partition 2 does not end on cylinder boundary.
    /dev/sda3   *        1373        3460    16771860   83  Linux
    Partition 3 does not end on cylinder boundary.
    /dev/sda4            3461        4864    11277630    f  W95 Ext'd (LBA)
    Partition 4 does not end on cylinder boundary.
    /dev/sda5            3461        3971     4104576    7  HPFS/NTFS
    /dev/sda6            3972        4864     7172991   83  Linux
    Fedora_20@Dell_Latitude_E6410
    Ubuntu_14.04_LTS@HP_Compaq_DC7100

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Partition structure is correct.
    Those warning messages appear whenever there is a conflict between CHS ( Cylinder/Head/Sector) and specified size. You can ignore warning messages safely.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Linux Newbie blnl's Avatar
    Join Date
    Jan 2009
    Location
    The Netherlands
    Posts
    165

    Post

    Thanks for the advice.
    Do you know why this conflict between CHS and specified size is there, and how can I avoid crating such conflicts in future?
    Soon I'm planning to install Linux on my other computer. I would like to do that without the CHS conflicts.
    Fedora_20@Dell_Latitude_E6410
    Ubuntu_14.04_LTS@HP_Compaq_DC7100

  6. #6
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    362
    As for the "testdisk" error. Testdisk is checking the Bios Parameter Block (part of the Volume boot record) at data offset 1A , it should be FF (255) and if it is not, the error will be given. The BPB is made dueing formating of the partitition and why it is wrong , can not say. Unless you used a hdd editing program the values in the BPB should never be changed by the OS after formating.

    Did some testing and changed my BPB ,( both primary at sector 0 of partition and its backup at the last sector of partition) for a head count of A0 (160) , XP did not care and booted with no problems (did not run chkdsk, and will not). (The head count seems not to be used by XP but I'm not 100% sure ?). Testdisk gave me your error and Partition Magic gave an error. I used MS's "Dskprobe.exe" for the editing. More info on the VBR can be read NTFS Boot Record Secrets

    The above info is for MS Windows partitions only linux is totoly different.

  7. #7
    Linux Newbie blnl's Avatar
    Join Date
    Jan 2009
    Location
    The Netherlands
    Posts
    165
    Thank you all!
    I have got enough information to deal with this.
    Fedora_20@Dell_Latitude_E6410
    Ubuntu_14.04_LTS@HP_Compaq_DC7100

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •