coLinux
No edit summary
(No difference)

Revision as of 20:12, 3 October 2009

ATTENTION: This howto requires quite a bit of knowledge about linux, and colinux in particular. Searching in this wiki (I will repeat this sentence a lot, sorry in advance) could help you understand at least the colinux part quite well.


NOTE: Since coLinux is 32bit, even this howto does not help you convert 64bit distros ;-)


Install your distro in a VM


If you already installed the distro of your choice in a vm or on some machine, you can skip this point.


Virtualization Software examples:


  • VirtualPC (free, Windows, easy install, no snap-shots)
  • VMWare Player (free, Windows, Mac)
  • VMWare Workstation / VMWare Server (for-cost, many features)
  • Parallels Desktop (for-cost, Mac, Windows)
  • VirtualBox (free, Sun)


Configure your VM with the setting required by your distro. Install your Distro.

Be shure to create only one partition mounted on "/". Otherwise you would have to port more than one filesystem to coLinux.



Copy your distro


When your Distro is up and running, go to / and run tar to archive the complete filesystem.

Be shure to unmount anything except for /. If you have seperate partitions / disks for the directories on your system, you have to tar them seperately. Don't squash it all together like you would do if you would follow the following example (that uses only one partition).

In the tar line add any other directory installed by your distro. Be shure to NOT add sys and proc, as well as anything else in dev except console and null.


cd /

ls

tar -xvjf distro.tar.bz2 ./{bin,dev{console,null},etc,home,lib,media,mnt,opt,root,sbin,srv,tmp,usr,var}


Install openssh. (You can use anything similiar that supports copying files to and from your

machine, e.g some ftp server). Use any sftp client you want (e.g. filezilla, which is available for about any os).

Copy the distro.tar.bz2.


'

Install your distro into coLinux


Now we will use coLinux with the preconfigured debian (or any other preconfigured coLinux fs - just search this wiki). In the configuration file for debian add a line cobdX replacing X with a number not used already. I will use cobd4 in this example from now on.


cobd4 = "distro.fs"


You need an emty file named distro.fs. You can search this wiki on how to generate emty disk files.


Now start debian.

Format the new disk image (ext3 filesystem):


mke2fs -vj /dev/cobd4


mount it:


mkdir /mnt/distro

mount -t ext3 /dev/cobd4 /mnt/distro


you need to get the openssh server running on your debian. Connect to it using filezilla (host: ip of your debian - see the networking wiki), user root, passwd(default on colinux debian) : 'colinux', connection type: sftp, port 22). Upload the distro.tar.bz2.

In your debian, untar the distro archive:


cd /mnt/distro

tar -xvf /path/to/where/you/uploaded/distro.tar.bz2


Create the remaining needed folders:


mkdir sys

mkdir proc


Edit (i use nano editor) fstab and mtab


nano /mnt/distro/etc/mtab


and afterwards


nano /mnt/distro/etc/fstab

in both files:


  • replace /dev/sda1 with /dev/cob0   (where /dev/sda1 is the device mounted on / in your vm. Replace with the appropriate. And /dev/cobd0 is the / in colinux)

in fstab:


  • replace /dev/sda2 with /dev/cobd1 (where /dev/sda2 is the swap partition and /dev/cobd1 is the swap partition in colinux, or just remove this entry for no swap (not recommended). Please search this wiki on how to create swap devices)


Start your coLinux distro


now create a config file for your distro in the colinux directory with the entries:


cobd0 = "distro.fs"

cobd1 = "swap.fs" (swap.fs is my empty swap file)


and run your new distro.



Thats it. I hope I did not totally confuse your, and I hope I didn't make too many mistakes. Good Luck.