Page 1 of 1

colinux to virtualbox migration

Posted: 18. Sep 2008, 01:21
by sessyargc
I have been a long time coLinux user, but now I am moving to VirtualBox. This implies that I am a newbie with VirtualBox (but not to Linux, coLinux or qemu).

As everyone might know coLinux uses RAW disk images (no partition information or the likes). I have been able to convert my coLinux images to VMDKs using qemu-img. I think conversion from RAW to VMDK doesn't add the partition information. IMO due to the lack of partition information of these images I always get an error during boot-up and my VM does not boot. I always get:
FATAL: No bootable medium found! System halted.

C:\Program Files\VMware\VMware Server>vmware-mount.exe /p L:\VirtualFS\1_debian_server_fs.vmdk
The virtual disk contains no volumes. Make sure the virtual disk has been
partitioned and formatted.

(I had this issue when I was trying to move my coLinux disk images for use on qemu. I never did get it to work.)

Anybody else had this problem? How did you go about fixing it? Inputs will be highly appreciated.

Regards,

Posted: 18. Sep 2008, 02:00
by TerryE
You can place a file system on a raw device without any partitioning, so you are mounting, say, /dev/sda rather than /dev/sda1. The trick is to mount this source VMDK and a blank VDI big enough to go this copy, booting from a liveCD. Then create a partition on the destination drive that is big enough to hold this file system then do a file system-to-file system copy. This article, Dan Kegel's JEOS Howto Paper, explains one such technique. Gparted might also allow copies from bare partition.

Posted: 18. Sep 2008, 02:19
by sessyargc
Hmmn thanks TerryE!
I'll give it a shot.

Posted: 18. Sep 2008, 02:35
by TerryE
Sorry I didn't explicitly say, but I was implying that maybe your vmdk is like this. I've used that cp -atrick in the past and its never let me down.

But thinking some more, the issue that you must remember is that coLinux uses a modified kernel which talks directly to the Windows API. You will get a readable Ext3 system out of this, but you will not be able to boot in a VM. You wan either try and replace the kernel, or just install a "virgin" copy of Debian or Ubuntu onto a clean VDI and mount this unpartitioned disk as a second hdd
  • sudo mount -t ext2 /dev/sdb /mnt/oldSysDev
or whatever and then use the cp -a trick to copy the bits that you want tokeep like /home across.

Posted: 18. Sep 2008, 03:37
by sessyargc
I think mounting the image in loop device will also work (it's the one I'm using now). I'm running the deep copy now.

I tried doing the same thing on qemu and i got numerous problems. Maybe I just didn't read qemu's documentation that much. It's so much easier on VirtuaBox. (IMHO virtualbox reminds me of some of the qemu GUIs out there).

Thanks for the help.