Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Incorrect number of heads/cylinders ???

  1. #1
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    121

    Question Incorrect number of heads/cylinders ???

    Hello,

    TestDisk 6.10 is reporting incorrect number of heads/cylinders on my HDD.

    Please see testdisk.log for more details.

    Is this a serious issue?
    If yes, what risks are involved?
    How critical is this warning, i.e. should I fix it?
    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 report any problems.

    I'm in favor of fixing the drive geometry, but I'm worried to make the things worse. Anyone that has experience with such problems/tools: I need your help!

    Thanks in advance,
    Boris
    openSUSE 11.0, GNOME
    HP Compaq NC6000, Intel Pentium M Processor 725, ATI Mobility Radeon 9600, Intel PRO 2200BG
    HP Compaq DC7100, Intel Pentium 4 Processor 521, Intel 915G Express, D-Link DWL-510 AirPlus G

  2. #2
    Join Date
    Jun 2008
    Location
    Kln, Deutschland
    Posts
    1,204

    Default Re: Incorrect number of heads/cylinders ???

    It says "warning", so I wouldn't worry too much about it.

    I assume that it only matters for older versions of lilo and maybe grub, they never liked booting from oddly layed out disks.

    If everything works ok, I would just ignore it .

  3. #3
    Join Date
    Dec 2008
    Location
    Hamburg
    Posts
    449

    Default Re: Incorrect number of heads/cylinders ???

    Hi,

    Quote Originally Posted by blnl View Post
    Hello,

    TestDisk 6.10 is reporting incorrect number of heads/cylinders on my HDD.

    Is this a serious issue?
    If yes, what risks are involved?
    How critical is this warning, i.e. should I fix it?
    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 report any problems.

    I'm in favor of fixing the drive geometry, but I'm worried to make the things worse. Anyone that has experience with such problems/tools: I need your help!

    Thanks in advance,
    Boris
    I think that is a serious issue. What does it mean?

    The first line tells us that you have a hd with 37 Gig, 63 heads and 255 cylinders (logical head and cylinders). So every primary partition has to start at cylinder 0 and end at cylinder 254 and every logical partition has to start at cylinder 1 and end at cylinder 254.

    The line above the NTFS-partitions mean that in the partition table the NTFS-partition ends at cylinder 240. That's not correct. The worst case with incorrect partition tables is that all partitions will be lost. It could be that will never happen. It could be it happens tomorrow. But don't worry. You own testdisk.

    It's good that you are carefull. Testdisk is a powerful tool which can do a lot of good things for you but also some bad ones. I recommend:

    1. step: Read the manual
    2. step: Read the manual
    3. step: Read the manual


    After reading all closely (good place to start it: TestDisk - CGSecurity) I also recommend to make a copy of your disk before starting to play around with the partition tables. Best thing would be to have the same disk to do so. The target disk must be at least as big as the source disk. Connect both to the same computer and type:

    Code:
    dd if=/dev/sda of=/dev/sdb
    ATTENTION: if means input file. So in the example the bad disk would be the one after if. of means output file. So in the example the empty disk you want to copy the data to would be the second disk. If you mix up if and of the empty disk will be copied without any warning to the original one. So the original one will be deleted. After hitting ENTER you may go shoping, do the dishes or everything else you like.

    DO NOT COPY THE CODE IF YOU ARE NOT 100% SURE WHAT YOU ARE DOING!

    Now have fun with testdisk.

    If you messed up your original disk just copy the backup back to it and start again. Now the example would be:

    Code:
    dd if=/dev/sdb of=/dev/sda
    Again: Think three times before you hit ENTER and keep cool.

    hth

    Bye

    Erik

  4. #4
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    121

    Default Re: Incorrect number of heads/cylinders ???

    Thank you for the advice!

    I also recommend to make a copy of your disk before starting to play around with the partition tables. Best thing would be to have the same disk to do so. The target disk must be at least as big as the source disk.
    Unfortunately, I do not have an empty spare drive for this job, but on my external USB drive I have enough space for a 40GB image.

    I'm not sure if Northon Ghost is capable of creating the images of drives with ext3 file system. Do you have any suggestions here?
    Is it possible to create drive image directly from Linux, which tool I should use?

    I'm also curious to know, what caused the drive geometry to become wrong? 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.
    openSUSE 11.0, GNOME
    HP Compaq NC6000, Intel Pentium M Processor 725, ATI Mobility Radeon 9600, Intel PRO 2200BG
    HP Compaq DC7100, Intel Pentium 4 Processor 521, Intel 915G Express, D-Link DWL-510 AirPlus G

  5. #5
    Join Date
    Dec 2008
    Location
    Hamburg
    Posts
    449

    Default Re: Incorrect number of heads/cylinders ???

    Hi,

    Quote Originally Posted by blnl View Post
    Thank you for the advice!



    Unfortunately, I do not have an empty spare drive for this job, but on my external USB drive I have enough space for a 40GB image.

    I'm not sure if Northon Ghost is capable of creating the images of drives with ext3 file system. Do you have any suggestions here?
    Is it possible to create drive image directly from Linux, which tool I should use?

    I'm also curious to know, what caused the drive geometry to become wrong? 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.
    The tool is dd. You can also do this:

    Code:
    dd if=/dev/sda of=/media/disk/backup/image
    This would create an image file of the whole disk named /dev/sda in a file named image located on /media/disk/backup. The file system has to support such big files.

    To save some disk space you can also pipe dd to gzip which would be:

    Code:
    dd if=/dev/sda | gzip > /media/disk/backup/image.gz
    To restore that file to the disk it would be:

    Code:
    gunzip -c /media/disk/backup/image.gz | dd of=/dev/sda

    I don't know which program messed your partition table up. I think it wasn't Linux.

    Bye

    Erik

  6. #6
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    121

    Default Re: Incorrect number of heads/cylinders ???

    Thanks for the detailed instructions!

    I suppose that I can perform these operations using a live CD. Otherwise it might be difficult to restore the image if I destroy my boot drive.

    I have one more question. Is there a way to verify the image?
    Before I start experimenting, I would like to make sure that the image creation is 100% successful.
    openSUSE 11.0, GNOME
    HP Compaq NC6000, Intel Pentium M Processor 725, ATI Mobility Radeon 9600, Intel PRO 2200BG
    HP Compaq DC7100, Intel Pentium 4 Processor 521, Intel 915G Express, D-Link DWL-510 AirPlus G

  7. #7
    Join Date
    Dec 2008
    Location
    Hamburg
    Posts
    449

    Default Re: Incorrect number of heads/cylinders ???

    Hi,

    Quote Originally Posted by blnl View Post
    Thanks for the detailed instructions!

    I suppose that I can perform these operations using a live CD. Otherwise it might be difficult to restore the image if I destroy my boot drive.

    I have one more question. Is there a way to verify the image?
    Before I start experimenting, I would like to make sure that the image creation is 100% successful.
    Hmmm. I always trusted dd. I think diff can do that job for you.

    Code:
    diff /dev/sda /media/disk/image
    That will take a while.

    Edit: The result must be empty.

    hth

    Bye

    Erik
    Last edited by erikro; 21-Mar-2009 at 08:29. Reason: Forgot the result

  8. #8
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    121

    Default Re: Incorrect number of heads/cylinders ???

    After a long time I decided to give it a try.

    First I made a backup of my drive as follows:
    Code:
    dd if=/dev/sda | gzip > /mnt/usb/nc6000.img.gz
    Then I tried to fix the geometry using testdisk. Obviously something terribly went wrong because I ended up with unusable system. I don't know exactly what I did, but my computer refuses to boot from the HDD.

    _______________________________________________________________________________________________


    I decided to restore my HDD from the image file, using gparted live CD (at that time, gparted did not recognize any partitions on the drive)
    I did the following:
    Code:
    cd /mnt
    mkdir usb
    mount -t ntfs-3g /dev/sda1 /mnt/usb
    gunzip -c /mnt/usb/nc6000.img.gz | dd of=/dev/hda
    The restore operation ended up with input/output error.
    It said that only first 11GB were copied.

    ________________________________________________________________________________________________


    Now my computer boots, but only in Windows XP (which is the first partition on disk). So that part was recovered correctly.

    Now both gparted and testdisk recognize the other HDD partitions, still I can't start Linux. Besides testdisk now reports more issues with the HDD.





    I don't know what else I could do to fix all this.
    Is there a chance that my Linux partitions are still intact?
    By the way, Windows is able to read logical drive Files (/dev/hda5).
    openSUSE 11.0, GNOME
    HP Compaq NC6000, Intel Pentium M Processor 725, ATI Mobility Radeon 9600, Intel PRO 2200BG
    HP Compaq DC7100, Intel Pentium 4 Processor 521, Intel 915G Express, D-Link DWL-510 AirPlus G

  9. #9
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    121

    Default Re: Incorrect number of heads/cylinders ???

    The problem is solved.

    I did the following:
    1. backup all HDD partitions
    2. low-level format the HDD
    3. reset bios
    4. partition the HDD
    5. restore the partitions contents (from the backups)


    By the way following message is still present.
    Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
    In the meantime I learned that this does not necessarily mean that something is wrong with the HDD. Since testdisk is guessing the number of heads/cylinder, sometimes the guess can be wrong.
    That explains why Windows version of testdisk guesses 16 HD/CYL while Linux version guesses 255 HD/CYL.
    openSUSE 11.0, GNOME
    HP Compaq NC6000, Intel Pentium M Processor 725, ATI Mobility Radeon 9600, Intel PRO 2200BG
    HP Compaq DC7100, Intel Pentium 4 Processor 521, Intel 915G Express, D-Link DWL-510 AirPlus G

  10. #10
    Join Date
    Jun 2008
    Location
    Kln, Deutschland
    Posts
    1,204

    Default Re: Incorrect number of heads/cylinders ???

    ....told ya - lol
    HP dv6645, Nvidia 8400m-gs, KDE 4.

Page 1 of 2 12 LastLast

Posting Permissions

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