Jump to content











Photo
- - - - -

best mbr/partition back ups?

backup

  • Please log in to reply
10 replies to this topic

#1 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 07 August 2015 - 01:30 PM

hi all,

I want to add a logical partition with Xpx64 at the end of a 1.5TB USB HDD. has 11 partitions on it now that I spent alot of time to make work because most of the partitions Ive made bootable using PTEdit and adjusting offsets to boot from logical.

before I make any changes to the partition structure I want to make sure I have a solid back-up strategy first since Ive lost work like this in the past by adding to it. one time I had a similar setup and when attempting this same thing (adding a single logical partition at the end) somehow all the partitions in the extended area disappeared!


what tools do I need to use to be able to recover from this if it happens again?

thanks

#2 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 07 August 2015 - 01:53 PM

my main concern is if a normal backup of mbr will save a hybridized patririon layout? (one Ive edited sector info in order to boot XP variants from logical partitions)

Ive been using mbrwhisky but sometimes it returns strange format type info that does not match what diskmananger displays and I have never tried to restore an mbr with a backup from mbrwiz so I just want to be sure as possible I have a solid back up before I mess with a layout that I spent weeks to perfect.

thanks

#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14323 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 August 2015 - 02:33 PM

Logical partitions do not exist.

A partition is either Primary or Extended.

A logical volume can be created inside the Extended Partition.

The MBR lists ONLY 4 Primary partitions or 3 Primary partitions and an Extended one.

 

What (the heck) is a hybridized partition "layout" according to you?

The term hybrid is nowadays used for "hybrid" MBR/GPT MBR's or for hybrid .iso's, i.e. iso's that are the same time a CD/DVD image and a hard disk image.

 

Correcting the "sectors before" happens in the bootsector (or PBR or VBR) and has nothing to do with partition "layout", you are simply replacing a relative offset (from the last EMBR/EPBR) with an absolute offset (from the actual MBR or LBA0).

 

In a nutshell:

  • If you have only Primary partitions, backing up the MBR is enough.
  • If you have one Extended partition you need to backup both the MBR and each and every EMBR/EPBR in the Extended Partition chain. 

The former is easy (and *any* tool will do nicely), the latter is (or can be) complex.

 

Try what you can get with secinspect.exe/SI.bat:

http://thestarman.pc...sRefs.htm#SIbat

 

:duff:

Wonko



#4 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 07 August 2015 - 03:15 PM

hi Wonko,

it seems that you and from the info in the linkage youve posted, suggest that I can back up everything only in a text file as a reference and then to restore I would need to do it manually again with PTedit, is this correct?

also, this part "so we assume Microsoft included this dire warning only to let you know that you could be overwriting critical information on the same disk you are reading from?" makes me not want to try it. could the same data be re-aquired by running PTEdit and just writting down all the results so that I can re-enter later if needed and would that work?

thanks

#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14323 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 August 2015 - 03:47 PM

Yes and no.

As said backing up the MBR is easy.

To backup the whole chain of EPBR/EMBR's needs some "intelligent parsing" and since there are a lot of assumptions (some right some wrong) in the zillion programs that can be used to partition (or re-partition) hard disks on different or on same Operating System, often conflicting between them on how a disk is actually partitioned it is possible that the parsing of the info is incorrect.

 

More than that, while it is easy enough to compare two MBR's (let's say current vs. backed up) comparing a whole chain with another one is more complex, as each  EPBR/EMBR contains two "partition like" entries:

1) pointing to the actual volume

2) pointing to next EMBR/EPBR

Let's see if I can explain the issue:

MBR:

#0 or (hd0,0) Primary partition at offset 63 with extent of 100000 sectors

#1 or (hd0,1) Extended partition at offset 100063 with extents 200000 sectors

Outside the MBR:

First EMBR/EPBR at offset 100063 and contains two entries:

#4 or (hd0,4) Logical volume at offset 100126 with extents 50000 sectors

Second EMBR/EPBR at offset 150126 containing two entries:

#5 or (hd0,5) Logical volume at offset 150189 with extents 50000 sectors

Third EMBR/EPBR at offset 200189 containing two entries:

#6 or (hd0,6) Logical volume at offset  200252 with extents 50000 sectors

Fourth EMBR/EPBR at offset 250252 containing two entries:

#7 or (hd0,7) Logical volume at offset 250315 with extents 49748 sectors

Blank entry as the chain is interrupted

 

Maybe you can now appreciate the "telescopic nature" of the contents of an Extended Partition, the above represents a "normal" partitioning scheme (in the sense of "sequentially created"), but if you delete (say) the (hd0,5) and (hd0,6) the partitioning editing software will change the second entry in the First EMBR/EPBR to point to the Fourth EMBR/EPBR (which obviously becomes the Second one).

