On Sun, 13 Jun 1999, Raider wrote:

>       Hi!
>       As you probably already know I have problems with one of my
> partitions.  To be more exact my Linux root partition.
>       So I started taking notes regarding the numbers that
> describe my hard drive.  AFAIK windoze uses the bios to do that
> autodetection of part of the hardware, while Linux uses the bios as
> little as possible.

Windows 3 uses the BIOS.  I don't know about the "or greater" windoze.
I have never used any.

>       And here are the numbers:
>       - first I redid that autodetection from bios.  And I faced
> three options:
>
opt     size    cyls    head    precomp lands   sect    mode
>
1(y)    8447    1027    255     0       16382   63      LBA

^^^^ I don't like nor trust this.  I could swallow 256 heads, but 255
make me gag.  The hardware registers allow for 16 heads and 64k
cylinders and 255 sectors per track (starting with 1).  Or 262144k
sectors in LBA mode.  (That's right, 128g bytes.)  The BIOS calling
sequence provides for 1024 cylinders, 64 heads, and 63 sectors.  Okay,
the top 2 bits of head # are undefined, so it could go to 256.  But why
use only 255?  That just makes the mapping arithmatic harder.  If there
is a defined LBA mode for the BIOS I don't know of it.  More likely
there is a private understanding between hardware manufacturers and
Micro$oft.  There is also an unofficial standard that uses the top 2
bits of the head number for cylinder number bits 10 and 11, for 4096
"cylinders".

>
2       8455    16383   16      65535   16382   63      normal
>
3       8452    2047    128     65535   16382   63      large
> 
>       The first one is marked with that (y) so I guess that is
> what the bios recommends.  I went for normal when I installed the
> drive first because those are the numbers (C/H/S) that are printed
> on the drive - there wasn't any manual or instruction book with it.
> And it seems to be the largest version.
>       -second there is the report that bios does after post.  So
> for the matter of speed, there isn't done any autodetection at boot
> time.  The bios knows that the primary master IDE drive is the
> second option (the normal drive).  This report looks like this:
> Pri. master: CHS, UDMA 2, 8455M
> Sec. master: LBA, Mode 3, 560M
>       The secondary master is my old drive which works perfectly.
> Here are some things that puzzle me.  So the first field of the
> description should be that LBA/normal/large thing.  What is CHS?
> Cyls/Heads/Sectors?  Than the second field.  I'm guessing Mode 3

^^^^^^^^^^^^^^^^^^  yep. :-)

> means the third PIO mode.  There are 4 PIO modes standard and a few
> others.  UDMA 2 is related with PIO?  Sizes are accurate.

I don't know what the U is.  DMA is direct memory access, meaning the
channel does the IO to a block of physical memory.  In PC's, it is used
mostly for the floppy(!).  With PIO, all data goes to and from the hd 
through the CPU.  (This is why a good modem has a fifo :-). 

>       -third and last this is what Linux autodetects... it can be 
> seen with dmesg.
> hda: <the drive id which seems ok> 8063MB w/416kB Cache, LBA,
> CHS=16383/16/63

This is what linux gets by asking the drive what it is without using the
BIOS.  There is an identify drive command defined in the ANSII spec for
ATA (IDE) drives.  LBA here means that the drive is capable of using it,
and if it sees bit 6 of the drive/head register set on any IO, it will
interpret the other registers as a zero-based block addres rather than
CHS.  8063 MB, where 1 MB = 1048576 bytes, not 1000000.
 
>       How come the size is 8063?  None of the options were like
> that.  I don't know about the cache.  But my 'normal' drive is now
> LBA?  And at the same time the CHS are correct.  Afaik in case the
> drive is seen uncorrectly I can define the C/H/S.  But nothing more.

If the drive is capable of the hardware LBA, linux will use it
> 
>       Guys, is there a problem?  All I know is that something is
> messing up with my root partition.
>       Also, can somebody spend some time to explain me the parts I
> don't know?  Or at least point me a etext somewhere on the net that
> describes this kind of stuff.
> 
>       Thanks in advance,
>       Raider
> --
>               ``Liberate tu-temet ex inferis''
> 
By now you should have dosfsck, and bpe.  I still don't trust the
partition boot record in hda1.

I see your old drive is on hdc.  If you have a CMD640 ide interface chip
that the IDE driver doesn't detect, this may scramble data on both
drives.  If you don't suffer from a CMD640, of course it's better to
have the drives on different channels.

Lawson





___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: http://dl.www.juno.com/dynoget/tagj.

Reply via email to