I’ve had so much grief with WUBI and the dreaded sh:grub prompt and grub-pc in the last few months. After many workarounds for getting fixing Wubi after each kernel update. I decided it was taking up too much of my time, so I erased Windows from my work laptop, and installed Ubuntu natively. However, there are so many people still using Wubi, and there is no official Wubi fix for the problem on their forums yet, so I decided to write up this post with a new fix which seems to work rather well (it works wonderfully on my home computer that had Vista and Wubi installed).
Thanks to Richard Carter for pinging back to my original blog post with what seems to be THE right way to fix this problem.
It seems the newer kernels (2.6.31-19 and up) and Grub2 had a strange incompatibility when trying to boot from NTFS. In this write-up, they mention that the cause of the problem is:
To be able to boot Wubi, Grub2 has to access the ntfs partition which is hosting Wubi. There is a bug in Grub 2, which prevents Grub2 to read any files on an ntfs partition beyond the first 4GB. If any of the boot files is outside of the 4GB limit, booting will fail. Depending on which boot file is outside the limit, the symptoms can be quite different. Since any kernel or Grub update relocates some of the boot files, you might be hit by this bug at any time.
So, how do we fix this? It’s actually very easy. All you need to do is download a new Wubildr file which corrects the problem from here. (You can safely do this from within Windows if you cannot boot into Linux). Then just copy that file to your Windows c:\ drive, overwriting the faulty wubildr file that was there.
After that, just reboot and your machine should boot into Linux normally. It worked like a charm for me, and it even kept on working well after upgrading kernels from 2.6.31-19 to 2.6.31-20.