When you re-use the extents previously occupied by the deleted volumes, a new "Third" EMBR/EPBR will be introduced and - depending on the procedure/program used it may be linked to by the "Second" (ex "Fourth") or by the "First" (and then the new "Third" will become the "Second" and the "Second" (ex -"Fourth") will become "Third".

 

If you are confused by the above, don't worry, it's pretty much normal as it is confusing, you'll probably need some time to digest the concepts, that I hope to have anyway somehow helped in clearing.

 

:duff:

Wonko



#6 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 07 August 2015 - 04:11 PM

I can see it more clearly than before anyway..

I recall having set up a HDD with several EMBR/EPBR edited to boot OSs from extended logical partitions as I decribed earlier and one time I decided to change an OS in the middle of the "chain" of EMBR/EPBRs.

I simply used diskmanager to delete a partition so I could recreate it fresh again but what I did not expect is it wipped out several others when I only deleted one!

I think a better plan for now is to delete only the OS files and folders inside another existing partition that is now less desirable than the one I wanted to add at the end and then copy the files/folders of the new one to that old one without modifying any MBR/EMBR/EPBR data.

I just dont want to screw up the largest HDD I have. not only the data (its all backed up) but more importantly, it took lots of time to make it all work.


thanks

#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14323 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 August 2015 - 08:32 AM

I recall having set up a HDD with several EMBR/EPBR edited to boot OSs from extended logical partitions as I decribed earlier and one time I decided to change an OS in the middle of the "chain" of EMBR/EPBRs.
 

And AGAIN those were modified PBR's (or VBR's or bootsectors or partition/volume boot records), namely ONLY the "Sectors Before" or "Hidden Sectors" field in them, NOT ANYTHING in the EMBR/EPBR chain:

http://www.goodells.net/multiboot/

http://www.goodells....ot/ptable.shtml

 

:duff:

Wonko



#8 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 459 posts
  •  
    Thailand

Posted 08 August 2015 - 01:07 PM

I simply used diskmanager to delete a partition so I could recreate it fresh again but what I did not expect is it wipped out several others when I only deleted one!

One disk manager that has this bug is Windows XP disk management.
Whenever it changes anything in MBR, it will also delete partitions that do not end on cylinder boundary.
It will do this even if you just tell it to change active partition.
Partitions created by Windows XP are not affected.

Partitions created by Windows Vista and later (which ignore disk geometry) are susceptible to this bug.
It is super bad bug.
If you use Windows XP, be very careful.
It is possible to create partitions that have 1MB alignment in Windows Vista+ and also be compatible with Windows XP.
Make sure all partitions end on (multiple of 16065 MB) (when cylinder is 255*63 sector).
Example
First primary partition start:(1 MB) size:((multiple of 16065)-1 MB)
More primary partition start:(multiple of 16065 MB) size:(multiple of 16065 MB)
Extended partition start:(multiple of 16065 MB) size:(multiple of 16065 MB)
Logical volume start:((multiple of 16065)+1 MB) size:((multiple of 16065)-1 MB)
With this layout, it will be tolerant to Windows XP disk management.
It is better not to use Windows XP disk management.

#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14323 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 August 2015 - 01:15 PM

Yep :).

But any number of third party tools may have similar (though hopefully not as destructive as this) issues, one needs to be very careful in what tool he/she uses and learn what it actually does.

 

Just for the record the XP DIsk Manager issue is described here:

http://reboot.pro/to...itioning-issue/

http://www.dcr.net/~...gPartitions.htm

 

Please note how Primary partitions are NOT affected by this bug, only Extended Partitions (actually what "vanish" are the Logical Volumes inside Extended).

 

:duff:

Wonko



#10 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 08 August 2015 - 03:23 PM

hi karyonix,

that certainly explains it! and I recall loosing all logical partitions once while simply changing the active partition too. you have saved me from making a potentially huge mistake!

Ive lots more to learn about this but thanks so much for pointing this out.

without having read the links yet that Wonko has provided on the subject, it this problem simply due to the 63 vs 2048 sector difference between XP and later OS's?

from here onward I will not touch important HDD layouts without learning more about them and testing everything on less important HDDs including any related 3rd party tools.

thanks again!

#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14323 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 August 2015 - 04:46 PM

without having read the links yet that Wonko has provided on the subject, it this problem simply due to the 63 vs 2048 sector difference between XP and later OS's?

Yes and no.

Meaning that is mainly due to the 63 vs. *any other number* of sector alignment.

And even the 63 is most probably not really-really 63 but rather 63 only on disks/devices exposing a disk CHS geometry of m/n/63.

Non-63 sectors per head disks devices are not in any way common, but they do exist (as an example CF cards).

 

:duff:

Wonko







Also tagged with one or more of these keywords: backup

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users