Archive

Archive for the ‘Ubuntu’ Category

Finally fixing Wubi!

March 16th, 2010 12 comments

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.

  • Share/Bookmark
Categories: How-to, Ubuntu Tags:

Buh-bye Wubi, hello ext4

February 9th, 2010 2 comments

After all the the trouble I’ve had with WUBI these last few months. I decided, over the weekend, that I’d suffered enough. I gave up on WUBI and on Windows all together. I downloaded the latest ISO file from Ubuntu.com, I burnt it onto a CD, and booted-up from it. I told the installation to format everything and just run native Ubuntu from an ext4 file-system.

You know what? I couldn’t be happier! The whole computer feels more responsive, I think it may also have something to do with the fact that I installed 64bit Ubuntu rather than the 32bit version I was using before.. (Although I know a whole bunch of people that’ll probably argue that THAT has nothing to do with it).

Oh, and what about those far and between times that I need to use Windows for something at the office? Well.. I installed WindowsXP in a VirtualBox Virtual Machine that I run whenever I need to use Windows for something. It’s not fantastic, but I can do my Windows stuff quickly, then turn off the virtual machine, and get back to work in my Ubuntu environment.

I’m very glad I took the plunge to 100% Ubuntu all the time. I’m happier for it! No more Windows-related hassles. I even get back home from work in a happier mood, because there are so little technology related annoyances throughout the day.

If you’re having trouble with WUBI and kernel updates, and my previous posts about how to fix it aren’t working anymore… I recommend this: Get rid of Windows and just install Ubuntu as your primary OS.. then run Windows in a VirtualBox.. you’ll be happier for it! And as an added bonus, you’ll be using the ext4 file-system, which is a thing of beauty!

  • Share/Bookmark
Categories: Hmmm, Ubuntu Tags:

sh:grub Fix Wubi after grub-pc update on Karmic Koala

November 18th, 2009 49 comments

Why I use Wubi

I love Ubuntu. It’s the operating system I use the most. But even with all my love for the platform, there are still a couple of applications and things that I must do on my computer (mostly legacy Business Intelligence software) that require Microsoft Windows. Because of those applications, my computers have some sort of Windows installed on them. In my case it’s Windows Vista.

Vista is rather picky when it comes to installing service packs. If it finds that the MBR is missing or has been changed or that the partition table has been modified, it fails to install the updates. This is where Wubi comes into the story.

I love Wubi. It lets you install Ubuntu onto your computers without having to partition your Windows hard drive. Your Ubuntu installation lives in a virtual filesystem that lives on a file inside your windows filesystem (NTFS), and to boot into it, Wubi adds itself to Window’s bootloader menu.

The Trouble Begins:

A few weeks ago, Ubuntu updated the grub-pc package to version 2.0, and if you use the Update Manager regularly, chances are it will be automatically downloaded and installed on your computer. Here’s the trouble: It WILL break your Wubi installation! Luckily there’s a fix for it, although it took me a while to find it on the Ubuntu forums. Here I’ve tried to summarize it for you:

The fix:

When you boot and select Ubuntu from the menu, instead of booting Ubuntu (if you are having the problem) you will be confronted by a text prompt like this one:

sh:grub>

To boot back into your existing installation of Ubuntu you will need to type the following commands:

sh:grub> linux /boot/vmlinuz-(Your version of the kernel) root=/dev/(Your Windows partition) loop=/ubuntu/disks/root.disk ro

sh:grub> initrd /boot/initrd.img-(Your version of the kernel)

sh:grub> boot

Quick-tip: The new version of grub features auto-complete (very much like bash does). So, if you are not sure which version of the kernel you have, just use the TAB key when you get to the (Your version of the kernel) part of the command, and it should auto-complete with the files it finds in that directory.

When you get to the part about (Your Windows partition), this will usually be “sda1″ or “sda2″. However your mileage may vary depending on how many drives and partitions your computer has, and where you decided to install Ubuntu when you installed it the 1st time. To find out how many partitions you have, use:

sh:grub> ls -l

This will list all the partitions it can find in this format: hd(0,1), hd(0,2), etc. The first number is the physical disk. The second number stands for the partition number. Hence:

  • hd(0,1) = /dev/sda1
  • hd(0,2) = /dev/sda2
  • hd(1,1) = /dev/sdb1
  • hd(2,1) = /dev/sdc1
  • and so on…

If you can’t boot into your Ubuntu installation with /dev/sda1, try the other partitions that you found with the ls -l command. One of them HAS to be it! Try “root=/dev/sda1″ first, if it doesn’t work, try again but iterate your way up… “root=/dev/sda2″, etc.

After you type in the ” boot” command, Ubuntu should start to load and you should be greeted by your desktop, in full working order. BUT, we’re not done yet: we still have to fix grub so that you don’t have to type in those commands every time you want to boot into your system.

Open your Synaptic Package Manager, found on the Gnome-Panel menu under: System > Administration > Synaptic Package Manager. In the “Quick search” field, type in grub-pc. You should now be confronted with a list of packages. Focus on grub-pc, which should have an Ubuntu logo and a green square next to it. Right click on it, and select “Mark for Reinstallation”. Then click on the big green checkmark (Apply). After it has finished reinstalling that package, your troubles should be over, and your Wubi installation should be back to normal. Try a reboot, just to make sure it has all worked properly!

Hope this helps.

  • Share/Bookmark
Categories: How-to, Ubuntu Tags: