Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Friday, October 31, 2014

Wubi for Ubuntu 14.10 doesn't work

Good news and bad news

Wubi for 14.10 now recognizes and prevents installing on computers with EFI firmware. This saves those users from going through the entire installation and ending up with an obscure wubildr.mbr error. That's good and it's my patch that has finally been promoted after a 1.5 year delay (for unknown reasons).

The bad news is that Wubi no longer works for computers with BIOS firmware either, but you'll have to go through the entire installation to find out. This seems to be due to a libparted issue in the latest version of ubiquity (Ubuntu's main installer).

So, as per my previous advice... avoid Wubi. But if you must use it, don't use 14.10's Wubi and instead see my previous post on how to install 14.04.1 Wubi.

Tuesday, October 21, 2014

Installing Ubuntu 14.04.1 with Wubi

Some people still want to install Wubi. Even though I would say that it's not supported. Not really. But it's still produced.
So what happened with 14.04 and 14.04.1. First off, there were some problems because the root.disk is always mounted ro (readonly), and then remounted rw (read-write) during the boot process, but starting with 14.04 the readonly option seems to be applied to the creation of the loop device, and this doesn't allow remounting as read-write. So 14.04 fails to boot unless you change the initial mount option to rw. (Hold down Shift key at boot, edit the grub entry. Ctrl+X to boot. Not pretty.)

And then the devs forgot to produce the Wubi.exe for 14.04.1.

But still some people want to install it. Here's how:

1. Download the ISO for Ubuntu 14.04.1
2. Download the Wubi.exe for Ubuntu 14.04
3. Save these in the same directory
4. Turn off your internet connection
5. Run Wubi.exe and complete the install (WITHOUT REBOOTING)
6. Turn back on the internet
7. Reboot.
8. Let Ubuntu install and reboot
9. Select Ubuntu from the Windows menu, and hold down the SHIFT key
10. Press E to edit the ubuntu entry. Change the readonly (ro) to readwrite (rw) as follows:

Change:
linux /boot/vmlinuz-3.13.0-32-generic root=UUID=55B018A020A3F99A loop=/ubuntu/disks/root.disk ro rootflags=sync quiet splash $vt_handoff

To read:
linux /boot/vmlinuz-3.13.0-32-generic root=UUID=55B018A020A3F99A loop=/ubuntu/disks/root.disk rw rootflags=sync quiet splash $vt_handoff

11. Hit Ctrl+X to boot
12. Save yourself some bother and modify the script /etc/grub.d/10_lupin so that you don't have to do this everytime you boot. Instructions here: Ubuntu 14.04 not booting after error message. /tmp could not be mounted

That is the simplest fix, however it's best to patch the file /usr/share/initramfs-tools/scripts/local as shown here (run update-initramfs -u afterwards).

Edited 2014-11-07: corrected description of why the boot process fails with the ro option

Monday, October 29, 2012

Getting ready for Ringtail

With the news that the Ubuntu 13.04 Raring Ringtail repositories are in place, I decided to try a different approach this time to using the development release. Usually, at some point in the cycle, I'll try out an upgrade - and if it seems usable - I'll keep it (I always have a full backup just in case).

With 12.04 Precise Pangolin the development release was really stable so I quite happily used it actively throughout the cycle... but unfortunately it wasn't quite as good with 12.10 Quantal Quetzal and I found that I relied more on my non-wubi 12.04 Edubuntu install (although that wasn't entirely without problems either).

The down side of switching to the development release is that I lose touch with the latest production release , which is more useful in keeping track of current issues, and since I'm not upgrading my Edubuntu machine I want to keep both 12.10 and 13.04 on the same machine (with Wubi).

I already have a Wubi-resize script that will duplicate a Wubi install (and keep it in synch). I've added a custom menu entry to boot the sychronized disk to make sure it's functional. Now I need to be able to switch and run independent Wubi installs (without the tedium of booting to Windows to manually switch the root.disks).

So that led me to my latest testing approach:
1. Duplicate the up-to-date 12.10 install using the Wubi resize script and rename the new.disk to raring.disk
2. Add a custom boot entry for this raring.disk
3. Manually update /usr/share/lupin-support/grub-mkimage on the Raring install to stop it splatting /wubildr whenever there's an update to Grub (which would make the raring intall the default)
4. Turn off Ubuntu One synchronization and other automatic backups on the Raring install
5. Go nuts without worrying about breakage

