Click to See Complete Forum and Search --> : fdisk large disk limit


kcella
07-04-2003, 01:54 PM
I am trying to partition my new 120 GB hard drive and fdisk does not seem to be recognizing the size correctly. It shows the following information:

Disk /dev/hdc: 16 heads, 63 sectors, 35973 cylinders
Units = cylinders of 1008 * 512 bytes

I know this is wrong since my 30 GB drive shows up as follows under fdisk:

Disk /dev/hdb: 16 heads, 63 sectors, 59598 cylinders
Units = cylinders of 1008 * 512 bytes

Is there an update I can download somewhere for RedHat 6.0? I would prefer to use a command line program like fdisk that I can install using an rpm.

thanks,
Kevin

mdwatts
07-04-2003, 03:58 PM
Nobody ?? :(

Is the full size of the HD recognized by the system bios? That could be the problem.

If it does, you could try GNU Parted (http://www.gnu.org/software/parted/) instead of fdisk.

banzaikai
07-05-2003, 04:28 AM
from: mdwatts
Nobody ??

Sorry, mdwatts, I was helping a friend move to her new apartment :D

kcella could also try to find a BIOS update to allow 132GB drives, or order one from MR-BIOS (if it's not soldered on the mobo). It looks like the classic case of 32GB limit in the BIOS.

kcella,

What's most likely going on here is that your BIOS reads the head, cylinder, and track info from the drive, checks it with it's internal table, says "WTF? There can't be that much room on the drive!", retranslates it to the "leftover" amount after dividing by the max limit (32GB in this case), and settling on that as the right number.

In short, the BIOS screws up.

For Windows users, they just run a "disk manager", which tricks the BIOS into using the correct parameters, and everything's hunky-dorry. Linux, on the other hand, doesn't give a rat's behind about Windows (and why should it?), so this method doesn't always work.

Try GNU Parted, and see if it'll help

Hope this helps...

banzai "better late than never" kai

mdwatts
07-05-2003, 07:38 AM
Originally posted by banzaikai
Sorry, mdwatts, I was helping a friend move to her new apartment :D


How did you know I was specifically asking about you?

I just don't want to answer all or most of the questions here and intentionally left this one for a couple of hours to give others members a chance to help out. Guess it didn't work. :(

mrBen
07-05-2003, 08:13 AM
OK - couple of points to note:

1. Cylinders, heads and sectors ceased to be used to address drives a long time ago - LBA is now used. Most drives now show with 16 heads, 63 cylinders and 65535 sectors, but it shouldn't matter.

2. Linux tends to ignore the BIOS when it comes to drive size - at boot up it takes the data direct from the firmware of the drive, and will usually ignore the BIOS if they are different.

(As an example, I have a 60Gb drive that is set in the BIOS not to detect at all - the BIOS tells Linux that there is no disk, and Linux just goes 'nah - I can see one' and uses it anyway)

So, some suggestions. Firstly, have you checked your jumper sttings. Many drives come with a 32Gb clip setting - make sure you haven't used that.

Secondly, what happens if you try and partition the drive?

Thirdly, if the drive is a slave, try setting the BIOS not to detect it at all, and see if Linux pickups it up at boottime.


(Sorry, mdwatts - should have been here sooner ;) )

glussier
07-05-2003, 08:45 AM
The Redhat 6 kernel is probably too old to recognize the extended lba capacity field of this 120gB drive.

mdwatts
07-05-2003, 08:57 AM
Originally posted by mrBen

(Sorry, mdwatts - should have been here sooner ;) )

Yes you should have Mr. Ben. :p

I just don't want to seem greedy by answering more than my fair share though I do hate to see questions go unanswered so I guess I don't have a choice.

kcella
07-05-2003, 12:40 PM
It is not a BIOS problem. I checked it and it lists it as 120 GB with some like 57K cylinders, etc. And I'm guessing since the BIOS can see the whole thing that the jumpers are also set correctly (as secondary slave).

When I attempt to partition it with fdisk, I get only 18GB. I'm not using an 80 conducter cable since I am only temporarly installing it as a secondary slave, do you think this could cause the problem?

Based on the many helpful suggestions, I will go ahead and try GNU Parted. But I would like to understand why fdisk is not seeing the whole thing. Is it possible that I need to enable LBA?

thanks,
Kevin

mdwatts
07-05-2003, 01:11 PM
I don't think the 80pin connector would have anything to do with it as they are for ATA100/133.

As you suggested, you might want to enable LBA in the bios and see if that helps.

DMR
07-05-2003, 03:08 PM
glussier is right- Rh 6 is very old. I know for a fact that the version of lilo shipped with 6.0 suffered from the 1024-cylinder limitation because it didn't support LBA; I'm sure the same will be true for the other programs of that vintage. For that matter, your particular version of kernal might not even support a drive that large; look throught the output of the "dmesg" command to see if the kernel reports the correct drive capacity.

From the Large Disk HOWTO (http://www.win.tue.nl/~aeb/linux/Large-Disk-1.html):
For large IDE disks (over 33.8 GB): make sure your kernel is 2.0.39/2.2.14/2.3.21 or later

Also, enabling LBA in the BIOS would be a good idea in this case, although with the age of your distro it might not solve the problem.

BTW- mrBen,

You're correct in saying that Linux itself doesn't use/care about disk geometry, but both lilo and fdisk do.

DMR
07-05-2003, 03:11 PM
Originally posted by mdwatts
I don't think the 80pin connector would have anything to do with it as they are for ATA100/133.Right, the use of a 40-pin cable will only affect drive speed, not drive size; the extra 40 pins of the 80-pin cable are just ground lines which improve the signal-to-noise ratio, allowing data to be transferred at the higher ATA100/133 speeds.

kcella
07-05-2003, 03:38 PM
I have since installed GNU Parted and tried partitioning, but ran into the same problem. Then I used the Western Digital installation boot disk to install the drive using one partition of 120GB as Win95 FAT32. Then I rebooted linux and ran fdisk and got the following:

Disk /dev/hdd: 255 heads, 63 sectors, 2257 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 14593 117218241 c Win95 FAT32 (LBA)

This reports a differnet geometry than what I had before and lists the partition with the proper 120GB size. But when I goto use fdisk and create the linux partitions that I want, I run into the same 18GB limit. I am going to post my dmesg results here:

Linux version 2.2.5-15 (root@porky.devel.redhat.com) (gcc version egcs-2.91.66 1
9990314/Linux (egcs-1.1.2 release)) #1 Mon Apr 19 23:00:46 EDT 1999
Detected 1816208951 Hz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 2418.28 BogoMIPS
Memory: 387540k/393152k available (996k kernel code, 412k reserved, 4144k data,
60k init)
VFS: Diskquotas version dquot_6.4.0 initialized
CPU: Intel 00/02 stepping 04
Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.26 (19981001) Richard Gooch (rgooch@atnf.csiro.au)
PCI: PCI BIOS revision 2.10 entry at 0xfb2f0
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
Initializing RT netlink socket
Starting kswapd v 1.5
Detected PS/2 Mouse Port.
Serial driver version 4.27 with MANY_PORTS MULTIPORT SHARE_IRQ enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
pty: 256 Unix98 ptys configured
apm: BIOS version 1.2 Flags 0x07 (Driver version 1.9)
Real Time Clock Driver v1.09
RAM disk driver initialized: 16 RAM disks of 4096K size
hda: WDC AC34000L, ATA DISK drive
hdb: WDC WD307AA, ATA DISK drive
hdc: WDC AC313000R, ATA DISK drive
hdd: WDC WD1200JB-00DUA3, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: WDC AC34000L, 3815MB w/256kB Cache, CHS=969/128/63
hdb: WDC WD307AA, 29333MB w/2048kB Cache, CHS=59598/16/63
hdc: WDC AC313000R, 12416MB w/512kB Cache, CHS=25228/16/63
hdd: WDC WD1200JB-00DUA3, 114473MB w/8192kB Cache, CHS=35973/16/63
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
md driver 0.90.0 MAX_MD_DEVS=256, MAX_REAL=12
raid5: measuring checksumming speed
raid5: using high-speed MMX checksum routine
pII_mmx : 2102.358 MB/sec
p5_mmx : 2082.165 MB/sec
8regs : 2107.311 MB/sec
32regs : 1605.534 MB/sec
using fastest function: 8regs (2107.311 MB/sec)
scsi : 0 hosts.
scsi : detected total.
md.c: sizeof(mdp_super_t) = 4096
Partition check:
hda: hda1 hda2 < hda5 >
hdb: hdb1
hdc: [PTBL] [1582/255/63] hdc1
hdd: [PTBL] [2257/255/63] hdd1
autodetecting RAID arrays
autorun ...
... autorun DONE.
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 60k freed
Adding Swap: 169308k swap-space (priority -1)
3Com 3c90x Version 1.0.0i 1999 <linux_drivers@3com.com>

And if it helps this is the partitioning I am trying to use:

Primary - 9 GB Linux Native
Extended - 111 GB
1 GB Linux Swap
10 GB Linux Native
25 GB Linux Native
75 GB Linux Native

thanks,
Kevin

DMR
07-05-2003, 04:20 PM
-Have you enabled LBA in the BIOS yet?

-Creating a Win partition on the drive won't do anything to solve the problem if Linux's fdisk isn't reading the drive geom correctly. What version of Linux fdisk are you using? To find out:

fdisk -v

Also, your original post seemed to indicate that the 120G drive was hdc, but you dmesg output indicates that it's hdd; which is correct?

kcella
07-05-2003, 04:48 PM
fdisk -v = fdisk v2.9n

I have enabled LBA and it doesn't change anything. The 120GB is hdd, I've rearranged the IDE cables since the hdc post (so it was hdc for the original post and hdd now).


PS -- I get the following message from GNU parted when I run parted /dev/hdd:

GNU Parted 1.6.5
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

Using /dev/hdd
Warning: The partition table on /dev/hdd is inconsistent. There are many
reasons why this might be the case. Often, the reason is that Linux detected
the BIOS geometry incorrectly. However, this does not appear to be the case
here. It is safe to ignore,but ignoring may cause (fixable) problems with some
boot loaders, and may cause problems with FAT file systems. Using LBA is
recommended.
Ignore/Cancel? Ignore
Error: Can't have a partition outside the disk!

thanks,
Kevin

homey
07-05-2003, 05:42 PM
Just to test the theory of an obsolete version of Linux ( and fdisk tools ) maybe you could pop a Knoppix cd in and see how that acts. Knoppix runs from the cdrom so you don't have to install it onto any drives.
Redhat 6 is really old history though and IMHO you aught to consider upgrading. :)

bwkaz
07-05-2003, 07:05 PM
Originally posted by kcella
I am going to post my dmesg results here:

Linux version 2.2.5-15 (root@porky.devel.redhat.com) (gcc version egcs-2.91.66 1 Ding ding ding, we have a winner.

This is the problem. Your kernel is way too old. From David's post up above, from the Large Disk HOWTO:

For large IDE disks (over 33.8 GB): make sure your kernel is 2.0.39/2.2.14/2.3.21 or later Since you have 2.2.X, you need kernel 2.2.14. However, you only have 2.2.5, plus some patches.

This is the problem. Get a newer kernel (or a newer distro altogether, if you can), and I bet it'll work. Any 2.4.X would be OK.

kcella
07-05-2003, 07:35 PM
does anyone know of a site that can guide me through the process of upgradin the kernel?

thanks,
Kevin

mdwatts
07-05-2003, 07:36 PM
Besides http://justlinux.com/nhf/Compiling_Kernels there are lots of tutorials all over the web.

Most distros have documentation on how to upgrade/compile the kernel. Have a look around.

DMR
07-05-2003, 07:55 PM
Kevin,

As previously suggested, you should upgrade your entire distro if possible- upgrading a kernel that old to a more current one is going to cause no end of problems.

mdwatts
07-05-2003, 08:01 PM
Originally posted by DMR
Kevin,

As previously suggested, you should upgrade your entire distro if possible- upgrading a kernel that old to a more current one is going to cause no end of problems.

DMR is correct as you will need to upgrade other packages besides the kernel.

Have a look through the docs at www.kernel.org to find out what upgrading is involved when going from a 'old' kernel to a fairly new. Even from 2.2.5 to a minimum of 2.2.14 may require more than you are willing to manually do yourself or have the experience to accomplish.

Best to upgrade to a later version of your distro if your hardware can support.

kcella
07-05-2003, 08:22 PM
looks like a new distro is my answer. i was able to use a LiveCD and partition the drive, but when I booted into Linux, it would not see my partitions. So that begs the question -- which distro do you recommend? stay with RedHat or try something else?

thanks,
Kevin

homey
07-05-2003, 08:40 PM
cough caaaaaauuredhat9uugh cough

mdwatts
07-06-2003, 07:40 AM
Originally posted by kcella
So that begs the question -- which distro do you recommend? stay with RedHat or try something else?


Checkout the distros websites and see which would be the one that suits your needs (software/hardware support etc.).

In fact if you can, try a few until you find one that supports all of your hardware.