m (moved HOWTO port running (native/vm) distro to coLinux (the easiest way to get any distro running in colinux) to Easy way to port native/vm distro to coLinux: Title was to long and scabbed some table of contents) |
No edit summary |
||
(18 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
+ | __TOC__ |
||
− | ATTENTION: This howto requires quite a bit of knowledge about linux, and colinux in particular. Searching |
+ | 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. |
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | *VirtualPC (free, Windows, easy install, no snap-shots) |
||
*VMWare Player (free, Windows, Mac) |
*VMWare Player (free, Windows, Mac) |
||
*VMWare Workstation / VMWare Server (for-cost, many features) |
*VMWare Workstation / VMWare Server (for-cost, many features) |
||
*Parallels Desktop (for-cost, Mac, Windows) |
*Parallels Desktop (for-cost, Mac, Windows) |
||
− | *VirtualBox (free, |
+ | *VirtualBox (free, Windows, Linux, Mac) |
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | 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. |
||
− | |||
⚫ | |||
⚫ | |||
+ | <pre> |
||
cd / |
cd / |
||
+ | tar --one-file-system --exclude distro.tar.bz2 -cvjf distro.tar.bz2 . dev/console dev/null |
||
+ | </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). |
||
− | 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 |
Install openssh. (You can use anything similiar that supports copying files to and from your |
||
− | machine, e.g |
+ | 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. |
||
⚫ | |||
⚫ | |||
+ | <pre> |
||
⚫ | |||
+ | </pre> |
||
⚫ | |||
− | ' |
||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
Now start debian. |
Now start debian. |
||
Line 83: | Line 48: | ||
Format the new disk image (ext3 filesystem): |
Format the new disk image (ext3 filesystem): |
||
+ | <pre> |
||
− | |||
− | |||
mke2fs -vj /dev/cobd4 |
mke2fs -vj /dev/cobd4 |
||
+ | </pre> |
||
− | |||
− | |||
mount it: |
mount it: |
||
+ | <pre> |
||
− | |||
− | |||
mkdir /mnt/distro |
mkdir /mnt/distro |
||
− | |||
mount -t ext3 /dev/cobd4 /mnt/distro |
mount -t ext3 /dev/cobd4 /mnt/distro |
||
+ | </pre> |
||
− | |||
− | |||
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. |
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: |
In your debian, untar the distro archive: |
||
+ | <pre> |
||
− | |||
− | |||
− | |||
cd /mnt/distro |
cd /mnt/distro |
||
⚫ | |||
+ | </pre> |
||
⚫ | |||
⚫ | |||
+ | <pre> |
||
− | |||
− | |||
− | |||
− | Create the remaining needed folders: |
||
− | |||
− | |||
− | |||
− | mkdir sys |
||
− | |||
− | mkdir proc |
||
− | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
nano /mnt/distro/etc/mtab |
nano /mnt/distro/etc/mtab |
||
+ | </pre> |
||
− | |||
− | |||
and afterwards |
and afterwards |
||
+ | <pre> |
||
− | |||
− | |||
− | |||
nano /mnt/distro/etc/fstab |
nano /mnt/distro/etc/fstab |
||
+ | </pre> |
||
in both files: |
in both files: |
||
⚫ | |||
− | |||
⚫ | |||
in fstab: |
in fstab: |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
− | |||
⚫ | |||
− | |||
− | |||
− | |||
now create a config file for your distro in the colinux directory with the entries: |
now create a config file for your distro in the colinux directory with the entries: |
||
+ | <pre> |
||
− | |||
⚫ | |||
− | |||
⚫ | |||
⚫ | |||
+ | </pre> |
||
− | |||
⚫ | |||
− | |||
− | |||
and run your new distro. |
and run your new distro. |
||
⚫ | |||
− | |||
+ | [[Category:HOWTO]] |
||
− | |||
+ | [[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.