Here's the custom boot entry (modify the one on root.disk only and change the highlighted bits):
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Ubuntu - Raring Ringtail' --class ubuntu --class gnu-linux --class gnu --class os {
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod ntfs
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set=root 18B4B7BBB4B799A8
        loopback loop1 /ubuntu/disks/raring.disk
        set root=(loop1)
        linux /vmlinuz root=UUID=18B4B7BBB4B799A8 loop=/ubuntu/disks/raring.disk ro quiet splash $vt_handoff
        initrd /initrd.img
}


Here's the diff on grub-mkimage (modify the one on raring.disk only):
--- /mnt/usr/share/lupin-support/grub-mkimage 2011-09-20 03:44:44.000000000 -0700
+++ /usr/share/lupin-support/grub-mkimage 2012-10-29 22:02:55.784517389 -0700
@@ -112,7 +112,7 @@
         exit 1
     fi
 fi
-
+exit 0 # for raring test install, bypass creation of wubildr
 wubildr_partitions="$(find_wubildr)"
 
 if [ ! -f "$target" ] && [ -z "$wubildr_partitions" ]; then


Now all I have to do is wait for something exciting to happen with Ringtail:


Thursday, September 27, 2012

Windows 8 - Fast-start and hybrid sleep

Windows 8 is around the corner... but already many people have been testing it and dual-booting with Ubuntu. One of the new features they've stumbled across is the new 'fast-start' and while it works okay with Wubi, it doesn't play well with a normal Ubuntu dual-boot. But hybrid sleep is a bit of a nasty piece for Wubi  (assuming the bug I'll describe here doesn't get fixed by Microsoft).

What is fast-start?
Microsoft figure that hibernation is awesome, making booting really fast. But for some reason, not all users are comfortable with it. I know, I've run into some users with hibernation-anxiety in the past: comments like "it will run down my battery", or "it fails to resume after a few times"... etc.
So Microsoft thought, what if we don't tell users that they're hibernating - then it will be quick to startup and they'll be none the wiser. Hey presto, welcome to 'fast-start' or what I like to call partial, hidden, hibernation. As described here:
"Now here’s the key difference for Windows 8: as in Windows 7, we close the user sessions, but instead of closing the kernel session, we hibernate it. Compared to a full hibernate, which includes a lot of memory pages in use by apps, session 0 hibernation data is much smaller, which takes substantially less time to write to disk. If you’re not familiar with hibernation, we’re effectively saving the system state and memory contents to a file on disk (hiberfil.sys) and then reading that back in on resume and restoring contents back to memory. Using this technique with boot gives us a significant advantage for boot times, since reading the hiberfile in and reinitializing drivers is much faster on most systems (30-70% faster on most systems we’ve tested)."

So what's the problem?
Anyone who dual boots knows that you can't mount your windows partitions read-write when they're hibernated. And now even when you don't think they're 'hibernated' they might be. So that's clearly a problem for a normal Ubuntu dual-boot. It's not a problem for Wubi because the Windows Boot Manager is smart enough to recognize that when you boot some 'other' OS (basically anything other than the default Windows 8 option) it removes the hibernated 'state' before proceeding. By the time Wubi gets to boot the partition is free to be mounted. That's different to a normal dual-boot where you have the Grub2 bootloader installed. Probably this will lead to bigger uptake of the easyBCD solution - where you can boot a normal Ubuntu dual-boot via the Windows Boot Manager.

When does the 'fast-start' occur?
Only when you Shutdown windows, not when you Restart the system. That's fine if you're rebooting into Ubuntu, but shutting down and booting up Ubuntu later won't work. Oh and trying to install Ubuntu when doing a cold boot on a USB thumb-drive will probably give you problems.

What about the hybrid-sleep?
This is a nasty little piece (for Ubuntu anyway). Basically, the idea is that it saves your session to disk and goes into an ultra-low power consumption mode. But it leaves some artifacts that make it appear as if you're hibernated. And the catch? It isn't cleaned up with Restart, only with Shutdown. So this is the opposite of the fast start, in that you have to shutdown after sleeping to clear the artifacts... and this does affect Wubi.

For Wubi what will you see?
If you have hybrid-sleep enabled and you try to boot, you may see a message saying that the partition cannot be mounted because it is hibernated. Then the fix is to boot back into Windows, and Shutdown. Or better, turn off hybrid-sleep. As far as I know, hybrid-sleep is not switched on by default, so avoid switching it on. In my own tests, it wasn't clear what was happening because the busybox prompt with the error message wasn't being displayed at all, just a purple screen. And booting in recovery mode mounts drives as read-only so the problem wouldn't be apparent either. I had to edit my grub boot options just to see the error. (This is probably specific to my graphics setup, but be prepared for this symptom). Note, in my opinion, this is a Windows bug - surely Microsoft don't intend to leave the computer in a 'mixed' hibernated state? But whether they intend to fix it before release is unclear.

For normal dual boot, what can you do?
You can boot Ubuntu using easyBCD as stated before... maybe this will be the golden era for easyBCD. Or you can simply turn off fast start and hybrid-sleep (this last link isn't specific to sleep but does show how to get to the advanced sleep settings)

Friday, May 11, 2012

How to run the development release with Wubi

Prepare for breakage
This goes without saying, but I like to say it anyway. If you choose to follow these instructions, and you lose your installation/data or worse - you're on your own. That said, I've been running the development release on Wubi since 11.10 and with a few precautions you should be okay. 
Note: Since the 32-bit non-pae kernel will not be supported in 12.10, I advise not following these instructions if you are using the 32-bit non-pae kernel.

Backup and restore
Even though I am aware that things could go awry, it's still irritating to lose the install. So I keep a fully synched backup of the root.disk. After running updates (which you'll probably get used to doing every time you boot), once you've rebooted and confirmed things are stable, you can resynch your backup. 

Here's how to do it:
  1. Make a copy of your root.disk using the Wubi resize script 
  2. Keep it synchronized by rerunning the script, but supplying the --resume option (which will copy only files that have been modified/added and delete ones that have been removed).
  3. Make the new.disk bootable (so you can confirm it works without booting to Windows to rename the disks). You do this by adding the following lines to /etc/grub.d/40_custom (changing the bits in red to match your own settings):
menuentry 'Ubuntu - backup new.disk' --class ubuntu --class gnu-linux --class gnu --class os {
        set gfxpayload=$linux_gfx_mode
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set=root 18B4B7BBB4B799A8
        loopback loop1 /ubuntu/disks/new.disk
        set root=(loop1)
        linux   /vmlinuz root=UUID=18B4B7BBB4B799A8 loop=/ubuntu/disks/new.disk ro   quiet splash vt.handoff=7
        initrd  /initrd.img
}

Then you'll see "Ubuntu - backup new.disk" at the bottom of the grub menu when you boot. If you don't see the grub menu, hold down the Shift key after selecting Ubuntu.

Upgrading to Quantal
Since there is no Wubi.exe version for Quantal available at this early stage of development, the only way to get it is to install 12.04 Precise Pangolin, and then modify your sources.list. (Note, once the Alpha1 is released you may be able to install normally and in this case you should not use this method).
sudo sed -i 's/precise/quantal/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade 

Partial upgrades
Always review the results before running dist-upgrades. In particular, look at what is being removed. It's fairly common for the packages to be out of synch at times during the development release, and if you're not careful you might uninstall critical bits. My rule of thumb is, if anything is being deleted look for a newer version of it being installed. If there is no corresponding entry, then wait a few days. Sometimes you'll find the packages are no longer listed as being removed. In other cases, they're still there and it's probably safe to proceed. If you notice a lot of packages being deleted, run away.

Where to go for help
Please review the Sticky threads in the Ubuntu+1 forum on ubuntuforums.org. If you have any questions or problems, look there to see if someone else has a solution or post your own questions. 

Saturday, August 13, 2011

Oneiric Alpha3 Wubi

I've been running Oneiric with Wubi since early on in the development cycle - but it was an upgraded Natty. I finally got around to doing some installation testing on Oneiric - a week or so after the Alpha3 was released.

The first thing I tried was just running off the latest daily ISO. I downloaded the latest wubi.exe from here and let it download the ISO. It took a long time, probably because the bittorrent download isn't very fast when there aren't many seeds. I guess it's faster to download through the browser. At any rate, a couple of hours later, I did the install (wubi.exe and the oneiric iso in the same folder) and let it run. Once I rebooted to complete the install, it failed. Apparently the kernel and initrd on the ISO were bad as it couldn't mount my windows partition. There was a helpful message to run chkdsk /r and reboot twice into Windows, but that was wishful thinking. This is part of alpha testing - probably if I tried on Monday it would work. I'll find out later and create a bug if it doesn't.

So I decided to drop back to the alpha3. The only issue with this is that the ISO is oversized so it won't fit on a CD (and I downloaded it on another machine). So rather than burn a DVD I reused an Ubuntu USB stick I had sitting around. Note, I just copied the ISO to the root of the USB - installing Wubi from an Ubuntu USB doesn't work (in most cases), but it's okay if you just copy the ISO to the root. Note: if you're trying to install an older version of the ISO like this you have to disable your internet connection or wubi.exe will try to download the latest available ISO.

Anyway - the install went fine. The only issue was that it took a long time 'detecting file systems'. I had a peek in the logs and it seemed that it was trying to mount the root.disk, but whether this was the cause of the delay I cannot say. I'll dig into that in more depth later.

Then I ran all updates (250MB since Alpha 3 was released) - because there are some cool changes to Unity that I read about and I wanted to check out.


I've been running Oneiric on my another computer (i3, 4GB RAM) and it's been great. For the alpha test I used an older machine (core 2 duo, 1GB RAM) and it's very sluggish. But it works okay, and Unity 3D is working on the X1300 ATI card.

So in summary, Oneiric Alpha 3 worked fine with Wubi. The more testing the better - so try it out, file some bugs, help make it better for everybody. If you have questions, post them at https://answers.launchpad.net/wubi/+addquestion

Thursday, July 28, 2011

Wubi boot issues a thing of the past

With the release of the third update of Lucid Lynx (10.04.3) last week, this finally puts to bed the problems with Wubi and Grub2 (Ubuntu's bootloader) that resulted in many Wubi boot failures. The issue that allowed the user to overwrite the Windows bootloader is also taken care of.

These issues were fixed prior to the release of Natty Narwhal earlier this year, however, the patches to the active stable releases (Lucid and Maverick) were only released as an Update in June, and finally in 10.04.3 last week.

This was certainly a big problem that has plagued Wubi users for over a year; longer if you include the problem in 9.10 Karmic Koala. It kept many on ubuntuforums.org busy and led to the successful Wubi megathread (thanks to Rubi1200 for that).

I have been quite critical of Canonical and the developers on this blog for not addressing this sooner (this problem was probably the driving force behind the blog in the first place), however, I think it's true that my focus is quite narrow and the developers have many issues to deal with, and Wubi wasn't always on the top of that list.

It appears that now there is a strong development effort to improve Wubi for 11.10 Oneiric Ocelot - which I'll write about later. So far, I've been running a development Oneiric Ocelot Wubi install from early on in the development cycle without any issues.

One thing seems certain - Wubi is popular as ever with new users and a great tool to introduce Windows users to Ubuntu.

Tuesday, March 15, 2011

Wubi finally working in Natty Narwhal

I've just tested the latest Wubi.exe available here. It took a while to download the latest daily-live Desktop CD image (in the end I did that myself from here). But after that installing Wubi was painless. Apart from a benign grub2 message, the Ubiquity installer was impressive - looking ready for release - and seemed faster than prior releases, as did booting up for the first time.

Surprisingly Unity even worked on my computer - I'm not totally sold on it and there were some rendering issues, but at least now I have the opportunity to review it, instead of staring at a blank screen.

So - in summary - the installation of Wubi Natty Narwhal worked flawlessly. As always, alpha testing has risks, so take necessary precautions.

Tuesday, December 21, 2010

Wubi and grub problem update

It's been one month since the latest grub-pc update in version 10.04.1 Lucid Lynx, started breaking Wubi installs. And that's a good time to reassess the situation.

I'm not sure how I noticed it - maybe I was browsing Wubi bugs that day - but my quick alert to the issues didn't help. Again, I was hoping for a quick response, maybe the update being pulled - I don't know. But apparently launchpad doesn't have a recall mechanism. At the time I thought it would only affect users who didn't install on the same partition as Windows - the usual grub trick that gets users to install the grub bootloader to their drive masterbootrecord MBR caused by a bug in the 'lupin' package (see here, or here).
But quickly it became apparent that it also affected users who installed on the same partition - a problem we already knew about as it was discovered in the Maverick upgrade. But for 10.04.1 the problem is worse, and requires a manual loop mount of the virtual disk and an edit of the grub configuration file from a live CD.

So now we are on the Christmas break, and the developers get a well-needed rest from all the Natty development, but sadly noone has taken the time to patch lupin, for the many existing users on the supported releases. Still, the volunteers on ubuntuforums.org will soldier on, steering Wubi users to the solution... the Wubi megathread. It's interesting to note that since this thread was created 2 weeks ago, it's had over 2600 visits. And that's not including the number of people who had to be helped before it was created.

So... where are we at? There's not much really to be done to warn users unless they happen to post a support request for an unrelated Wubi question. I'm loathe to join the Wubi-bashing crowd  (although it's tempting): there's still a niche market for users that might cause more damage trying to do a proper partitioned Ubuntu installation. In fact, the new Ubiquity installer has it's own issues and has already caught out a few users and overwritten Windows and all other partitions - see bug 659106.
And in any case, despite all the Wubi-bashing, Wubi appears to be growing in popularity, fueled by its new prominent place on the ubuntu.com download page.

So... I guess we just wait it out, and hope that eventually the grub devs will grace us with their attention and provide a fix.

Thursday, December 9, 2010

Where in the world is Ago

Agostino Russo, the person responsible for creating and maintaining Wubi, seems to have disappeared from sight. Since the run-up to the release of Ubuntu 10.04 (in April this year), he has been conspicuous by his absence.

From Ubuntu IRC logs, it seems that Colin Watson is now responsible for Wubi, but is either unable or unwilling to deal with seemingly minor, showstopper-type bugs that Wubi has suffered from lately. In fact, the bugs appear to be from Colin's own code changes in Grub2.

So what is Canonical's strategy on Wubi? If I were a conspiracy theorist I would suggest that the developers wish to have Wubi removed by making it so unstable as to be unusable. But I am not into conspiracy theories, and I instead believe that it's more likely due to lax maintenance/testing standards.

So that brings me to my point. Where is Ago? He's clearly the only one who has been able to keep Wubi going, and hopefully he can find the time to get things back on track.

Wednesday, November 10, 2010

Ubuntu with WUBI

If you're wondering about trying Ubuntu, but all you've ever known is Windows (and it came preinstalled) - then likely the thought of partitioning and setting up a dual boot is not pleasant.
Fortunately for you, it isn't necessary either... it is possible to install Ubuntu from within Windows and experience it as a dual-boot without any partitioning. If you don't like it, you can simply go to Add/Remove programs and uninstall it (like any other Windows application).

Q. Does it run Ubuntu within windows?
No, only the WUBI installer/uninstaller runs within windows. Ubuntu runs as a proper dual-boot. This means it has full access to all your system resources and can run on as little as 256MB RAM (although I'd say a minimum of 512MB is probably a good idea).

Q. Is it slower than Ubuntu?
Yes, but not noticeably so. It's a lot faster (and simpler) than running Ubuntu in a virtual machine under Windows.

Q. How does it work?
In simple terms, WUBI creates a virtual disk that is simply a large file under the Windows file system. It then runs the standard Ubuntu installer, but instructs it to install to the virtual disk. This avoids the need for creating a separate partition.
It also adds a special form of the Grub bootloader into the Windows boot manager, which allows you to select either Windows or Ubuntu when you start up the machine.

Q. What's the down side?
WUBI is mostly used by newcomers to Ubuntu. That means it doesn't get as thorough testing coverage or support as regular installs. Many Ubuntu community members are dead-set against WUBI and can be very unhelpful e.g. you regularly see advice to uninstall as soon as you ask for help, which makes them feel better but doesn't address any of the issues.
I'll address the sorts of problems that are WUBI-specific in other posts, but what you need to know is that once a WUBI install is booting (once you are past the GRUB menu), any issue you see is likely an issue between Ubuntu and your hardware and is unrelated to WUBI.

Q. How do I safeguard my WUBI install
Do not ever install the Grub bootloader to any devices. Grub updates have a very misleading interface and although you need it for WUBI, you do not need to install it's bootloader yourself ever. When you see a screen popup for you to select where to install it, leave all boxes unchecked.
Try and avoid hard shutdowns on your computer. Since WUBI places the entire Ubuntu install on a virtual disk (a single file) it can corrupt if a write is pending and the computer is turned off. If something hangs, then try anything and everything to regain control. The last resort is the following: hold down Alt+SysReq and then slowly press the following keys R-S-U-B.
As for all computer use, backup your data. If you want to be cautious you can back up the entire virtual disk C:\ubuntu\disks\root.disk (change drive letter if required).
Read the release notes before trying to upgrade to a new Ubuntu release. Take special precautions to backup all c:\wubi* files and the c:\ubuntu directory before upgrading.

How to migrate a WUBI install to partition

If you've used WUBI for a while, you've likely spent a lot of time customizing it: playing with settings, installing and configuring programs, and saving data. If you planned ahead you made notes along the way and could reinstall fairly easily, but chances are it'd take a lot of effort to do this again.

When you refer to the Wubi Guide, it points you towards LVPM to do the migration, but LVPM hasn't been updated since Ubuntu 8.04, and doesn't work out of the box without some tweaking. The Wubi Guide's own script is in a similar state.

Fortunately it is still possible to migrate, and you can find a script and a step-by-step guide(if you want to do it manually) on ubuntuforums.org. *

Before you migrate you'll need to partition your drive. That's something you'll have to do beforehand, but it's fairly straightforward on Windows Vista or 7 - use the built in Disk Utility. For XP, you can use Gparted that is part of the Ubuntu 'Live CD'.

* This can be used to migrate Ubuntu versions 9.10 and later. If you installed on an earlier version of Ubuntu (even if you later upgraded) you have a different boot loader and the guide does not apply.