I mostly run Ubuntu via wubi on my computer. I recently got a new one. I installed wubi onto there as well but rather going through the hassle of configuring everything anew, since the whole wubi disk is essentially a single file can I not just simply copy it to the new machine?

A quick look at the file structure indicates that I would just copy the c:\ubuntu\disks folder from my old machine and overwrite it on my new one and I'll be good to go. Is this accurate?

4 Answers
4

Yes - I've done it. It's not totally straightforward though. For instance if you had a custom graphics driver on one machine, but not the new machine, you'll have display problems. And the second thing is that the grub bootloader remembers the partition and uuid of the current machine and these will have to be modified.

Make sure you haven't got custom drivers installed (or remove them if you have)

Make sure you installed the same Ubuntu release on the new machine

Load the install on the new machine, when you see the grub menu press 'e' on the first entry and note xxx and yyy:

set root=(xxx) e.g. (hd0,msdos2)

linux /boot/vmlinuz.... root=yyy e.g. /dev/sda2 or UUID=nnnnnnn

Copy the root.disk over to the new machine

Boot into Ubuntu but only as far as the grub menu

Press 'e' on it's first entry and change the values you see with the xxx and yyy from your new install. Also delete the line starting search --no-floppy .... Then press CtrlX to boot.

After it boots, drop to a terminal (CtrlAltT) and run sudo update-grub to fix the grub menu.

That's all there is to it.

PS if you're familiar with partitions, you don't need to 'complete' the reboot and 2nd phase of the install on the new machine. Just finish the windows part of the install, and copy the root.disk and swap.disk into the \ubuntu\disks folder, and then reboot, modifying the partition values. But if you're not sure what these are, just complete the install (make it 5GB in size since you'll be trashing it). In that case you can ignore the swap.disk.

EDIT: another neat thing you can do with a root.disk file... migrate it to a normal Ubuntu install on the same or another machine (same caveats on custom drivers applies).

No. That would not setup your Windows boot, for instance. So you'd either have to do that manually, or perhaps you could install it and then replace the root.disk file. I haven't tested that, so be sure to have a backup.

I haven't tested it since I don't have a Windows installation, but I believe that you only need the c:\boot.ini c:\wubildr(.mbr) and c:\ubuntu\ to the new machine. On bootup, change the old UUID to the correct disk. If both machines will be on the same network, you may want to edit /etc/hostname after you boot the first time.