coLinux - Tools! This package contains tools that can be used to setup and manage your coLinux distributions. This release is still considered alpha. However, there are enough features available to bootstrap a full Linux distribution like GenToo. Installation: Extract this package to any directory you wish. Your coLinux installation will be found by checking the registry setting: \HKCU\Software\coLinux\ If this registry setting is not set, you will need to set the COLINUX environmental variable. As an example I would install coLinux install these tools with the following command: cp colinux-tools.exe /usr/local cd /usr/local unzip colinux-tools.exe The tools would then be available in the directory: /cygdrive/e/usr/local/colinux-tools Note1: You may execute colinux-tools.exe instead of using unzip. Note2: Only one version of the cygwin.dll may be running on your system at a time. Consequently, if you plan on using Cygwin, you should remove the cygwin.dll included with the coLinux distribution. Contents of this package: - README.txt You are reading it now. - automount A tool to mark a filesystem for mounting when loading from the bootdisk. Calls the Linux mount command. Example: ./mkfs -t ext2 rootfs.ext2 1576M ./automount rootfs.ext2 /mnt/rootfs ./mkconfig bootdisk.iso rootfs.ext2 > example.colinux.xml ./colinux example - colinux A script to invoke a Linux distribution under coLinux. - gpl.txt The GPL license. If you do not accept the terms of this license you must contact Foxtrot Technologies Inc. and obtain a different license and remove this software from your system until you obtain a license that you accept. - getScript A program to extract the script appended to the end of an image file with the ./putScript program. If the image file does not have a script no output is printed. Example: ./mkswap smallswap.swap 16M ./getScript smallswap > smallswap.sh vi smallswap.sh ./putScript smallswap.swap < smallswap.sh - install-gentoo An example script I used to install-gentoo. Once running it you can start "gentoo" with the command "colinux gentoo". You will then need to follow the "gentoo" installation guide to setup networking and such. Start off at chapter 6, and skip chapter nine. If you have coLinux setup to work with dhcpcd, networking will be enabled for you. To use this script you will need both a stage3 tarball and a portage tarball. I found stage1 does not contain the necessary programs for configuring the network. I have not tried stage2. Here are the steps I used to install gentoo: 1. Downloaded stage3 and portage tarballs. 2. Setup bridging between the network devices under Windows XP. 3. Run ./install-gentoo 4. Use nano to edit the /etc/fstab and comment out BOOT. 5. Verified networking with a ping command. If /sbin/dhcpcd had not worked I would have needed to skip ahead in the instructions to learn how to configure static networking. 6. Proceed with the instructions in the gentoo manual starting with chapter six. 7. Ignore chapter nine. 8. After completing the steps, type "exit". 9. Boot gentoo for the first time with the command "./colinux gentoo". - mkconfig A script for creating a coLinux configuration file listing the desired images. Currently, output is to standard out and only image files are supported. If you need custom network settings or such, edit the script before running it. Example: ./mkconfig bootdisk.iso > bookdisk.colinux.xml ./colinux bootdisk Tip: You can set environmental variables such as kernel boot parameters. - mkfs Creates a linux file system. Calls the Linux mkfs command. Example: ./mkfs -t ext2 smallfs.ext2 16M ./mkconfig bootdisk.iso smallfs.ext2 > example.colinux.xml ./colinux example - mkreiserfs Creates a Linux ReiserFS file system. Calls the Linux mkreiserfs command. Example: ./mkswap swap 100M (./getScript swap;echo 'swapon "$1"')|./putScript swap ./mkreiserfs my.reiserfs 4G ./mkconfig bootdisk.iso swap my.reiserfs > example.colinux.xml ./colinux example Note: Due to limitations in the mkreiserfs, the filesystem will first be created in RAM as a sparse file and then copied to the filesystem. You will either mount a swap partition as in the example above, or increase the amount of physical ram available to coLinux. - putScript Remove any existing script from the image file. Then if standard input begins with the characters #!/ put standard input as the new image file script. Example: ./mkfs -t ext3 medium.ext3 512M ./getScript medium.ext3 > medium.sh vi medium.sh ./putScript medium.ext3 < medium.sh Note: Script sizes are limited to 65530 bytes. Note: "$1" will be the device the script was extracted from. - bootdisk.iso This is a read-only filesystem used for running interactive commands and processing image files. ./mkconfig bootdisk.iso > bootdisk.colinux.xml ./colinux bootdisk Note1: "bootdisk.iso" is built using the source in src/linux and programs from GenToo Linux. Note3: An ISO filesystem is used to avoid the danger of accidentally modifying or corrupting your copy of bootdisk.iso. Use CDR tools to create new bootdisk.iso files. - shell A special image file intended to start an interactive shell. Example: ./mkswap image.swap 1G ./mkconfig bootimage.iso image.swap shell > test.colinux.xml ./colinux test - untar This is a script for extracting a tar file under the ramdisk. An example would be: ./mkfs -t ext2 -o vmlinux-modules.ext2 32M ./automount vmlinux-modules.ext2 /mnt/modules ./untar -o vmlinux-modules.tarball -C /mnt/modules \ ../vmlinux-modules.tar.gz ./mkconfig bootdisk.iso vmlinux-modules.ext2 \ vmlinux-modules.tarball shell > example.colinux.xml ./colinux example - src The source directory for the bootdisk /sbin/init program and the Cygwin getScript.exe and putScript.exe programs. ChangeLog: Version 0.14 to 0.15 - Rewrote the colinux script to read registry settings to determine where coLinux was installed. - Wrote a mkreiserfs script. mkreiserfs does not work on coLinux block devices, so a temporary file is used. ChangeLog: Version 0.13 to 0.14 - Rewrote the cygwin shell scripts to create sparse files. - Modified the script options to be closer to the Linux counterparts. For example, mkfs now accepts all Linux mkfs options. - Added support for additional file systems to the bootdisk.iso file. - Wrote a mkswap script since the mkfs script does not support swap. ChangeLog: Version 0.12 to 0.13 - Wrote getScript and putScript programs for cygwin, to replace the scripts. The plan is to eventually replace all the scripts to allow the option of compiling the programs without Cygwin. - Modified init.c to use the same code to processes scripts under Linux. There is nolonger a default /etc/initrc script. - Renamed ramdisk.iso to bootdisk.iso since ramdisks are not used. ChangeLog: Version 0.11 to 0.12 - Repackaged bootdisk using my genToo installation. - Rebuilt genToo binaries using -Os -m586 options. - Modified init.c to replace chroot, pivot_root, rmdir, true, and false ChangeLog: Version 0.10 to 0.11 - Switched from using a ramdisk to using the tmpfs. - Add a pivot_root call so the contents of the ISO file may still be accessable from the tmpfs. - Renamed the special sh.c to init.c and moved to /sbin/init. - Moved the ramdisk.tar files onto the ISO disk, so there is no need to allocate additional memory to copy the files to. ChangeLog: Version 0.10 - Initial public release ToDo: (Not neccissarily in order.) 1. Rebuild the coLinux kernel to support the dependancies required for cloop.o. - Once cloop.o is supported, add a Knoppix boot script. 2. Change the filesystem script size to be dynamic instead of fixed. 3. Suppress the trailing garbage errors when using untar on a bzip2 tarball. 4. Add an option to the putScript program to create a sparse file, so cp and dd will nolonger be required. 5. Once the core scripts have proven themselves reliable, recode as C programs. 6. Write scripts for bootstrapping other Linux distributions. Known Bugs: 1. Some commands such as mkfs will automatically overwrite any putScript scripts. Other commands such as automount won't. 2. mkreiserfs will fail if only 32MB of memory is available. 3. The syntax for mkconfig is ackward. 4. There is no way to specify an alternate path for the configuration file when running the colinux script. Legal Stuff: Copyright (C) 2004 Foxtrot Technologies Inc. All right reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Contact Foxtrot Technologies Inc. if you desire a different license for this software. http://www.foxtrottechnologies.net AUTHOR: Bill C. Riemers