Can't write partition table

  • Thread starter Thread starter Grzesiek
  • Start date Start date
G

Grzesiek

Hi,

I have big problem. I lost my partition table, however, I was able to
guess it by gpart application. Right now I am trying to write it to
HD, but it is not so easy. I am using fdisk, however, when I exit from
fdisk, all partition information is lost (yes, I exit by "w" not "q").
Do you know what might be a problem and how to fix it?

Regards,
Grzegorz
 
Grzesiek said:
I have big problem. I lost my partition table, however, I was able to
guess it by gpart application. Right now I am trying to write it to
HD, but it is not so easy. I am using fdisk, however, when I exit from
fdisk, all partition information is lost (yes, I exit by "w" not "q").
Do you know what might be a problem and how to fix it?

Most likely you have virus protection enabled in the bios.
 
Most likely you have virus protection enabled in the bios.

I tried on 2 different PCs. I also checked BIOS settings and there was
nothing about virus protection. If it is enabled, it should give some
warning message that something is going to write to MBR. However, I do
not have any message. It looks like new info is written, but I can't
see changes.
 
In said:
I have big problem. I lost my partition table, however, I was able to

Hi Grzesiek, WHAT was Your original failure message?
guess it by gpart application. Right now I am trying to write it to
HD, but it is not so easy. I am using fdisk, however, when I exit from
fdisk, all partition information is lost (yes, I exit by "w" not "q").
Do you know what might be a problem and how to fix it?

There are several options depending on Your FileSystem,
i.e. see Q69013 for the MBR which follows:
===
FDISK /MBR rewrites the Master Boot Record
View products that this article applies to.
Article ID : 69013
Last Review : January 18, 2007
Revision : 2.5

This article was previously published under Q69013
On This Page
SUMMARY
MORE INFORMATION
What is the MBR?
Why is the MBR Changed During Setup?
WARNINGS
REFERENCES
SUMMARY
The MS-DOS Fdisk utility usually updates the master boot record (MBR) only
if no master boot record exists. Repartitioning with Fdisk does not rewrite
this information.

Fdisk has an undocumented parameter called /mbr that causes it to write the
master boot record to the hard disk without altering the partition table
information.

Warning Writing the master boot record to the hard disk in this manner can
make certain hard disks partitioned with SpeedStor unusable. It can also
cause problems for some dual-boot programs and disks with more than four
partitions.
Back to the top

MORE INFORMATION
What is the MBR?
At the end of the ROM BIOS bootstrap routine, the BIOS reads and executes
the first physical sector of the first floppy or hard disk on the system.
This first sector of the hard disk is called the master boot record (or
sometimes the partition table or master boot block). There is a small
program at the beginning of this sector of the hard disk. The partition
information, or partition table, is stored at the end of this sector. This
program uses the partition information to determine which partition is
bootable (usually the first primary DOS partition) and attempts to boot from
it.

This program is written to the disk by the fdisk /mbr command and is usually
called the master boot record. During typical operation, Fdisk writes this
program to the disk only if there is no master boot record.

NOTE: The fdisk /mbr command only re-writes the MBR on the system drive
(DISK-0) using BIOS calls. You cannot specify any other drive for the fdisk
/mbr command to operate on other than DISK-0.
Back to the top

Why is the MBR Changed During Setup?
During the installation of Microsoft MS-DOS Upgrade, Setup replaces the
master boot record on the hard disk with code to display a message similar
to:
The MS-DOS 5.0 Setup was not completed.
Insert the UNINSTALL #1 diskette in drive A.
Press the ENTER key to continue.
This message should be erased and the master boot code rewritten before
Setup is completed. If a problem occurs during Setup and you return to the
previous version of MS-DOS, Uninstal should also remove this message.
However, if Setup or Uninstal does not remove this message, or if the master
boot record becomes corrupted, a new master boot record can be written to
the disk using the following command:
fdisk /mbr
Back to the top

