ThinStation & coLinux The way for building ThinStation images on Windows

By Ludo Klein Holte revision: 02-11-2006 Table of Contents 1Introduction...... 3 2Getting it working...... 3 2.1Download coLinux...... 3 2.2Installing coLinux...... 3 2.2.1Extract Debian rootfs...... 5 2.2.2Configure coLinux...... 5 2.2.3Configure Windows...... 6 2.2.4Create shortcut...... 6 2.3Starting coLinux...... 6 2.3.1Configure DNS...... 6 2.3.2Download needed packages...... 6 2.3.3Download Windows SSHclient...... 6 3Building you're own image...... 7 3.1Download ThinStation...... 7 3.2Extract ThinStation...... 7 3.3Edit build.conf...... 7 3.4Edit thinstation.conf.buildtime...... 7 3.5Edit bootsplash config...... 7 3.6Change bootsplash picture...... 7 3.7Building the image...... 8 3.8Download the image...... 8 4Last word...... 8 1 Introduction I've was wondering how good ThinStation would work. It's a hobby of mine to test some stuff for fun. I build a nice iso online, but had some trouble with it. One trouble shooting item was the bootsplash screen. The online compiler only said syntax error to me. So i thought if i build it my own the error would disappear. I used my FreeBSD server, but the build script failed on this. I didn't like to install a new pc with certainly not for this. I looked on the website which said that Cygwin is not working. Then i saw coLinux and i tried it with succes. Because the setup is not obvious i wrote this peace of paper so you can reproduce it if you like.

2 Getting it working

2.1 Download coLinux On the SF.net website of coLinux you can download a coLinux installer for Windows. Go to http://sourceforge.net/projects/colinux/ and download the .exe installer of a stable version of coLinux.

2.2 Installing coLinux Start the executable coLinux.exe file you've downloaded in the previous step. The installer wil start with the welcome screen as it is shown in the textbox, press Next to continue.

The next screen will present you the license under which coLinux is released. Read the license and if you agree press the I Agree button. The next screen will show you the components which you can install. All components are needed accept WinPcap but if you like it for further development you can include it also, thus press the Next button.

The next screen let you choose you're install directory. Choose c:\coLinux as you're destination folder and press the Next button. The next screen lets you choose you're filesystem. Select Debian as distribution and set you're nearest download location. Then press the Install button.

During the installation you can get a hardware installation message. Press the continue button. When the copying of the files is finished you get the next screen. Un check the README checkbox and click the Finish button. Congrats you're coLinux installation is done up to the rest.

2.2.1 Extract Debian rootfs During the installation of coLinux you've selected Debian as you're rootfs. The installation downloaded this file for you to the c:\coLinux directory. Now we gonna extract this bz2 file. Make sure that you have enough space because the 21Mb file will expand to 1Gb. Because a Windows system can't extract this file extension you need a extractor which you can download from . Store this file in c:\coLinux. Now start a command prompt: Start->Execute->cmd and go to c:\coLinux: cd coLinux. Now you can extract (which can take a couple of seconds) the rootfs file by typing: bzip2-100-x86-win32 -d Debian-3.0r2.ext3-mit-backports.1gb.bz2 Please take some attention of the Debian image version. If the name of the Debian rootfs file in you're c:\coLinux is different, change it in the command.

2.2.2 Configure coLinux Browse with you're Windows explorer to c:\coLinux, the place where you've installed it. This directory contains several files. If it is well the file c:\coLinux\defaule.colinux.xml is one of them. Take you're favorite editor and edit the file so it looks like this: root=/dev/cobd0

Please take some attention of the Debian image version. If the name of the Debian rootfs file in you're c:\coLinux is different, change it in you're c:\coLinux\defaule.colinux.xml file also. 2.2.3 Configure Windows There is need to do some configuration on Windows networking so you have an Internet connection in coLinux. Under Start -> Control panel -> Network connections you will find the network connections of you're computer. There will be a LAN-connection with TAP-Win32 as device. This is the virtual device for coLinux. To give this connection some Internet, double click you're Internet network connection press the Properties button. Go to the Advance tab and check the checkbox “Share Internet with other connections”. Press the Ok button. Press the Close button. Done.

2.2.4 Create shortcut It's time to create a shortcut for starting coLinux on you're desktop. Browse with you're Windows explorer to c:\coLinuxright click on the file colinux-daemon.exe and select “Create shortcut”. The short cut will be made in the same directory. Rename the shortcut (select and press F2) to StartCoLinux or something. Now you must add extra parameters in the shortcut thus right click the shortcut and select “'Properties” in the tab Shortcut change the source into"c:\coLinux\colinux- daemon.exe" -c default.colinux.xml and press the Ok button. Done.

