# New twist on old problem: disk size not recognized

## jkcunningham

I just bought an 80G 2-1/2" Fujitsu Notebook drive to use with an Intel mini-ITX board (D201GLY). A few weeks earlier I installed Gentoo on an older normal sized Western Digital drive hooked to this motherboard, but it is my intention to move everything onto the notebook drive to get the power consumption down (it's going in a robot running off batteries). The problem is trying to get the system to recognize the hard drive properly. Here are the facts:

The Intel bios recognizes the make, model and size of the drive, but has no menus for altering the drive geometry. All you can do with it is switch between "native" and "legacy" modes, and turn S.M.A.R.T capabilities on or off. No permutation of these makes a difference. 

fdisk, cfdisk, and sfdisk all see it as a 7.662 G hard drive (255h, 63s, 931c), and they ignore attempts to change these parameters using the standard override flags, etc. 

I tried zeroing out the first 1024 bytes, as in this thread:

https://forums.gentoo.org/viewtopic-t-154233-highlight-fdisk+recognize+harddrive.html

which made no difference. 

After trying various boot disks with supposed "sure cure" hard drive management software (UBCD, knoppix-std-0.1, even windows in several flavors), I finally tried updating the BIOS with the latest from Intel. After this, rebooting from the old hard drive (Gentoo-2.6.20-r8 ), fdisk at last saw the correct geometry and size. So I partitioned the disk, set up filesystems, moved files, etc. chrooted, installed grub and all that. I removed the slave jumper from the drive, took off the old hard drive, but when I tried to boot from it, it couldn't read the hard drive. Damn. 

