Restore Bug (Wrong Partition Order Restored)

Discussion in 'Acronis True Image Product Line' started by edsa, Oct 21, 2008.

Thread Status:
Not open for further replies.
  1. edsa

    edsa Registered Member

    Joined:
    Oct 21, 2008
    Posts:
    2
    While using TI2009.9608 to backup a Linux hard drive / restoring it to a smaller hard-drive, partition entry order was changed and new system is only partially bootable.

    ORIGINAL PARTITION INFO
    -------------------------------------------------------------------------------------------
    Disk /dev/sdb: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 122 979933+ 83 Linux
    /dev/sdb2 19275 19457 1469947+ 5 Extended
    /dev/sdb3 123 19274 153838440 83 Linux
    /dev/sdb5 19276 19457 1461915 82 Linux swap / Solaris
    -------------------------------------------------------------------------------------------

    NEW PARTITION INFO
    -------------------------------------------------------------------------------------------
    Disk /dev/sdb: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 61 489951 83 Linux
    /dev/sdb2 62 9548 76204327+ 83 Linux
    /dev/sdb3 9549 9729 1453882+ 5 Extended
    /dev/sdb5 9549 9729 1453851 82 Linux swap / Solaris
    -------------------------------------------------------------------------------------------

    TI sorts the partition entries by LBA; don't know why the original partition is not sorted this way (it's a Debian Linux installation), but the fact is that TI does not restore correct partition table order.
    I guess that a manual edit of the partition table will fix this, but it's quite annoying...

     
  2. GroverH

    GroverH Registered Member

    Joined:
    May 10, 2006
    Posts:
    2,405
    Location:
    Massachusetts, USA
    Note the listed link reference--particularly the first image. Try simulating another restore but before restoring, sort the partitions based on "start' sector or "linux". I believe the resulting sort will be different from the default display. Will you let us know the results?

    I believe your original restore was NOT restored in partition order sequence. I believe the fault lies in the default display which really needs to be changed by Acronis. The default view needs to be changed by Acronis so that the partitions are displayed in true partition order sequence. Currently, it is up to the user to sort into the proper user sequence and many users are not aware of this discrepancy. The Windows Disk Management graphhical view will show the correct partition sequence. Or, the display can be sorted on Partition "start" sector. Since you were working with Linux, you may need to sort into Linux sequence. Let us know the results of the new sort order.

    https://www.wilderssecurity.com/showthread.php?p=1303920#post1303920
     
  3. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Since the original order in the partition table was not in the physical order, I'm curious if they were restored in that order or if they were restored in their physical order. I would think that if they were restored in the same "out of order" sequence that they should have ended up in the original order.

    Also, when you restore Linux partitions, it is often necessary to apply fixes or make booting changes so it will boot and load correctly. This is because of how Linux tracks partitions. That information can change when you restore, especially if you change partition sizes, locations or destination drives.
     
  4. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    edsa:

    Another question would be the way that you restored the disk. Did you:

    a) Restore the entire disk by checking the box next to the Disk , thus selecting all partitions, and letting TI handle the details? or,
    b) Manually specifying partitions to restore, one at a time, and their destinations?

    If a) then TI made its own decisions about how to arrange the order of the partitions. In that case it should have used the partition table from your image file and things should have ended up just like they were when the backup was made. If the order changed, then I'm not sure why TI would decide to do that unless their algorithm specifies that the partition table order is to be the same as the physical order on the disk.

    What was originally in /dev/sdb3? Was that your /home partition? Since it's now moved to /dev/sdb2, all you should need to do to fix it is to change the partition's entry in the /etc/fstab file to point to sdb2 instead of sdb3. You could do this with a Live Linux CD.
     
  5. edsa

    edsa Registered Member

    Joined:
    Oct 21, 2008
    Posts:
    2
    Thanks for replying. I've already managed to fix this, here's how I did it:

    Well, first I tried to correct fstab, but that didn't work (maybe there are other references to physical partitions elsewhere?), then, after reverting fstab to original state, I used a disk editor to exchange the 2nd and 3rd entries and... everything works fine now!

    Just to make sure I didn't make any mistake, I repeated the whole process:

    1. After selecting the backup file, I selected "Restore whole disks..."
    [​IMG]

    2. Selected "Disk 5", which auto-selected all partitions (notice that sort order is "Partition")
    [​IMG]

    3. Selected destination disk & used default options
    [​IMG]

    The result was the same as before, a partially bootable system; partitions as reported by fdisk (original / restored):
    [​IMG]

    After using a disk editor to exchange the 2nd & 3rd entries, everything was right again. It's definitely a bug and a rather annoying one, because most people won't know how to fix their system.
     

    Attached Files:

  6. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    edsa:

    Great! Thanks for posting the details.

    I think that I see what happened. You are restoring with resize, so TI does not use the partition table from your image file. Had you done a restore to the same size disk then the original partition table would have been used and the partition order would have come out the same.

    Since you are also resizing, TI must make new partition table entries as it goes along, so it just follows its internal algorithm which probably says to build the table in the physical disk order. To get the original order you would have had to restore your partitions one at a time in the desired order. So instead of choosing the entire disk you would select the partitions individually and then tell TI where to put them and whether to make the restored partition primary or logical. This should work, but you're probably tired of experimenting.

    The last time that I did this I deliberately wanted to rearrange partitions on my disk, so I followed the restore wizard, selecting the partition that I wanted to be first, followed by the next, etc, until the order had been chosen. After restoring and before the first boot I used Acronis Disk Editor to change /etc/fstab and /boot/grub/menu.lst to reference the new partition locations. First boot was perfect.
     
  7. GroverH

    GroverH Registered Member

    Joined:
    May 10, 2006
    Posts:
    2,405
    Location:
    Massachusetts, USA
    edsa,
    Our compliments to you for your displaying all that transpired during your restore. Very few posters take the extra time or recognize the need to display the details. It was your details that enabled K0lo to "see" what might have happened. K0lo and MudCrab are very skilled at this type helping. They have high success rates with their diagnostic skills. You are fortunate they were able to assist in troubleshooting what might have happened.
    Edsa, If you have the time, would you reboot using the TI Rescue CD and

    a. Simulate a restore and when you get to the "Partition Selection" screen, resort the display options so the sort is arrange either by "Linux" or "start" or both. After sorting, is the display shown in the correct partition order for restoring the individual partitions sequentially? Sample below.

    linux0.jpg
    linux1.jpg
     
    Last edited: Oct 22, 2008
Thread Status:
Not open for further replies.