>     Well, I check FFDISK sources... Create_MBR() replaces boot code, adds
> signature and not touches partition table area. Strange logic - if there is
> no valid MBR, then partition table area also should be cleared. But all this
> should be done in internal buffers.

> EA> Several users have lost their boot loader,
>     You wish to say, that some boot-loaders don't have MBR signature?

The problem was that they experienced read errors (for example
because of disk driver / UMB / DMA issues) which made FDISK
believe that it would be appropriate to write a new sector...
Depending on whether the read-modify-write step also had a
read error, they either lost only the boot loader code or
also the partition table.

> EA> some even their partition table (see below),
> EA> because Create_MBR_If_Not_Present fails
> EA> to check for Read_Physical_Sectors errors.
> EA> It just trusts the buffer contents. Oops.

>     Oops.
>     ...ie. garbage in case of missing MBR or read error.

Yes.

> But what wonder me: if there is no MBR, then garbage should not destroy
> anything, so partition table (PT) will be destroyed only in case of read
> error. BUT! Read error (of MBR) is sparse thing and it anyway makes disk
> unusable - so how current FreeFDISK behavior will destroy PT?

Depends. A read error never destroys the data on disk until
you write the data back... So when you see that FDISK shows
weird partitioning, you should probably reboot and be more
conservative with UMBs and disk drivers and not write back
anything...

I agree that FDISK works quite well if you have no read errors.
Most proper boot loaders do have proper signatures in the MBR.
In general, error handling in FDISK is quite bad at the moment.

Of course we could drop it completely and switch to XFDISK, but
I do not know how good this is. And FreeFDISK exists mainly for
the reason that it clones the MS FDISK look and feel (which I
do not like anyway ;-)). Which is probably also why we did not
drop it yet ;-).

Eric



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to