# Accidentally changed disk geometry



## mamalos (Mar 18, 2009)

Dear all,

I recently bought a WD caviar black 1T. At first I had created three primary partitions on the drive, but later I decided to make them four. So, I issued:

fdisk -p /dev/ad8 > somefile

To get my filesystem table into a file, edited it so as to reflect my new needs, and issued:

fdisk -if somefile.edited ad8 

to pass my new changes. Since then, nothing worked as expected. First, its geometry changed to something I don't remember, and my BIOS along with my fbsd partition as well as my Windows partition see only 32.9MB of space on that device. No matter how many changes I have performed on the drive, I cannot see more than those few MBs. 

The only, partial, solution I found was to alter the partition table in a linux box with fdisk, so as to reflect the disk's real size. During this process, I created 2 primary linux partitions, one primary fbsd and one primary fat (around 50GB). I formatted the fat partition, mounted it on the linux box and copied an ISO image on it. Everything worked as should. When I rebooted the pc, the bios was still recognizing only ~33MB of space on the disk, and Freebsd could not see more than that (unlike linux, which could still see all 1T of space). Freebsd's fdisk would see the four primary partitions created, but would refuse to access them. Instead, when I tried to mount, or use bsdlabel, it returned an "I/O error".

I assume that if I give the right geometry to the disk it will work, but it seems impossible, since whenever I change it (in either fbsd or linux box), it still remains the same in size.

Is there a way to get out of this mess, or will my disk be recognized as a ~33MB disky by all other OSs other than linux? Does anybody know a way to pass a correct C-H-S for that disk in order to function?

The disk is SATA, obviously, and the aforementioned procedures where tested on more than one box with the same results.

Thank you all in advance for your help!


----------

