Re: New Information -- Re: Answer (Re: Cylinder limits jumper for drivesover 32GB)

From: David Elliott (dfe@infinite-internet.net)
Date: Sun Apr 02 2000 - 21:33:25 EST


"John Anthony Kazos Jr." wrote:

> Some of you are right. Some of you are wrong. Some of you are right in
> some circumstances. Irrespective of that...
>
> I have a Maxtor 40G (54098U8) and an M748LMRT mainboard. My BIOS locks up
> on autodetecting the drive. I followed the instructions in the manual for
> the drive and manually set the recommended values (16383/16/63) that were
> printed on the drive. In the BIOS setup, it now says the drive is around
> 8G. I restart, and I look above the LILO prompt. The BIOS spits out the
> numbers I put in (16383/16/63) but next to it correctly states that the
> drive has 40981M. I boot into Linux and it recognizes that it is over

Hmm.. that is interesting. It appears that your BIOS spits out the
16383/16/63 CHS but then is still reading the correct LBA capacity from the
drive. What is amazing is that unlike my BIOS, it is not locking up and
choking on the > 32 GB LBA capacity.

>
> 32G. However, I can't get the full capacity. I run fdisk and it gives the
> drive 4982/255/63 (about 38G). If I increase the cylinder count to the

That is correct: 4982*255*63=80035830 which is the number of sectors (512
bytes per sector). Of course that is technically a tad short since the drive
really has 80041248 sectors. Of course 4983*255*63 would yeild 80051895
sectors which would be over capacity! I think what is happening is you are
thinking.. okay: 4982*255*63=80035830*512 bytes per sector is 40978344960
bytes/1024/1024/1024 is 38.164057732 (to the correct number of 11 significant
figures). So you go OH MY GOD it's reporting it as 38 GB.... When in reality
all HD manufacturers use an even 1000*1000*1000 to market the drives. Now..
the number linux uses is the total LBA capacity which is
80041248*512=40981118976/1024/1024/1024=38.166641235 (again.. 11 sigfigs).
So your 40 GB drive really is supposed to report 38 GB. It is entirely
correct for the HD manufacturers to use the "giga" prefix as 1000000000
because in SI units, that is correct. I remember about a year ago a story on
slashdot of using the prefix miba and giba to mean 1048576 and 1073741824
respectively. That would reduce some confusion because you would then have a
40 gigabyte drive, but the computer would say 38.1 gibabyte drive, both of
which would be technically correct. Even worse though, 40GB==38.1GB in this
case if you like to abbreviate to the ambiguous GB label!!!

In any case though, you *ARE* seeing the full capacity of your drive. Now,
there are those few slack sectors between 80035830 and 80041248. In order to
make use of those, please consult an FAQ about how the PC partitioning scheme
works. I believe the "large disk FAQ" has some info which will help you.
Basically the gist of it is that on the very last partition, you extend it a
little past cylinder 4982 and partway into the next cylinder. Linux and NT
can handle partitions that are not on perfect cylinder boundaries (they read
the LBA capacity anyway). DOS cannot, so never place a DOS partition at the
end like that. And if you do partition like that, never expect to be able to
correctly use Win9x FDISK again.

>
> appropriate drive size, I get buku sector-not-found errors on mk32fs. If
> I set the drive in the BIOS to be 37500(something around there)/32/63,
> and set fdisk to the same data, it works fine. However, in both cases,
> where it fails and where it does not, the data are reset upon reboot and
> my new full-disk partition now is larger than the drive. I finally gave
> up and am using only 38G of it (formatted, 37G). So, obviously, Linux
> appropriately is ignoring what the BIOS says, but it still is not doing
> it correctly.
>

No, it is doing it perfectly fine, you have a 38 gigabyte drive, face it.

>
> (If anyone wants detailed BIOS information, I'll email it. I was too
> lazy to reboot and write it down while composing this mail.)
>
> Any ideas?
>
> As a side note, does anyone know how to mount root as read-only (for
> the purpose of moving the root partition from one drive to another).
> I've tried '-o remount,ro' and the same while under 'linux single';
> in the first case it doesn't work (init, among other things, is
> still using the partition) and in the second case fails without even
> an error message. (I hate when computers ignore me. It makes me
> recognize my status of partner to the computer and slave to reality.)
> I have asked this on linux-admin and linux-config, and wanted to get
> another set of brains on it. And it doesn't count as OT unless it's
> the main message. :P
>

actually, to move one drive to another I suggest going into single user
mode. There shouldn't be anything running that is actually going to write to
the disk then. Even if it does write something, like a log maybe, don't
worry about it, you'll just loose any log info from the time you copy the
file until you boot with the new drive.. it doesn't matter.

I suggest using cpio in "copy-pass" mode to do the actual copying since cpio
seems to not fudge device nodes like tar does. That and cpio has the
copy-pass mode built in anyway, instead of piping two copies of tar together.

After the copy, chroot to your new system, fix the appropriate config files,
lilo and reboot.

-Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:09 EST