When you can’t get into Wubi Ubuntu…
With this short procedure you can try to repair the Ubuntu Linux installed by Wubi when it doesn't work and screen displays just "sh:grub>". The error occurs for example system update or when some changes are made in Grub (Ubuntu's loader). In most cases you'll be able to resolve the problem.
If you have installed Ubuntu using procedure described in “Installing Ubuntu (almost) like a Windows application” article, it’s highly probable you have already stumbled upon a problem when you were stuck just with command line instead of booting up to Ubuntu Linux. This problem occurs mostly after updating the system, when it affects also Grub. The changes to Grub are not applied directly, so it doesn’t know what to do and defaults to command line. There the most of users (like me) get stuck wondering what has happened to their Ubuntu.
Before you start crying you’ve lost all the data, customization and everything you’ve kept in this Linux distribution, try following procedure. It should help you resolving the issue and restoring Ubuntu’s functionality or at least you should be able to get into Ubuntu and save your date before its reinstallation or complete uninstallation. This major problem is connected probably just with Wubi Ubuntu as I’ve never had such problem on standard system installation. To resolve, follow these 5 steps:
First you have to find out the names of partitions on your disk and determine, where you put your Wubi Ubuntu installation. So into command line “sh:grub>” type in the command “ls -l” and press [ENTER] on your keyboard.
sh:grub> ls -l
The list of disk partitions will be displayed. Partitions are named like hd(0,1), hd(0,2), hd(1,1) or similarly. I believe “hd” stands for “harddrive”, first digit determines physical harddrive number (starting from 0) and second digit stands for partition number on that specific physical drive. You need to find out the partition name where Wubi stores Ubuntu folder. Unfortunately, I can’t see into your computer and can’t offer a good advice, but if you use disk labels like me, you should be able to determine the partition pretty quickly, because labels are also being displayed in the list.
When you have the name of the partition, lets take hd(0,1), you need to convert it into Grub terminology. Grub uses “sd” (SATA drive) instead of “hd”, “a, b, c…” instead of first “0, 1, 2…” digit and last digit remains the same and is just repeated in the name, brackets and comma are not being included. So our hd(0,1) example would become sda1. Write down this name of Wubi installation partition, you will need it in next step.
Start typing in the command bellow. After typing in the “linux /boot/vmlinuz-“, press [TAB] on your keyboard to display available Linux kernel versions list. Choose the most current one (with the highest number) and type it in. (Note: if the procedure fails to run Ubuntu with current kernel version, try older one…) Continue typing the command ” root=/dev/” and input the name of Wubi installation partition you’ve got from previous step (in our case it was “sda1“). Finish the command with ” loop=/ubuntu/disks/root.disk ro” and press [ENTER].
sh:grub> linux /boot/vmlinuz-(kernel version – press [TAB]) root=/dev/(Wubi installation partition) loop=/ubuntu/disks/root.disk ro
Continue with new command “initrd /boot/initrd.img-” and again use the same kernel version as in step 2. Then press [ENTER].
sh:grub> initrd /boot/initrd.img-(kernel version)
If everything worked fine, after inputting the command “boot” and pressing [ENTER], the Ubuntu should start. In case that nothing is happening, try to repeat the procedure with older Linux kernel. If nothing helps even then, unfortunately I think you better try Google or reinstall Wubi Ubuntu completely…
We are not finished yet! When you get finally into Ubuntu, open the Terminal (Applications → Accessories → Terminal). In Terminal type the command “sudo update-grub” and press [ENTER] (you will also need to type in your password confirmed with [ENTER] key). Now the Grub should be updated completely and shouldn’t cause any trouble.
So, after this procedure just try to restart the computer and see on your own whether Ubuntu works how it should (at least until next major system update ;)).
Any question? Use comments…