# doesnt read hd right

## sinisterdomestik

i have a 80 gig WD hard drive that i put BACK into my comp as a backup drive kinda thing.  it used to have d0ze on it so i took that off and was gonna make it a linux partition. but it wont read it right. i fdisk'ed it and all that and it keep saying that the drive is only  236 M instead of 80 GIG.  anyone know why or how to fix that??

----------

## NeddySeagoon

sinisterdomestik,

I would try 

```
dd if=/dev/zero of=/dev/<drive> bs=512 count=1
```

and see what happens. Dont do that to the wrong drive, it writes a block of zeros where the MBR and partition table used to be.

----------

## sinisterdomestik

that zero'd out the drive, but df -hT still reads 

```

/dev/hdb1     ext2    236M   13K  224M   1% /mnt/gentoo_backup

```

----------

## NeddySeagoon

sinisterdomestik,

Have you got Logical Block Addressing on in the BIOS for that drive?

This sort of sillyness happens when C/H/S addressing is on and looks at a big drive and wraps it around 528Mb.

If your motherboard is too old to have LBA (unlikely) you will need a drive manager to sort out the problem.

----------

## sinisterdomestik

i dont think so. i know i never had this problem befoer when i had both drives plugged in. the only difference is that now, my master drive used to be the slave drive and vice versa for my 80 gig. as in, the 80 gig came with the computer and was master and i added a 120 gig as a slave, and now the 120 is master and 80 is slave

----------

## NeddySeagoon

sinisterdomestik,

What does hdparm -i /dev/hdb say ?

Your original post mentioned /dev/hdb1 which is a partition. there is nothing wrong with a partition being 236Mb

----------

## sinisterdomestik

```

root@BlackBeauty:~ $ hdparm -i /dev/hdb

/dev/hdb:

 Model=Maxtor 4D080H4, FwRev=DAH017K0, SerialNo=D41AJC9E

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4 

 DMA modes:  mdma0 mdma1 mdma2 

 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 0: 

 * signifies the current active mode
```

----------

## NeddySeagoon

sinisterdomestik,

That says the drive is about 80Gb  *Quote:*   

> LBAsects=156301488

 and that Logical Block Addressing is on.

It reports to the BIOS that its about 8Gb  *Quote:*   

> CurSects=16514064

  which is where the C/H/S addressing runs out of bits.

What size does the BIOS HDD auto detect report the drive as?

Have you got the size clipng jumper on the drive?

----------

## sinisterdomestik

im about 80% sure it said 80G but i dont remember exactly. how can i go in and fix it??  and i have the jumper set on slave

----------

## NeddySeagoon

sinisterdomestik,

Just look in the BIOS at the next boot. there is nothing to fix.

The drive has several jumpers, master and slave are two. I know thats right or the master won't work either.

There is another jumper called Cylinder Limit or Clip or something like that. Is that fitted?

Its in the same block as the Master/Slave settings.

It makes the drive lie to the BIOS about its size. Gentoo will still use it all but if you want to boot from it, all the files needed for booting have to be in the part of the drive the BIOS knows about.

If your BIOS reports 80Gb, thats not the problem, so no need to take the PC apart.

----------

## sinisterdomestik

the only jumpers i have and have in the drive are the master and slave. ive never heard of the cylinder limit thing.

----------

## GeoffOs

 *sinisterdomestik wrote:*   

> that zero'd out the drive, but df -hT still reads 
> 
> ```
> 
> /dev/hdb1     ext2    236M   13K  224M   1% /mnt/gentoo_backup
> ...

 

```

man df

NAME

       df - report filesystem disk space usage
```

So that is only showing information about a partition.

What does info does fdisk give you?

```
# fdisk /dev/hda
```

then select p

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=4#fdisk

----------

## sinisterdomestik

ok, heres the WHOLE process

so i made a partition that was supposed to take the whole 80 gig drive

```

root@BlackBeauty:~ $ fdisk /dev/hdb

The number of cylinders for this disk is set to 155061.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 

Value out of range.

Partition number (1-4): 1

First cylinder (1-155061, default 1): 

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-155061, default 155061): 

Using default value 155061

Command (m for help): p

Disk /dev/hdb: 80.0 GB, 80026361856 bytes

16 heads, 63 sectors/track, 155061 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hdb1               1      155061    78150712+  83  Linux

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

```

then i did df -hT to see how large the partition was

```

root@BlackBeauty:~ $ df -hT

Filesystem    Type    Size  Used Avail Use% Mounted on

/dev/hdb1     ext2    236M   13K  224M   1% /mnt/gentoo_backup

```

and since thats not right, i did a fdisk on that particular partition

```

root@BlackBeauty:~ $ fdisk /dev/hdb1

The number of cylinders for this disk is set to 155060.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb1: 80.0 GB, 80026329600 bytes

16 heads, 63 sectors/track, 155060 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes

     Device Boot      Start         End      Blocks   Id  System

Command (m for help):

```

and that DEFINITLY doesnt look right. so any suggestions??

----------

## sinisterdomestik

anyone have any ideas??

----------

