This post is about restoring the boot loader for the Ubuntu Linux which is installed under Windows using WUBI installer. DO THIS AT YOUR OWN RISK. NOTE THAT NO SCREENSHOTS AVAILABLE. READ CAREFULLY BEFORE TRYING. POST A COMMENT OF YOU’RE STUCK OR FACING SOME ISSUES.
The Advice
Always backup at least a single copy of your disks folder under your Ubuntu installation beacause some of the updates sometimes make the system crash or make unstable. Especially I face several issues after changing to Gnome 3 theme.
The Problem
If Windows 7 detects any issues with the boot sector, it will automatically start boot repair (Spawns the installer screen to repair the boot). There’s a high chance to tamper the boot record in case if we cancel in between or even the Windows restore the boot sector (You may get improper entry to Ubuntu Linux or it may even removed from the screen). Your Windows will boot fine but Ubuntu. See the following error I faced while booting to Ubuntu.
Error: cannot find GRLDR in all drive. CTRL+ALT+DEL to restart.
Easy Re-installation
Don’t touch your boot record. You can simply take backup of the disks folder under the Ubuntu installation (or full backup) and go for re-installation. Uninstall Ubuntu and install it again. Now replace the disks folder in the new installation with the backed-up disk folder. Done! Reboot your machine. But there’s a high chance to get failed with this procedure if the boot sector is already tampered. The Installer may show error about invalid boot entry and failed to uninstall. In such cases we’ve to get our hands dirty!
Dirty Hands
This is quite straightforward and nasty. Take care!
Pre-Requisites
Restoring Boot Record
I tried to recreate the boot entry using EasyBCD, an amazing and reliable tool to manage the bootloader. But EasyBCD can’t solve the problem with WUBI boot loader. It will just create a raw entry in the boot sector and manually required to edit it using bcdedit. (start BCDEdit from elevated command prompt). How to geek has explained the tips to restore the boot loader in detail. But it didn’t work for me, same error occurred after rebooting
The issues gonna face after repairing boot entry
The first work around we can try is restoring the boot sector with EasyBCD. If this works fine, then nothing proceed.
If the tip mentioned in ‘How To Geek’ doesn’t work, then you have to get really nasty. Uninstalling Ubuntu will look for a proper boot record which was originally created by Ubuntu Windows Installer. It may show error as we manually modified the boot entry. The uninstallation may fail.
How to get rid of Un-Installation and Re-Install Ubuntu?
As it’s impossible to uninstall, we’ve to manually delete the Ubuntu installation entry from the Windows registry. Otherwise Ubuntu installer for Windows will not allow you to install it again.
NOTE: Take backup of your Ubuntu installation folder before proceeding.
- Delete the boot entry using EasyBCD or BCD edit.
- Delete the Ubuntu entry from installed program list using tools like CCleaner (Tools->Select Ubuntu->Delete Entry. NOTE: don’t uninstall it)
- Now neither your system nor the Ubuntu installer knows that Ubuntu exists in your disk
- Just proceed with ‘Install under Windows’
- Now replace the Disks folder in your newly installed location with the disks folder in the previous (backed up) installtion.
- Now reboot.
Done!
