What happened to my Linux partition?
I tried to restore a Linux partition on a dual-boot setup and ran into a strange problem. This is the first time I've tried to restore a Linux partition, and it was not successful. I've used TI many, many times on Windows partitions without any problems, so I'm familar with the tool and the restore process.
I posted recently about Disk Director showing my Linux partition as corrupt even though it was installed and running OK, and was told the problem was Acronis currently only supports 128-bit ext3 inodes and recent distros of Ubuntu use either 256-bit ext3 or ext4. So the partition in question was created by Disk Director as ext3, and I did the Ubuntu install without having it re-format the partition before the install. TI then no longer showed the partition as corrupt, and I imaged the partition, and took the restore process all the way to 'proceed' and cancelled out at the last step. There was no indication of trouble at that time and Acronis seemed happy with the partition.
Now I tried to restore the partition, and after the restoration completed successfully, Acronis OS Selector no longer recognizes that partition as an OS. I tried:
1) disabling OS selector, then re-enabling it, it still didn't recognize Linux
2) reinstalling Ubuntu from the ISO disk, it didn't recognize that either
3) Finally I restored that same partition using partimage, with a previous image I had taken with partimage, and everything started working normally again.
So because of 2) and 3) above I suspect the problem was not with the image restoration itself, but possibly had something to do with the partition delete and recreate process done by TI as the first step in the restore operation. It would seem that a fresh installation of Ubuntu should have fixed the problem if the partition was OK, but it didn't. Perhaps the partimage restoration fixed the issue with the partition, or perhaps OS Selector somehow glitched and magically started working again by chance after the partimage restore.
Does anybody have any insight into what may have gone wrong here? So far I've restored Linux twice with partimage, both times successfully, and with Acronis I'm 0 for 1. I'd like to believe I can use Acronis for both Linux and Windows partitions, but so far I'm not able to. I don't think there's anything special about restoring a logical Linux partition, is there? Oh yeah, since its not the main system partition running TI I did both the image and restore while running Windows, not with the boot disk. It would not seem to be necessary to use the boot disk for this partition, is it? The reason I ask is I did the partimage restore off of a boot disk, but I don't think that should make any difference in this case, but I could be wrong.
Edit: I also wanted to mention that when I reinstalled Ubuntu from the ISO disk I instructed it to install the GRUB bootloader in the root partition, which is how I had it installed previously. I initially suspected the problem might have been a corrupted or missing GRUB in the restored partition, but if that was the case then that full reinstall should have fixed it, but it did not.

- Accedi per poter commentare

Doug:
When TI restores a Linux partition it zeros part of the boot sector of the partition; the part where the GRUB boot code is located. I confirmed this once by looking at the contents of the sector with a disk editor before and after restoration and saw the portion of the boot sector containing the GRUB boot code was zeroed out. After doing a restore with TI you then need to reinstall GRUB. The easiest way to do this is to boot from a Live Linux CD.
If you have GRUB installed to the MBR then TI will restore it properly. I never got a straight answer from Acronis Support that explained the reasoning behind this behavior. They would only say that you need to reinstall LILO or GRUB after restoring a bootable Linux partition.
- Accedi per poter commentare

Mark, your explanation is consistent with my problem. I was wondering about how Acronis would treat GRUB, as its outside of the normal file structure, kinda like another "MBR and sector 0". Didn't think to start up Disk Director and look at the beginning of the partition, but if I had I would have seen the zeroes you mention. The part that still doesn't make sense is why the Ubuntu re-install didn't put GRUB back where it belonged so OSS would detect it again. I wonder if it saw something already in the GRUB area, assumed an existing Linux installation had already loaded GRUB, and continued on without re-writing GRUB at all. I did not have the installer format the partition because of the inode issues previously encountered, so that data would have been visible to the installation program.
Since partimage did the job correctly (for free no less) you've convinced me that Acronis will be Windows-only from now on for me.
thanks again,
Doug
p.s. Mudcrab, all I can say for sure is OSS didn't recognize it as an OS partition, it hung with a blinking cursor based on its prior knowledge of the start sector. When I went into the detect new OS mode it said it couldn't find an OS on that partition. Mark's explanation is totally consistent with that behavior, it couldn't find what it normally looks for in GRUB. Once I restored with partimage, on the next boot OSS already knew about the new partition being bootable and Linux (and defaulted to it as well) without me having to go into detect new OS mode at all. Funny thing though, while trying to get OSS to detect the re-installation I had deleted the Linux OS boot option from OSS. After the first reboot the Linux OS option was called "Linux(2)" in OSS, as if it had another one it already knew about. Not sure why it did that, but I don't really care either.
- Accedi per poter commentare

The part that still doesn't make sense is why the Ubuntu re-install didn't put GRUB back where it belonged so OSS would detect it again.
I played around with this a bit more and found the answer to this question. The Ubuntu re-install I tried was version 10.04, which uses the newer version GRUB2, which OS Selector doesn't recognize. I was already running 10.04, but had gotten there through an update/upgrade path, which did not affect the existing GRUB code put there by an earlier version of Ubuntu that OS Selector was able to recognize.
So TI did nothing bad to the partition other than wiping out the existing GRUB sector with zeroes, as Mark pointed out. Not sure why TI would think writing over any part of the disk with zeroes is preferable to doing nothing to those locations.
- Accedi per poter commentare

Doug Walby wrote:...So TI did nothing bad to the partition other than wiping out the existing GRUB sector with zeroes, as Mark pointed out. Not sure why TI would think writing over any part of the disk with zeroes is preferable to doing nothing to those locations.
My thoughts, precisely.
- Accedi per poter commentare