I made the notebook drive a master, hooked up a cdrom drive as a slave and booted off the Gentoo 2007.0 minimum install cd (I've never been able to get 2007.1 to boot off anything completely). The fdisk and/or IDE drivers on the 2007.0 cd must be older than the ones from the recently synced portage on the old WD drive, because when I try to look at the notebook drive under the 2007.0 boot disk, it is back to thinking its <8 G drive again. 

So here's a question: how can I boot off something with new enough IDE drivers or whatever is giving this thing grief to fix the problem? Or am I going about this wrong? 

It should be clear at this point that this is not a duplicate thread - I've searched the forums thoroughly for ideas (even googled them) without coming up with anything. 

Does anyone have any idea how to proceed from here? I'm stumped. 

Thanks.

--Jeff

----------

## Vlad

Have you tried using something like hda=stroke to see if it'll get the kernel to read the right drive size?

----------

## jkcunningham

 *Vlad wrote:*   

> Have you tried using something like hda=stroke to see if it'll get the kernel to read the right drive size?

 

Thanks for the reply, Vlad.  Yes, I tried your suggestion, but it still doesn't recognize the drive properly. Any other ideas?

--Jeff

----------

## mudrii

you could try with latest sabayon 3.4  kernel  2.6.22

----------

## bunder

is the drive jumpered to "capability mode"?

----------

## jkcunningham

Mudrii: I'm not sure what you're suggesting. The kernel which isn't recognizing the drive properly would be the one on the 2007.1 minimal install boot disk. If I boot the system from my old Western Digital drive which has a 2.6.20-r8 kernel on it, the Fujitsu drive is then recognized (without a hda=stroke boot parameter). 

Bunder: the drive does not seem to have such a jumper. Here's a link to the manual:

http://193.128.183.41/support/disk/manuals/z60_product_manual.pdf

Has anyone successfully booted from one of these drives before? 

--Jeff

----------

## eccerr0r

If you're using the "compatibility" or the "limit drive size" jumper to boot the WD disk, then likely nothing short of a firmware upgrade (to an nonexistent version) to get the machine to boot off of the fujitsu disk.  The other way is to install a small flash disk (CF) as the boot sector to boot the kernel, and use that kernel to use the root disk.  That is, if the machine doesn't hang when booted which sounds like won't be a problem.

Did you try clearing the partition table and reboot again after the firmware upgrade, before repartitioning/installing onto that disk a second time?

When you say it couldn't read, what specific error? "non-system disk" or "hang" or couldn't get past stage 1 in grub?  if you put everything back the way it was, can you still read the disk?

----------

## jkcunningham

The WD disk isn't jumpered in any way other than as IDE master. 

I did try clearing the partition table and rebooting after the firmware upgrade. It acts like it is using the BIOS geometry no matter what I tell it. 

The error comes from the BIOS - and it says it needs a bootable CDROM in the drive (which is empty at that point). It is not even seeing the hard drive, never mind the boot partition with grub on it. 

I'm in the process of upgrading the kernel to 2.6.21-current-stable but it will take a couple evenings, as I have to do it first on the WD, then again on the Fujitsu. But I don't think this will fix it. I may end up having to go the CF disk route, but I haven't given up on the elegant solution yet. 

Thanks for the advice. Any further thoughts would be more than welcome. 

--Jeff

----------

## eccerr0r

I don't get it, are you saying firmware is detecting or not detecting the disk? and of the right size?

Are you sure you have the correct boot order in firmware?

Last I remember on my intel bios m/b's it potentially remembers boot disks by model so make sure you set the correct boot disk order... but I don't remember exactly.

----------

## jkcunningham

The BIOS setup menu correctly identifies both the model and size of the disk. But the Gentoo system that boots from the 2007.0, 2006.1, 2006.0 boot minimal install disks do not, so I can't do anything with it. I also tried the latest Knoppix, Ubuntu and a WindowsME bootable disk repair disk. Booted off any of these CD's the disk size that various partitioning programs see is wrong (and way small). And they don't get it right when I *tell* them what the geometry should be: once I write it and quit, it comes back up unchanged. 

The boot order is correct set in the BIOS is correct - and I've tried it both ways. 

The only way I've been able to get the drive to be recognized properly has been to make it a slave drive with the old WD drive the master, and boot to the WD drive, which is running Gentoo 2.6.20-r8. Under these conditions, fdisk sees the fujitsu drive properly. Under these conditions I partitioned it into hdb1=100M, hdb2=2000M, hdb3=~78G and it was persistent. I put file systems on them, mounted them, and did an entire Gentoo install on it. 

But when I took the WD disk off the IDE cable, and took the slave jumper off the Fujitsu drive and tried to reboot it, it never gets to grub. It doesn't do anything but tell me there isn't a drive to boot from. 

I hope that is more clear.

--Jeff

----------

## desultory

Has the BIOS been updated to the latest version?

----------

## jkcunningham

 *desultory wrote:*   

> Has the BIOS been updated to the latest version?

 

 *jkcunningam wrote:*   

> ... I finally tried updating the BIOS with the latest from Intel. After this, rebooting from the old hard...

 

Yes.

----------

## jkcunningham

 *Vlad wrote:*   

> Have you tried using something like hda=stroke to see if it'll get the kernel to read the right drive size?

 

I just noticed in dmesg that the hda=stroke option is no longer supported. I'm working with a 2.6.21-gentoo-r4 kernel at this point, and dmesg says:

hdb=stroke --BAD OPTION

Its not in Documentation/ide.txt either. I've also tried turning off dma and setting the geometry as a boot option, but none of these things work.

----------

## eccerr0r

Still smells like a unfixable firmware/hardware bug, sorry to say.  It seems like BIOS is reporting the incorrect geometry to the OS if you have a "new" disk installed.  At this point the most we can do is see if there's a way to work around the problem, if it's even possible.  (Perhaps try another brand of disk!)

Did you try setting the CHS to 1024/16/63 and letting linux handle the rest of the disk? (i.e., letting linux deal with the 155000 cylinders) and fitting the bootloader in the first 1024?

----------

## jkcunningham

 *eccerr0r wrote:*   

> Still smells like a unfixable firmware/hardware bug, sorry to say.  It seems like BIOS is reporting the incorrect geometry to the OS if you have a "new" disk installed.  At this point the most we can do is see if there's a way to work around the problem, if it's even possible.  (Perhaps try another brand of disk!)

 

Yes, I tried two different disks besides this Fujitsu, one was a Maxtor and I don't remember the other - both 2-1/2" notebook drives like the Fujitsu. All act the same way. I'm starting to wonder about the hardware too, except that it works fine on my WD 3-1/2" 40G drive. I'm wondering if there isn't something wrong with the 3-1/2" to 2-1/2" IDE connector I bought. 

 *Quote:*   

> Did you try setting the CHS to 1024/16/63 and letting linux handle the rest of the disk? (i.e., letting linux deal with the 155000 cylinders) and fitting the bootloader in the first 1024?

 

I'm not sure what you mean. I've tried setting hdb=65535/16/63 as a boot option (which is what dmesg says the WD-40G drive uses). dmesg seems to indicate this is accepted, but it still gets the parameters incorrectly from the drive:

hda: WDC WD400BB-75DEA0, ATA DISK drive

hdb: @UHIPSQ IHP2080AH, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

Probing IDE interface ide1...

Probing IDE interface ide1...

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

hda: max request size: 128KiB

hda: Host Protected Area detected.

        current capacity is 78125000 sectors (40000 MB)

        native  capacity is 78125040 sectors (40000 MB)

hda: Host Protected Area disabled.

hda: 78125040 sectors (40000 MB) w/2048KiB Cache, CHS=65535/16/63

hda: cache flushes not supported

 hda: hda1 hda2 hda3

hdb: max request size: 128KiB

hdb: 14965776 sectors (7662 MB) w/8192KiB Cache, CHS=65535/16/63

hdb: cache flushes supported

 hdb: unknown partition table

But fdisk still shows:

Disk /dev/hdb: 7662 MB, 7662477312 bytes

16 heads, 63 sectors/track, 14847 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes

----------

## eccerr0r

hmm... you may be right with the adapter or perhaps signal integrity (hardware issue)  Check cabling too.

The IDE model number is totally bogus, likely caused by signal integrity issues.

The Fujitsu drive I have looks like 

```
FUJITSU MHT2030AT
```

You get

```
@UHIPSQ IHP2080AH
```

Looks like a few bits are either stuck or something...

----------

## jkcunningham

I ordered another connector - I'll post what happens when it arrives.

[edit] That was it!  Damned connector was bad. I wasted more than 20 hours trying to solve what I thought was a software problem and fixed it with a $4.95 part. 

Thanks for pushing me in that direction, eccerr0r.

--Jeff

----------

