Re: fdisk partition table keeps missing.

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 10 Aug 1999 13:31:13 +0100 (BST)


> up, either because my fdisk, mkfs process is wrong or something wrong in my
> driver.

Well fdisk and mkfs work for everything else in the universe so...

> 2, With 'w' option to write on HD and exit.
> From analyzer, it shows command are executed correct and data has been
> written to HD and read capacity also gets correct data back.

To the right block on the disk ?

> 3, Exit from 'fdisk' and reenter again, partition table is there.

Ok it might be cached.

> 4, With single raw IO test on new created partition /dev/sda1 and /dev/sda2,
>
> test running OK. From analyzer and disk activity LED shows the disk read
>
> and write performed normally on the disk.

Ok. Including block numbers ?

> 5, Run 'fdisk' again and found the partition table is gone.

So you overwrote it - that tends to indicate your disk block mapping is going
wrong.

> My feeling is something wrong during the system writing operation but don't
> know for sure. Also don't know why first time after created partition table
> and reboot system, the partition table is gone.
> Any advice here?

See if a partition just in the first 1Gig of the disk works - dont touch
anything else. If so you may well have a 32/64bit issue.

Also open the /dev/sda raw and write zero to each block on the disk. Now
go through each block making sure that it is zero on read and write the block
number to it. Finally go through each block and read the block number back
to check it is there, then write zero.

If that bit survives it may be your partition handling code not your low
level code that is playing up.

Alan

-
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/