This is crazy I know, My recent experiment gave me a unforgettable experience, I usually use ubuntu as a Wubi installation because it is easy to backup my 10.10 system and give a try to new versions without any problems.
So after i booted to ubuntu 10.10 I can rename, move or even delete my root file in /Host/ubuntu/disks directory,Then I used to boot my 11.10 system directly by renaming current 10.10 root file and copying 11.10 root file to the same directory,
How is that possible, does ubuntu run completely on Ram? or is there a cached root file elsewhere? I'm confused,
I think I can even remove my hard disk when ubuntu is running (If swap disk not included in the same disk) but in the windows, it is a dream!!!, how is this possible?
A Wubi install makes use of loopback mounts. Essentially it mounts your Windows file system, and then treats a file within that file system (your root file) as a block device. This basically means that rather than reading the blocks of the file system from a partition directly, it looks at the layout of the file in the other file system to locate each individual block. It isn't running the system out of RAM.
It then performs some gymnastics to make the loopback mounted file system appear as the root, and your Windows file system appear somewhere below the root.
As a general rule, you should not modify the backing file for a loopback mount, since it can confuse the file system driver that is referring to that file. It would seem the actions you took were not enough to cause these problems though.
On UNIX systems, once you open a file for access it is still possible to read it without causing problems. Consider the following short Python example:
As with your loopback mounted file system, we can still read the content after moving the file. We can see a similar effect when removing a file:
While the file name is removed, the actual content sticks around until the last open file descriptor is closed. The loopback mount can be thought of as a file descriptor for these purposes.
Copying the file is also unlikely to confuse the loopback mount (since it is just reading the original), but is not necessarily a good way to perform a backup. It takes a while to read through a large file, so by the time you've got to the end of the file the start might have been modified. So if you try to use the copied file as a disk image, it may appear to be corrupted (although that corruption may be fixable with a file system check).
If you want to back up your system, I would suggest either using the backup tool included with Ubuntu, or booting to Windows and copying the disk image there (since Ubuntu is not running, there is no chance of the disk image changing while you're copying it).