WARNINGS
Do not use this command if any of the following conditions exists: . The
disk was partitioned using the Storage Dimensions SpeedStor utility with its
/bootall option.
. More than four partitions exist.
. Certain dual-boot programs are in use.
The Storage Dimensions SpeedStor utility with the /bootall option redefines
the drive's physical parameters (cylinder, head, and sector). The /bootall
switch stores information about how the drive has been changed in an area of
the master boot record that MS-DOS does not use. The fdisk /mbr command
erases that information, making the disk unusable.

Some older original equipment manufacturer (OEM) versions of MS-DOS and some
third-party partitioning utilities can create more than four partitions.
Additional partition information is commonly stored information on
partitions in an area that the fdisk /mbr command overwrites.

Some dual-boot programs have a special MBR that asks you at startup which
operating system you want to use. The fdisk /mbr command erases this
program. Dual-boot systems that boot whichever partition is marked Active
are not affected by the fdisk /mbr command.

For more information about how to partition a hard disk, click the following
article number to view the article in the Microsoft Knowledge Base:
255867 (http://support.microsoft.com/kb/255867/) How to Use the Fdisk Tool
and the Format Tool to Partition or Repartition a Hard Disk
The third-party products that are discussed in this article are manufactured
by companies that are independent of Microsoft. Microsoft makes no warranty,
implied or otherwise, regarding the performance or reliability of these
products.

Back to the top

REFERENCES
More information on partitioning, disk organization, and the boot sequence
can also be found in Chapters 3 and 8 of the DOS Programmer's Reference by
Terry Dettmann, published by the QUE Corporation; Chapters 2 and 10 of
Advanced MS-DOS Programming by Ray Duncan, and article 3 of The MS-DOS
Encyclopedia, both published by Microsoft Press.
Back to the top


--------------------------------------------------------------------------------

APPLIES TO
. Microsoft MS-DOS 6.22 Standard Edition
. Microsoft Windows 95
. Microsoft Windows 98 Standard Edition
. Microsoft Windows Millennium Edition

Back to the top

Keywords: kbinfo KB69013

Back to the top

=== End of topic

You'll also see about 16 entries using search word *partition table*

using the Windows HELP function!

I don't tend to copy these because they appear in German Language:

One example might be the Tool "Diskpart.efi" (hit = 5 of 16)

"GUID-Partitionstable- create Partition on a RAW-HDD via Windows"Artikel-ID
: 297800 - changed 2003-09-17 - Version 1.0
: Mittwoch, 17. September 2003
Version : 1.0
===

but when You used "gpart" - why then reflecting a Win function?

GPART should also be able to restore an assumened Partition Table?

I've not yet used those Linux tools - so I've no experiance yet!

Otherwise the PTBL should not be such a great problem?

Oh, I see I did not mention "diskpart" yet:

=== DISKPART
C:\Dokumente und Einstellungen\Horst Franke>diskpart /?
Microsoft DiskPart Version 5.1.3565 MT348G

Syntax für Microsoft-Datenträgerpartitionierung:
diskpart [/s <Skript>] [/?]

/s <Skript> - Verwendet ein Datenträger-partitionierungsskript.
/? - Zeigt diese Hilfe an.

===
DISKPART> list - Microsoft DiskPart Version 5.1.3565
==============
DISK - Druckt eine Liste der Datenträger.
PARTITION - Druckt eine Liste der Partitionen auf dem aktuellen
Datenträger.
VOLUME - Druckt eine Liste der Volumes.

DISKPART> disk - Microsoft DiskPart Version 5.1.3565
==============
ADD - Fügt eine Spiegelung einem einfachen Volume hinzu.
ACTIVE - Markiert die aktuelle Basispartition als aktive
Startpartition.
ASSIGN - Weist dem gewählten Volume einen Laufwerkbuchstaben oder
einen Bereitstellungspunkt zu.
BREAK - Teilt eine Spiegelung auf.
CLEAN - Löscht die Konfigurations- oder alle Informationen vom
Datenträger.
CONVERT - Führt Konvertierungen zwischen Datenträgerformaten durch.
CREATE - Erstellt ein Volume oder eine Partition.
DELETE - Löscht ein Objekt.
DETAIL - Zeigt Details über ein Objekt an.
EXIT - Beendet die Datenträgerpartitionierung.
EXTEND - Erweitert ein Volume.
HELP - Druckt eine Liste der Befehle.
IMPORT - Importiert eine Datenträgergruppe.
LIST - Druckt eine Liste aller Objekte.
INACTIVE - Markiert die aktuelle Basispartition als inaktive
Startpartition.
ONLINE - Schaltet einen als offline markierten Datenträger online.
REM - Keine Aktion. Wird für Skriptkommentare verwendet.
REMOVE - Entfernt einen Laufwerkbuchstaben oder eine
Bereitstellungspunktzuordnung.
REPAIR - Repariert ein RAID-5-Volume.
RESCAN - Überprüft den Computer erneut auf Datenträger und Volumes.
RETAIN - Setzt eine Sicherungspartition unter ein einfaches Volume.
SELECT - Verschiebt den Fokus auf ein Objekt.
===
DISKPART> partition - Microsoft DiskPart Version 5.1.3565
===================
ADD - Fügt eine Spiegelung einem einfachen Volume hinzu.
ACTIVE - Markiert die aktuelle Basispartition als aktive
Startpartition.
ASSIGN - Weist dem gewählten Volume einen Laufwerkbuchstaben oder
einen Bereitstellungspunkt zu.
BREAK - Teilt eine Spiegelung auf.
CLEAN - Löscht die Konfigurations- oder alle Informationen vom
Datenträger.
CONVERT - Führt Konvertierungen zwischen Datenträgerformaten durch.
CREATE - Erstellt ein Volume oder eine Partition.
DELETE - Löscht ein Objekt.
DETAIL - Zeigt Details über ein Objekt an.
EXIT - Beendet die Datenträgerpartitionierung.
EXTEND - Erweitert ein Volume.
HELP - Druckt eine Liste der Befehle.
IMPORT - Importiert eine Datenträgergruppe.
LIST - Druckt eine Liste aller Objekte.
INACTIVE - Markiert die aktuelle Basispartition als inaktive
Startpartition.
ONLINE - Schaltet einen als offline markierten Datenträger online.
REM - Keine Aktion. Wird für Skriptkommentare verwendet.
REMOVE - Entfernt einen Laufwerkbuchstaben oder eine
Bereitstellungspunktzuordnung.
REPAIR - Repariert ein RAID-5-Volume.
RESCAN - Überprüft den Computer erneut auf Datenträger und Volumes.
RETAIN - Setzt eine Sicherungspartition unter ein einfaches Volume.
SELECT - Verschiebt den Fokus auf ein Objekt.

DISKPART> volume - Microsoft DiskPart Version 5.1.3565
================
ADD - Fügt eine Spiegelung einem einfachen Volume hinzu.
ACTIVE - Markiert die aktuelle Basispartition als aktive
Startpartition.
ASSIGN - Weist dem gewählten Volume einen Laufwerkbuchstaben oder
einen Bereitstellungspunkt zu.
BREAK - Teilt eine Spiegelung auf.
CLEAN - Löscht die Konfigurations- oder alle Informationen vom
Datenträger.
CONVERT - Führt Konvertierungen zwischen Datenträgerformaten durch.
CREATE - Erstellt ein Volume oder eine Partition.
DELETE - Löscht ein Objekt.
DETAIL - Zeigt Details über ein Objekt an.
EXIT - Beendet die Datenträgerpartitionierung.
EXTEND - Erweitert ein Volume.
HELP - Druckt eine Liste der Befehle.
IMPORT - Importiert eine Datenträgergruppe.
LIST - Druckt eine Liste aller Objekte.
INACTIVE - Markiert die aktuelle Basispartition als inaktive
Startpartition.
ONLINE - Schaltet einen als offline markierten Datenträger online.
REM - Keine Aktion. Wird für Skriptkommentare verwendet.
REMOVE - Entfernt einen Laufwerkbuchstaben oder eine
Bereitstellungspunktzuordnung.
REPAIR - Repariert ein RAID-5-Volume.
RESCAN - Überprüft den Computer erneut auf Datenträger und Volumes.
RETAIN - Setzt eine Sicherungspartition unter ein einfaches Volume.
SELECT - Verschiebt den Fokus auf ein Objekt.
===

OK, to be accurate, I don't see any option besides "CLEAN" but

no option to recreate a partition table ;-(

But there are other tools available to recreate lost partitions.

By further searches I found: *Fixboot*

Schreibt einen neuen Partitionsbootsektor auf der Systempartition. Der
Befehl fixboot steht nur bei Verwendung der Wiederherstellungskonsole zur
Verfügung.

fixboot [Laufwerk]

Parameter

Laufwerk

Das Laufwerk, auf dem der Bootsektor geschrieben werden soll. Hiermit wird
das Standardlaufwerk ersetzt (die Systempartition, bei der Sie angemeldet
sind). Beispiel für ein Laufwerk:

D:

Beispiel

Mit dem folgenden Beispiel wird ein neuer Partitionsbootsektor auf der
Systempartition von Laufwerk D: geschrieben:

fixboot d:

Anmerkung

a.. Wenn Sie den Befehl fixboot ohne Parameter verwenden, wird ein neuer
Partitionsbootsektor auf der Systempartition geschrieben, bei der Sie
aktuell angemeldet sind.
Verwandte Themen

OK, this also does not recreate a patitionstable ;-(

Now, I'm someware lost - but there are tools, that recreate the PT!

Formally I used Partition Magic and was able to save/restore the PT.

But there are others like Paragon or Acronis Tools, that should be able

to perform the same. May be also the "VCOM Fix It Utilities"

(formerly presented by Ontrack).

By now I had no need to use any of these tools - so please treat it

as "reading only" w/o any experience by me.

Horst
 
In
Grzesiek said:
I tried on 2 different PCs. I also checked BIOS settings and there was
nothing about virus protection. If it is enabled, it should give some

Hi Grzesiek, WHAT did You try on 2 different PCs?
Checking for the same problem or moved the faulty HDD to another
system? Please be more specific with Your statements!
warning message that something is going to write to MBR. However, I do
not have any message. It looks like new info is written, but I can't
see changes.

WHAT problem do You want to talk about: Rewriting the MBR or
recreating the Partition Table?
These are two *different* things!

And again WHAT was Your original failure message?
Horst
 
Grzesiek said:
Hi,

I have big problem. I lost my partition table, however, I was able to
guess it by gpart application. Right now I am trying to write it to
HD, but it is not so easy. I am using

Big mistake.
however, when I exit from
fdisk, all partition information is lost (yes, I exit by "w" not "q").
Do you know what might be a problem and how to fix it?

Fdisk writes F6 characters to space it considers to be free, at particular sector
intervals, even though you quit. These F6 sectors will now have been written all
through your FATs and directories (if the partiton was FAT).

IIrc, Svend Olaf Mikkelsen has a special command in one of his utilities that can
combine 2 damaged FATs into a single good one.

This thread may be helpful:
MBR / bootsector / FAT wiped by FDISK - unreadable ! FINDPART (Mikkelsen)

And here is a link to his website if you want to email him for assistance:
http://www.partitionsupport.com/

Also, (if you manage to recreate the MBR first) do not run scandisk or checkdsk
before the issue with the FATs has been resolved. Similar to Fdisk it may secretely
copy one of the FATs to the other -making them equal- even when you don't let it do
repairs.

Zvi Netiv has a utility (resqit) that can recreate an MBR automatically.
http://invircible.com/download/resq.exe
 
Horstshit is back.

Horst Franke said:
In

Hi Grzesiek, WHAT did You try on 2 different PCs?
Checking for the same problem or moved the faulty HDD to another
system? Please be more specific with Your statements!


WHAT problem do You want to talk about: Rewriting the MBR or
recreating the Partition Table?
These are two *different* things!

And again WHAT was Your original failure message?
Horst
 
If you have recreated the partition using MS Fdisk then you are in worse
shape than you were before. As Folkert points out this will ruin the boot
sector, the FATs and some of your data. Our DiskPatch can be used to
recreate a valid boot sector and will repair Fdisk damage done to the FATs
(http://www.diydatarecovery.nl/dp_manual/guide_fatbsrepair.htm).

In case the MBR/partition table is still invalid it can repair that as well,
you'd need to do that first
(http://www.diydatarecovery.nl/dp_manual/guide_ptrepair.htm).

If you want us to have a look at the current situation feel free to post a
DiskPatch (demo is fine) support analysis logfile in our forum
(http://www.diydatarecovery.nl/dp_manual/guide_supportanalysis.htm).

--

Kind regards,
Joep - DIY DataRecovery.nl

http://www.diydatarecovery.nl
 
Big mistake.


Fdisk writes F6 characters to space it considers to be free, at particular sector
intervals, even though you quit. These F6 sectors will now have been written all
through your FATs and directories (if the partiton was FAT).

Hi.

Note that this probably was Linux fdisk, which does not have the same
problem as MS fdisk.
 
Svend Olaf Mikkelsen said:
Hi.

Note that this probably was Linux fdisk, which does not have the same
problem as MS fdisk.

G'dammit, I hate those troll questions where every sentence can mean some-
thing else and your imagination takes over rather than careful examination,
especially when something similar once happened to yourself.

Yes, on re-read there are a few clues that this wasn't MS Fdisk.
And he did write a new MBR, contrary to what I anticipated.
And why the hell did he use Fdisk when Gpart itself can (re-)write
the MBR exactly as wanted.

So with "all partition information is lost" he probably meant that the par-
tition bootblock and formatting info and all the rest was 'lost', not the MBR.
But here I go guessing again. Does Linux Fdisk clear partition Bootblocks?
 
Previously Svend Olaf Mikkelsen said:
On Mon, 16 Jul 2007 15:52:01 +0200, "Folkert Rienstra"


Note that this probably was Linux fdisk, which does not have the same
problem as MS fdisk.

Indeed. Linux fdisk does not write anything, except the partition
tables. It does not consider anything "free" and can be used to re-create
accidentially deleted partitions.

Arno
 
Previously Grzesiek said:
I have big problem. I lost my partition table, however, I was able to
guess it by gpart application. Right now I am trying to write it to
HD, but it is not so easy. I am using fdisk, however, when I exit from
fdisk, all partition information is lost (yes, I exit by "w" not "q").
Do you know what might be a problem and how to fix it?

How do you determine that the partition information is lost?
What does fdisk tell you on exit?

Arno
 
I tried on 2 different PCs. I also checked BIOS settings and there was
nothing about virus protection. If it is enabled, it should give some
warning message that something is going to write to MBR. However, I do
not have any message. It looks like new info is written, but I can't
see changes.
 
Horst said:
Hi Grzesiek, WHAT was Your original failure message?

<heavily edited, for brevity>

Hello, Horst:

Welcome back! Where have you been, since last year?
=== DISKPART
C:\Dokumente und Einstellungen\Horst Franke>diskpart /?
Microsoft DiskPart Version 5.1.3565 MT348G

Syntax für Microsoft-Datenträgerpartitionierung:
diskpart [/s <Skript>] [/?]

/s <Skript> - Verwendet ein Datenträger-partitionierungsskript.
/? - Zeigt diese Hilfe an.

===
DISKPART> list - Microsoft DiskPart Version 5.1.3565
==============
DISK - Druckt eine Liste der Datenträger.
PARTITION - Druckt eine Liste der Partitionen auf dem aktuellen
Datenträger.
VOLUME - Druckt eine Liste der Volumes.

<heavily edited>

Hey, Herr Franke -- how do you expect most of us Amerikaners to read
Deutsch, anyway? <g>


Cordially,
John Turco <[email protected]>
 
In said:
Welcome back! Where have you been, since last year?
Sorry John, but I read this Ng only by chance.
Hey, Herr Franke -- how do you expect most of us Amerikaners to read
Deutsch, anyway? <g>

Sure, most of the Americans will speek/understand German ;-(
Horst
 
Horst said:
Sorry John, but I read this Ng only by chance.

Hello, Horst:

Sure, most of the Americans will speek/understand German ;-(
Horst

Well, German-Americans are the largest ethnic group, in the United
States, today. Relatively few of them understand the language of
their ancestors, alas.


Cordially,
John Turco <[email protected]>
 
Back
Top