Comment 12 for bug 581760

Revision history for this message
bcbc (bcbc) wrote :

Eric this fix has already been released . If it has broken your install the fix involves getting Wubi to boot, and then manually repairing it.

At ubuntuforums.org we are working on a single thread to explain all this in a clear and concise way, but in the meantime, you can do this.

Boot a live CD, identify your windows partition that contains the root.disk (this example assumes /dev/sda1), and then edit grub.cfg as follows:
sudo mkdir /media/win
sudo mount /dev/sda1 /media/win
sudo mount -o loop /media/win/ubuntu/disks/root.disk /mnt
sudo cp /mnt/boot/grub/grub.cfg /mnt/boot/grub/grub.cfg.copy
sudo chmod +w /mnt/boot/grub/grub.cfg
gksu gedit /mnt/boot/grub/grub.cfg

Then delete all lines up to but not including the first line that starts with 'menuentry'. Save and reboot. This should get you back into the Wubi install.

You then need to make sure the problem doesn't happen again (as grub.cfg gets automatically regenerated).
First back up /boot/grub
sudo cp -r /boot/grub /boot/grubbackup

Then delete all the stuff in /boot/grub that isn't supposed to be there (everything added after a fresh wubi install) - take care with the rm and rm -rf commands:
cd /boot/grub
sudo rm *.mod
sudo rm *.img
sudo rm *.lst
sudo rm *.o
sudo rm *.pf2
sudo rm -rf locale

This leaves just 2 files in /boot/grub:
grub.cfg grubenv

Then update the grub.cfg automatically:
sudo update-grub

To prevent grub updates from breaking it again:
Go to Synaptic, select packages grub-pc and grub-common, click on Package, Lock Version