2.3 Starting coLinux Now you can start coLinux by double click the “StartCoLinux” shortcut, the one you've created in the previous step. Two boxes will appear: A dos box which started coLinux and the Cooperative , the one we need. Login with as root with the password root. The password can be different like coLinux of blank it holds course with the Debian rootfs image.

2.3.1 Configure DNS Because you don't make use of DHCP a DNS-server don't get assigned automaticly. Before you have Internet you must add the DNS-server of you're ISP. For this example we use 123.123.123.123 as you're ISP DNS-server. You can set the DNS-server by: echo nameserver 123.123.123.123 > /etc/resolv.conf Now test you're connection by pinging www.google.com or ping something else. If it doesn't response look the previous steps if you didn't make a mistake.

2.3.2 Download needed packages Before you can upload download and build you're thinstation iso you must install extra packages. This will be done with apt-get. The way to install these is: apt-get install file apt-get install nano apt-get install ssh During the install of ssh you can be asked if you want to install sshd server, please anwser yes!!

2.3.3 Download Windows SSHclient On the ftp server ftp://ftp.ssh.com/pub/ssh you can download SSHSecureShellClient-.exe This client is used to connect you're desktop to coLinux. Download it, install it and start it. Now you can do a quick connect. Fill in the ip address of coLinux. You can obtain these by typing the command “ifconfig”in the coLinux console. The inet addr of eth1 is the ip-address you need. The username and password is the same as you're coLinux login. Now you're done and ready to build you're own ThinStation iso. 3 Building you're own image

3.1 Download ThinStation The first of all you need ThinStation other way else you can't build it at all. So go to http://sourceforge.net/projects/thinstation and download the latest ThinStation tarball. You can store this tarball on you're desktop PC but don't forget it's destination. Now go to you're logged in sshclient and press the “yellow map with blue balls” button. You get a new window, the Secure File Transfer window. Upload the Thinstation tarball to coLinux. Done.

3.2 Extract ThinStation Now you can use you're coLinux console or the ssh shell. I will use the last one, the ssh shell. Now extraxt the ThinStation tarball by typing: tar -zxvf Thinstation-.tar.gz It can take a minute because there are many files in it.

3.3 Edit build.conf You have extracted ThinStation. You can enter the directory by cd Thinstation-. For a file listing you can use the command “ls”. To edit the build.conf you can use the editor on coLinux of download and upload the build.conf file each time you change it. I use the first one because it works faster. You can use it by typing: nano build.conf You can save and exit the editor by use CTRL+X and press Y for saving.

3.4 Edit thinstation.conf.buildtime Because this file is not default you first must copy the thinstation.conf.example to thinstation.conf.buildtime. This can be done by typing: cp thinstation.conf.example thinstation.conf.buildtime And to edit file type: nano thinstation.conf.buildtime You can save and exit the editor by use CTRL+X and press Y for saving.

3.5 Edit bootsplash config In the directory utils/tools/boot you will find the config files for bootsplash. You can edit these cfg files like you did before with build.conf and thinstation.conf.builtime files.

3.6 Change bootsplash picture In the directory utils/tools/boot you will find the bootsplash jpeg files. Change the file for you have set the boot resolution. Be sure that you're replaced jpeg file is a jpg file eg. 1024X768, 24bpp, 72x72dpi. I have used Gimp under Windows to edit. It works beautifull. You can upload you're new picure with the Secure file transfer window, select the right directory and upload the new jpeg file under the same name: bootsplash-1024x768.jpg and silent-1024x768.jpg. 3.7 Building the image Go back to the root of the Thinstation directory in the ssh shell client. Windows users use cd .. and nog cd.. whats the difference? cd.. you must use because without space it won't work to go a directory back. Then execute the build command: ./build Note: Don't forget the little first DOT before the /.

3.8 Download the image I hope that the image is successfully build because then you can download it to you're desktop PC so you can burn it. Go with the Secure file transfer window from the root of the Thinstation directory to the /boot-images/iso directory en viola there is you thinstation.iso file. Right click and select download dialog. Choose you're destination map, and burn the image.

4 Last word I hope that this manual/tutorial/peace of paper have helped you to compile you're own ThinStation image under Windows. It cost me a total of two hours to find this solution but when you all know this you can have it up and running within 30 minutes. I there are problems of if something is not clear you can always mail.