I just want to take a second to thank you for the very valuable and time saving script, it was a life saver. If you're ever near Dallas, Texas, send me a note, I'd be happy to buy you a beer.
I just want to take a second to thank you for the very valuable and time saving script, it was a life saver. If you're ever near Dallas, Texas, send me a note, I'd be happy to buy you a beer.
OK, so I want to do this.
XP Pro SP3 on a 120GB HD and a 17GB wubi installation, plus a NTFS swap file for Windows and a 2GB hibernate file (I've got a laptop with 2GB of memory). Right now, I'm able to boot the Windows Recovery Console but am afraid I'll lose this ability if I install any GRUB loader whatsoever.
Am I right?
Can I use my existing Windows swap file for Ubuntu?
Thanks!
Grub2 will offer any windows partition as well as windows recovery partition, as long as it finds the relevant boot files on it. If you have a wubi install, then you can see what it will look like: the grub os-prober works in the same way on Wubi as normal Ubuntu and that part of the grub menu will be the same. If you have some custom OEM bootloader i.e. not a standard windows bootloader, then installing grub2's bootloader will remove any additional functionality that came with that.
You cannot share the windows hibernate file as swap. Also, Ubuntu needs a swap partition to hibernate (there is an exception mentioned previously in this thread).
Hi!
I tried running your script from a live usb pen, but it gave errors:
What could have went wrong?Code:ubuntu@ubuntu:/media/5D18-F276/Migrate$ sudo bash wubi-move-2.0.sh --root-disk=/media/EC2E7CC72E7C8C78/ubuntu/disks/root.disk /dev/sda4 /dev/sda2 wubi-move-2.0.sh: The Grub2 bootloader will be installed to /dev/sda. wubi-move-2.0.sh: This is required when a migration is performed wubi-move-2.0.sh: from a named root.disk file. wubi-move-2.0.sh: Continue and install Grub2 to /dev/sda? (Y/N) y wubi-move-2.0.sh: Please close all open files before continuing. wubi-move-2.0.sh: About to format the target partition (/dev/sda4). wubi-move-2.0.sh: Proceed with format (Y/N) y wubi-move-2.0.sh: Formatting /dev/sda4 with ext4 file system wubi-move-2.0.sh: Copying files - please be patient - this takes some time mkdir: cannot create directory `/tmp/wubitarget/host': File exists wubi-move-2.0.sh: Creating swap... wubi-move-2.0.sh: Command mkswap on /dev/sda2 failed wubi-move-2.0.sh: Migration will continue without swap wubi-move-2.0.sh: Starting chroot to the target install. wubi-move-2.0.sh: An error occurred within chroot wubi-move-2.0.sh: Error is: chroot: cannot run command `dpkg-divert': Exec format error wubi-move-2.0.sh: Attempting to exit chroot normally... wubi-move-2.0.sh: Exiting from chroot on target install... wubi-move-2.0.sh: Cancelling migration... ubuntu@ubuntu:/media/5D18-F276/Migrate$
Thanks,
Factorial
There are a couple of things I noticed. The mkswap command failed. The /host directory on the target exists already - which is puzzling that can only happen if the mountpoint is not associated with the newly formatted partition (in which case I'd expect a separate mount error). Did you run this more than once, and also have errors the first time?
The root.disk migration also requires a working, fully contained Ubuntu install (on just the root.disk) - did you have any issues with this wubi install before or was everything working normally.
Please also state the Ubuntu release you are migrating and the release of the Ubuntu live environment you are running. Also whether the live environment is 64bit/32bit and whether the original wubi was 64bit/32bit. The architecture should match and I'm not checking this in the script - and this seems likely to be the cause of the chroot problem.
Thanks
Last edited by bcbc; April 30th, 2011 at 08:15 PM.
Thanks for your answer!
> Did you run this more than once
No, this was the first and only time.
> did you have any issues with this wubi install before or was everything working normally.
I had one major issue: The same as post #10 in this thread:
http://ubuntuforums.org/showthread.php?t=1474253
It has happened three times. (This is the main reason I was trying to migrate.) I solved it following the instructions in post #39.
> Please also state the Ubuntu release you are migrating and the release of the Ubuntu live environment you are running.
Both are 10.04 LTS. However, the architectures don't match. The live environment is 32bit, wubi is 64bit.
OK thanks for the feedback - I'm going to have to add some check on the architecture or else figure out how to do the chroot with mismatching architectures. The live cd migration was a new feature and I don't have a 64bit machine so just didn't take it into account. If you can rerun it with a 64 bit Ubuntu CD and let me know the result then I'll update the known issues for others that might run into this and add a check in the next release.
I don't think the wubildr (rebooting 10.04) problem will make any difference here, so it's likely just the architecture issue.
I am still confused though as to why the mkswap failed - that seems unrelated.
Thanks
I downloaded a 64bit 10.04, and it worked!
mkswap still failed, though:
I will attempt to manually set up the swap.Code:wubi-move-2.0.sh: Copying files - please be patient - this takes some time mkdir: cannot create directory `/tmp/wubitarget/host': File exists wubi-move-2.0.sh: Creating swap... wubi-move-2.0.sh: Command mkswap on /dev/sda2 failed wubi-move-2.0.sh: Migration will continue without swap wubi-move-2.0.sh: Starting chroot to the target install. wubi-move-2.0.sh: Removing lupin-support on target... wubi-move-2.0.sh: Grub bootloader installed to /dev/sda wubi-move-2.0.sh: Updating the target grub menu... wubi-move-2.0.sh: Exiting from chroot on target install... wubi-move-2.0.sh: Operation completed successfully. ubuntu@ubuntu:/media/5D18-F276/Migrate$
Thanks for the assistance! Everything is working now!
Bookmarks