WYSE Winterm Hacking: Hacking the 3200LE

Kelly Koehn - 4/2/2007
Updated: 1/12/2008

Note: I have not worked on this project for some time and probably won't again as I don't have these units anymore. If you would like to donate a machine for more testing send me an e-mail.

Objective: Install Linux on a WYSE Winterm and create a functioning DHCP server

The Winterm that I have is a fairly small unit. The specs are as follows:

Internals:
External Ports:
Inactive Ports:
There are two other ports that seem to be inactive inside the system. There is a CompactFlash port on the board but that appears to be inactive. According to some other sites it is a memory expansion port for storing data. The other port is an SO-DIMM slot right above the soldered onboard memory. I have put a 32MB PC66 and 64MB PC100 DIMM in there and neither register on the system. It may be disabled somewhere or some kind of expansion port.

Getting the system to boot Linux:
Obviously the unit was designed to only run Windows CE 2.12 so you can't just replace a hard drive or simply tell it to boot off of USB. The unit boots off of an ATMEL boot ROM that is socketed on the board. You will need to update the unit's firmware so it will start a Linux bootloader on top of the CE infrastructure. To do this is very simple. All you will need is an FTP location to place the firmware image and a console into the Winterm.
Your Winterm will now attempt to boot from the USB key everytime it starts up. Now we need to prepare a USB key to hold our image.

Note: If your unit just hangs at the Tux screen, you have bricked your unit! You will need to follow these steps in order to re-flash your unit with the standard CE image. You can also use this process to bring your unit back to 'factory defaults' in the event you want to get rid of it. Downloading your image:
I have made a custom image that is about 104MB or there is a standard DSL (DamnSmallLinux) image custom made for the Winterms. I have made several changes to my image to fix some bugs and customize it for the 3200LE. I have also configured my image to not load X-Windows, enabled SSH, and also have made it a headless DHCP server (my intended purpose for the box).

Select your image that you would like and download it:

Extract the contents of either file into a directory on your Linux box. You can do this on Windows but it is a lot more work (since Windows doesn't natively support EXT2 FS). Go ahead and plug in your USB drive into your Linux box and you will see it installed. Some distributions will automount the USB drive somewhere. If yours does not then you can type 'dmesg' and you will see what it called the device. Typically it will be called '/dev/sda'.

First we will need to prepare the drive for use. Typically flash drives come with a FAT or FAT32 system on them for Windows. Linux will read this out of the box but the Winterm image isn't looking for this and will *not* boot from it. We need to remove that file system and create an EXT2 file system in its place. Keep in mind that this will remove ALL data from your flash drive!!! Once again, ALL DATA WILL BE REMOVED AND UNRECOVERABLE!

Once you have your flash drive found go ahead and load fdisk to partition the system. Type the following command:

 fdisk /dev/sda

Note: If your distribution automounts USB drives, you will need to unmount it first!

If you want to see the existing partitions you can press the 'p' key to print out the partition list. Otherwise just press 'd' to delete the partition. Now we need to press 'n' to create a new partition. Press 'p' to create a primary partition and select '1' as the partition number. You will want to select '1' as the default sector and then just hit enter on the ending sector. This will use all of the flash drive by default. Once you have done this you need to set the partitions file system type by pressing 't'. You will be asked for the type, type in '83' for the Linux EXT2 system. Now press 'w' to write. It will write the FAT and then you will be returned to the console. Your flash drive may write for a little bit if it is a slower model -- just wait until it completes.

Now we need to format the drive with our EXT2 file system. Type the following command to create the file system:

 mke2fs /dev/sda1

This will begin 'formatting' the flash drive and you will be returned to the console prompt when it is completed. This should only take a few seconds.

Once the formatting is complete we will be ready to copy files to the drive. First we will need to mount the drive so you can write files to it. Type the following at the prompt to mount the drive:

 mount /dev/sda1 /mnt

Most systems have a /mnt directory for this specific purpose. If yours does not then create a directory or use an existing empty directory to mount to. Change to the /mnt directory and untar the archive to the drive. For our example I will assume you are using my customized image and your files are stored in the 'winterm' subdirectory under the root directory.

 cd /mnt
 tar -zxvf ~/winterm/winterm.tar.gz


You will see a series of files fly by and files will begin writing to your flash drive. Please be patient as this will take several minutes for the buffer on your flash drive to empty. Do not pull out the drive until the light stops flashing otherwise file errors will occur! Once the flashing has stopped you can unmount your flash drive and then remove it by typing:

 umount /mnt

Insert your flash drive into your Winterm and turn the power on. The system will initialize itself and when the orange light turns off it will be ready. Simply press the power button and the power light will turn green. You will see the WYSE logo appear with Tux on it and it will begin searching for the USB key. Shortly after Linux will begin booting and you will be at a console.

Caveats with the standard install:
Here are some things that I ran across while writing up this document. If you decide to use the standard DSL installation you will more than likely end up with a file system 'crash' at the beginning of the first boot. I'm not sure why but this happened to me almost everytime, resulting in a readonly file system. This seemed to be caused by fsck being an old version and not supporting something in the EXT2 standard. By commenting out the initial 'fsck' commands in /etc/init.d/checkroot.sh and /etc/init.d/checkfs.sh I was able to get a successful boot. It will however show an error about the file system being uncleanly mounted but it is silent about it. If you attempt to run fsck on the USB drive it will corrupt all data... I learned this the hard way!

The network will always attempt to search for DHCP even if you modify the configuration. In order to get it to stop this and use the /etc/network/interfaces configuration you will need to modify /etc/init.d/knoppix-autoconfig and comment out the line that reads 'pump -i $DEVICE >/dev/null....'. I just put the command 'ifup eth0' in there to bring up the ethernet device manually. If you don't do this and you modify the interfaces file it will cause the ethernet device (eth0) to fail when it comes up and you will always have to do an ifdown/ifup command -- not good for a headless system!

One final thing to note is that X by default will look for a PS/2 mouse. After several hours of thinking I had bad drivers I learned that I had to setup X again and tell it to look for a USB mouse. Just run the 'xsetup.sh' script and when it asks about a USB mouse just select Yes. Be sure and select the Xfbvid or whatever it is called... it is a the Framebuffer device, NOT the VESA device. You will need to restart the box after this or X will give you errors.

Well I hope this helps some people out... these are great little solid-state devices that not only are cheap... but quite reliable! Enjoy!

Special thanks to these two sites. Without them this wouldn't be possible!
http://winterm.gaast.net
http://www.marlwifi.org.nz/projects/winterm