coLinux
(VirtualPC now only supports Windows)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
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.
+
ATTENTION: This howto requires quite a bit of knowledge about linux in general, and colinux in particular. Searching this wiki (I will repeat this sentence a lot, sorry in advance) will help you understand the colinux part quite well.
   
NOTE: Since coLinux is 32bit, even this howto does not help you convert 64bit distros ;-)
+
NOTE: Since coLinux is 32bit, this howto does not address 64bit distros ;-)
   
 
=Install your distro in a VM=
 
=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.
+
If you already installed the distro of your choice in a vm or on a machine, you can skip this point.
   
 
Virtualization Software examples:
 
Virtualization Software examples:
Line 17: Line 17:
 
Configure your VM with the setting required by your distro. Install your Distro.
 
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.
+
Be sure to create only one partition mounted on "/". Otherwise you would have to port more than one filesystem to coLinux.
   
 
=Copy your distro=
 
=Copy your distro=
When your Distro is up and running, go to / and run tar to archive the complete filesystem.
+
When your Distro is up and running, go to "/" and run tar to archive the complete filesystem.
   
Be sure 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).
 
 
[Can you clarify the unmount procedure - it seems pretty fundamental. Thanks!]
 
 
In the tar line add any other directory installed by your distro. Be shure to NOT add <code>sys</code> and <code>proc</code>, as well as anything else in <code>dev</code> except <code>console</code> and <code>null</code>. With option ''one-file-system'' will automatically exclude all live mounted directories like dev, proc and sys.
 
 
<pre>
 
<pre>
 
cd /
 
cd /
 
tar --one-file-system --exclude distro.tar.bz2 -cvjf distro.tar.bz2 . dev/console dev/null
 
tar --one-file-system --exclude distro.tar.bz2 -cvjf distro.tar.bz2 . dev/console dev/null
 
</pre>
 
</pre>
  +
  +
The --one-file-system option causes tar to only pack files from the partition or disk that is mounted on "/" not crossing filesystem boundaries. So if you have more than one partition / disk, you have to tar them seperately and create colinux disk images respectively (and mount them correctly later).
   
 
Install openssh. (You can use anything similiar that supports copying files to and from your
 
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).
+
machine, e.g an ftp server). Use any sftp client you want (e.g. filezilla, which is available for about any os).
   
 
Copy the distro.tar.bz2.
 
Copy the distro.tar.bz2.
   
 
=Install your distro into coLinux=
 
=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.
+
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.
   
 
<pre>
 
<pre>
Line 70: Line 67:
 
</pre>
 
</pre>
   
Edit (i use nano editor) fstab and mtab
+
Edit (i use nano) fstab and mtab
 
<pre>
 
<pre>
 
nano /mnt/distro/etc/mtab
 
nano /mnt/distro/etc/mtab
Line 98: Line 95:
 
and run your new distro.
 
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.
+
Thats it. I hope I did not totally confuse you, and I hope I didn't make too many mistakes. Good Luck.
 
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]
 
[[Category:Configuration]]
 
[[Category:Configuration]]

Latest revision as of 04:44, 19 January 2014

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

NOTE: Since coLinux is 32bit, this howto does not address 64bit distros ;-)

Install your distro in a VM[]

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

Virtualization Software examples:

  • VMWare Player (free, Windows, Mac)
  • VMWare Workstation / VMWare Server (for-cost, many features)
  • Parallels Desktop (for-cost, Mac, Windows)
  • VirtualBox (free, Windows, Linux, Mac)

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

Be sure 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.

cd /
tar --one-file-system --exclude distro.tar.bz2 -cvjf distro.tar.bz2 . dev/console dev/null

The --one-file-system option causes tar to only pack files from the partition or disk that is mounted on "/" not crossing filesystem boundaries. So if you have more than one partition / disk, you have to tar them seperately and create colinux disk images respectively (and mount them correctly later).

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

machine, e.g an 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 empty file named distro.fs. You can search this wiki on how to generate empty 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 -xvjf /path/to/where/you/uploaded/distro.tar.bz2

Edit (i use nano) fstab and mtab

nano /mnt/distro/etc/mtab

and afterwards

nano /mnt/distro/etc/fstab

in both files:

  • replace /dev/sda1 with /dev/cobd0 (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 you, and I hope I didn't make too many mistakes. Good Luck.