Sector by Sector?

Discussion in 'Acronis True Image Product Line' started by CWBillow, Oct 27, 2007.

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

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    I pretty much understand what this is, but I'm wondering, if I back up either linux partitions, or a disk with linux partitions, is this a more reliable or accurate way of ensuring restoration of the linux partitions and/or MBR properly?

    I'm really new to linux, and have screwed up myself several times already; now that I have (the first part of) things pretty much how I want them, I want to back it all up, so...

    What's the best way to both back up and/or restore my setup?

    Regards,
    Chuck Billow
     
  2. K0LO

    K0LO Registered Member

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

    What format are your Linux partitions? Mine are ext3; that's pretty common today and TrueImage understands ext2, ext3, and Reiser partitions. I just back up and restore the Linux partitions using TrueImage. You can do this from the recovery CD or even from the Windows version of the program.

    I don't think that there is any advantage to using the sector-by-sector mode in your case; you'll only get larger backup archives. There is an advantage to just letting TI back up partitions that are in file formats that it understands. You can later explore your Linux partitions within Windows by just double-clicking on your backup file and exploring away.
     
  3. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    Mark:

    I had heard some concern as to whether TI would maintain all the startup/boot/grub links etc., but I didn't know... and the only way to double-check would be to back up, erase everything and then restore, and I sure wouldn't want to have to risk that.

    Thanks,
    Chuck
     
    Last edited: Oct 27, 2007
  4. K0LO

    K0LO Registered Member

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

    I have wiped out/restored my Linux root and home partitions several times. Just did it last weekend after playing around with the new release of Kubuntu. After seeing some difficult issues with the new release I just wiped it out and restored a backup from the day before.

    The GRUB bootloader may give you some problems if you move things around but it's easy to fix. Just keep a Live Linux CD from your favorite distribution handy, or keep a Knoppix CD, or make a GRUB boot CD. If your experiments result in a non-booting GRUB bootloader you can restore it from one of your CDs. Also, If you have GRUB installed to the MBR then you should be able to restore MBR/Track 0 from one of your TI backups to fix it.
     
  5. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    Kark:

    That's good.

    The comment above: I've been having a helluva time with Kubu 7.1. Ubu installs and runs fine, but Kubu crashes after 1-2 startups so that it ends up at a "dos" screen, with the only option a re-boot or typing "exit".

    Is this what you found as well?

    Chuck
     
    Last edited: Oct 27, 2007
  6. K0LO

    K0LO Registered Member

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

    No. On my laptop, Kubuntu 7.10 ran very well from the LiveCD. But when I upgraded my 7.04 installation to 7.10 I had problems with knetworkmanager locking up occasionally and also some problems with suspend to disk.

    Since my current installation started with 5.10 and has been upgraded incrementally ever since, I think it's time for a clean install. I don't have time for that right now so I just nuked it and restored 7.04 from a TI backup.
     
  7. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    Well that's too bad... I was hoping I'd found someone with similar issues so that I could track it down...

    Oh well, thanks Mark.

    Chuck
     
  8. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Mark,

    Chuck's setup is a little more complicated than normal in how GRUB is being setup.

    What we're trying to accomplish is having a small Master GRUB partition. This partition is linked to the MBR. So when the computer boots, it boots to the Master GRUB partition. From there the GRUB menu chainloads all the other OS's installed on the computer (boots directly to the partition). In this case, openSUSE 10.3, Kubuntu 7.10, Ubuntu 7.10 and Windows. There are not supposed to be any DIRECT kernel boots from the Master GRUB partition, only chainloads. This keeps the installs more isolated and also keeps the updates of one Linux OS from bothering the other's menu.lst file.

    This means that each of the Linux installations has GRUB installed to the bootsector of the partition that Linux is installed on. Each Linux has its own /boot/grub/ folder and menu.lst file.

    The problem that Chuck is concerned about is if he restores (for example) just the Ubuntu partition, will GRUB still boot correctly? The chainload from the Master GRUB partition will still try and boot the Linux partition, but will the bootsector GRUB still boot correctly into Ubuntu or will it be "broken"?

    I have had this problem before, but it's been a while. I had to repair GRUB after the restore to be able to boot. I don't remember now if it was with TI 9 or TI 10. Chuck is trying to avoid having to repair GRUB every time he restores a Linux partition.

    I have just got my new test computer setup so I'm going to run some tests on this myself. Check how TI 10 and TI 11 restore GRUB/bootsector Linux partitions and if a repair is needed.

    I would assume that the sector-by-sector option in TI 11 would work correctly, however it would take 25GB for a 25GB partition (unless TI still compresses sector-by-sector images).
     
  9. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    Ah, help from the bench! Thanks Mark, uh Paul. Trying to lighten your load a bit, but that was explicit.

    Thanks,
    Chuck
     
  10. K0LO

    K0LO Registered Member

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

    If you don't mind sifting through 10,000 posts, the Ubuntu forum probably has someone with similar problems who has already figured out how to solve the problem you're seeing.

    Paul:

    I understand what you're trying to do with the separate master grub partition. That sounds workable. But if your experiments demonstrate that you have to run grub setup after restoring a partition that has grub installed to the partition boot record, could you instead consider creating a separate small /boot partition for each Linux distro? You will probably need to make each /boot partition logical (because you will run out of primaries) and do the little trick that allows chainloading to a logical partition, but after you get it set up this way then you could use the sector by sector mode when backing up the /boot partitions and the regular mode when backing up the rest. That way you'd avoid making 25 GB backup files. Might this be a workable solution for Chuck?
     
  11. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Mark,

    Yes, that is one scenario that I've used before. I just don't know yet if it's still necessary. I did do that on two of my Linux computers. We were trying to keep Chuck's partition count down as he has so many different distros installed. A separate /boot for each would double them.

    I'll post back after I run the TI restore tests and see if GRUB "breaks" or not.
     
  12. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Test results to answer the question Does GRUB still need to be repaired after partition restore with TI?

    Main Test setup:
    Primary Ext2 "Master GRUB" 200MB Partition
    Logical Ext3 Ubuntu 14GB Partition

    GRUB version: 0.97
    Ubuntu version: 7.10

    Boot sequence: GRUB is installed to the MBR and boots the the Master GRUB partition. GRUB loads the menu.lst file on that partition and then chainloads to the Ubuntu Logical partition. GRUB is also installed to the Ubuntu partition's bootsector.


    Test results with TI 10 (build 4,942):

    Entire Disk Image restore:
    Okay - Master GRUB boots, Ubuntu boots

    Partition restore from partition image or Entire Disk Image:
    Master GRUB boots okay.
    Ubuntu partition does not boot. Errors with: Error 13: Invalid or unsupported executable format

    Test with TI 11 (build 8,027):
    Same results as TI 10 for "normal" partition restores.

    However, a sector-by-sector restore of the Ubuntu partition works correctly from either an Entire Disk Image or a partition image.

    ------

    Test with Master GRUB partition Logical instead of Primary:
    Restores okay and boots okay in "normal" mode and sector-by-sector mode.
    GRUB installed to MBR booting to a Logical Ext3 partition seems to restore okay normally (sector 1 is zeroed out in both cases). Booting seems to start at sector 3. Note that this test ONLY tested if TI would restore the MBR linked GRUB into a booting state. I did not proceed to do another chainload test since I felt the results would be identical to what I've already done.

    ------

    However, GRUB installed to an Ext3 Linux partition's bootsector (not connected to the MBR) does not restore correctly unless the Entire Disk Image is restored or sector-by-sector mode is used.

    When I look at the Linux partition using DD's Disk Editor, sector 1 is not restored when the partition is restored normally (it is all zeroed out).

    When restored using the Entire Disk Image or by using sector-by-sector mode, sector 1 is restored. This is where the GRUB boot code is when installed into a Linux Ext3 partition.

    This seems to make sense from the standpoint that doing an Entire Disk Image restore would also allow Vista to boot correctly (without needing a repair) when just restoring the partition wouldn't.

    ------

    Conclusion:
    If you have GRUB installed into the bootsector of a Linux Ext3 partition, use the sector-by-sector method to restore the partition, otherwise a GRUB repair will be needed.

    Note: In all my tests the images were created in "normal" mode (not sector-by-sector mode). There seems to be no need to "create" the partition/disk backup in sector-by-sector mode, just restore it in that mode.
     
  13. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    With my newbie eyes, it appears that all is OK and you only have to restore using sector-by-sector. THAT'S why the time I tried to restore my linux when it got messed up, it wouldn't work.

    But maybe this time, ya think? That'd be nice.

    Thanks paul for the testing...

    Chuck Billow
     
  14. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Does this mean that if you have something in sector 1 and then restore the partition using the sector-by-sector mode that sector 1 will be left as-is? Or does it mean that even if sector 1 is blank, when you restore the image then the contents of sector 1 are restored?

    In other words, could a person restore a partition normally and see as a result that sector 1 is zeroed and grub doesn't work? Then to recover could you restore the same partition again but this time in the sector-by-sector mode and then end up with sector 1 restored and grub working?

    That's really interesting!! How does TI do that? Does it keep a sector map so that it knows exactly where to put each backed-up sector?

    Very interesting results, Paul.
     
  15. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    I assume that it will restore sector 1 even if it's blank (zeroed out) because that's what it did. Doing the normal restore resulted in a zeroed out sector 1. Doing a sector-by-sector restore restored the GRUB info in sector 1.

    Yes. This is how I found it out.

    Correct.

    At this point it's just a guess, but it must keep track of the sector information. Why it doesn't restore sector 1 on a normal restore, I don't know. However, coming back to the Vista restore problem, when an Entire Disk Image is restored it will work correctly and when the Vista partition from the Entire Disk Image is restore, it doesn't. To me, this means that the sector information must be stored in the image and TI is just ignoring it.

    This is a picture of sector 1 after a "normal" TI partition restore:
    Normal Ext3 restore.JPG

    This is a picture of sector 1 after a "sector-by-sector" TI partition restore or an Entire Disk Image restore:
    Sector Ext3 restore.JPG

    These were BOTH restored from the SAME image file.
     
    Last edited: Oct 28, 2007
  16. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    Paul:

    If I have a partition/disk that works fine, and then after fiddling, the boot/GRUB process gets fouled up, I can restore the MBR and pertinent files using sector-by-sector, and it will overwrite and correct?

    THAT would be cool.

    Chuck
     
  17. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Something in the back of my mind tells me that Acronis answered that question on here a long time ago. If I recall, it had to do with the requirements of LILO. Since GRUB is more popular than LILO today, perhaps they should re-visit that design choice. It seems like all they would have to do to restore Linux partitions that have GRUB installed in their bootsector was to make sure to restore the first sector of the partition.

    I'm having a little trouble picturing what might happen to an NTFS partition. From what I've seen, the entire partition is restored including the first few sectors. Acronis does not zero out the first sector of a restored NTFS partition like they do on ext2 and ext3 partitions. I think that the conclusion in the big thread about restoring Vista partitions was that Vista's BCD database was making an absolute sector reference with the default BCD that Vista installs and Acronis does not put all of the sectors back in exactly the same places, so the pointer ends up pointing to the wrong place.

    I wonder what would happen if you restored a Vista partition in the sector-by-sector mode?
     
    Last edited: Oct 28, 2007
  18. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    This is sounding sort of like what I had happen to me using Diskeeper and Disk Director's OSS simultaneously:

    If I didn't exclude ALL the OSS folder (BOOTWIZ), OSS lost track of location and wouldn't function on next boot until IT was repaired.

    Same thing, you think?

    Regards,
    Chuck
     
  19. K0LO

    K0LO Registered Member

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

    Yep. Same thing.
     
  20. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    Mark:

    Well the only solution that group has come up ith is a "hands-off" of those files.

    The same looks like it'll happen here. Is this actually some kind of scene where what *should be* is a relative reference and in fact is an absolute one?

    Shouldn't that be a relatively (sorry guys) easy thing for the coders to correct?

    Chuck
     
  21. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    It's not always that easy. The first stage of GRUB, for example, is extremely small and compact and cannot understand filesystems. All it can do is start to load the second stage, which can locate a file by name. So the only way to get the first stage loaded is to point to an absolute starting location and go from there.

    I think that Paul has come up with the elegant solution for you. If you restore any of your Linux partitions that have GRUB installed to their bootsector, then just remember to restore them in sector-by-sector mode.

    If you forget to do this then you'll find out soon enough when they don't boot. But all you need to do to recover is restore again but this time in the sector-by-sector mode.

    Time for a test? You know you want to!
     
  22. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    I made the reference only to point out that TI does make a difference between Entire Disk Image restores and restoring individual partitions. In the case of an NTFS partition all the sectors are restored. In the case of Vista the problem is the broken link between the partition and the bootloader. The problems are different, but the solution is the same. That was the only point I was trying to make.

    My guess would be that it would boot. However, this would be a hard test to do since TI 11 will "fix" Vista so it boots and TI 10 does not have a sector-by-sector restore option. So how would you know if it was the sector-by-sector restore or the built-in "fixing" that would let Vista boot without needing a repair? I suppose if the sectory-by-sector mode left the 2048 offset and the "normal" restore changed it, then you might assume that the sector-by-sector restore left the link intact.

    In any case, I have it on the test computer now, so I'll give it a try and see what happens.
     
  23. CWBillow

    CWBillow Registered Member

    Joined:
    Feb 23, 2005
    Posts:
    209
    Location:
    San Diego CA, USA
    Yea, as Paul will attest to, I ALWAYS want to! AAMOF, I'm getting ready to start over (AGAIN!) and see if I can get it right this time, a part of which, of course, is to back it all up when I through...

    So you all might be early-to-bed-early-to-riser's, but if you're still around later, well, we'll see, "willn't" we?
     
  24. K0LO

    K0LO Registered Member

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

    You deserve an "A" for effort. I'm glad that you're both curious and willing to experiment to find out.

    It seems like there are some noteworthy new features in TI 11 despite all of the bashing it has gotten in these forums. This sector-by-sector restore is an unexpected bonus.
     
  25. K0LO

    K0LO Registered Member

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

    I had another thought about your disk layout and since you are starting over you may want to consider this.

    How about this layout:
    [MBR] [Master GRUB partition (primary)] [Windows (primary)] [Logical partitions 1 through n] [empty primary slot]

    1. For the master boot record, use the plain vanilla Microsoft MBR that simply finds the active partition and boots it.
    2. Put your master GRUB bootloader files in the first primary partition and make it active. Install GRUB to THIS partition (not to the MBR). When the PC boots it will jump to the active partition, which will start your master GRUB bootloader, and from there you can select the OS to boot to.
    3. Put Windows in its own primary partition.
    4. Install your Linux distributions to logical partitions. Install each distribution's GRUB bootloader to the logical partition. Chainload to each from your master GRUB bootloader's menu.lst file.


    The method to my madness:

    A. With the MBR left as a plain-vanilla one you can always fall back to booting Windows just by changing the active flag to partition 2 instead of partition 1. Also there are a ton of recovery tools that can replace the MBR if it ever gets damaged.
    B. If you ever decide to activate the Acronis startup recovery manager (SRM) you can just do that, and the empty primary partition slot will be used for the secure zone files. Installation of the SRM will not overwrite GRUB since it won't be located in the MBR.
    C. Every OS will be independent of each other and you can restore any at-will, with the proviso that you need to use the sector-by-sector mode when restoring any of the Linux boot partitions (the ones that have an installation of GRUB in the partition boot record).

    Small variation on your current theme.
     
Thread Status:
Not open for further replies.