Updated August 13, 2010 by Kjeld Jensen kjeld@cetus.dk
What is CetUX?
CetUX is a linux distribution targeted for mobile robotics and similar embedded environments. It is based on the Debian GNU/Linux Sarge distribution. The major difference is that it is capable of running in read-only mode from a USB key or a Compact Flash card (cf-card) attached to the IDE bus of a computer. CetUX preserves the standard debian apt package update features.
How do I obtain a copy of CetUX?
CetUX is not available for public download because it is a rather large image file and there is no strict versioning system. If you would like to receive a copy of CetUX please email Kjeld Jensen. Please add a brief description of the project you intend to use CetUX for.
What is the current CetUX version?
The current version is CetUX v1.1.
How does CetUX work?
Running Linux on a USB key or a cf-card causes a problem as they rely on flash memory technology which allow only a limited number of erase-write operations. This problem is solved by mounting the flash memory as read only.
Linux needs to have write-access to certain files and directories though. Therefore a ramdisk is created and files and directories that are updated during normal operation are symbolic linked to a copy at the ramdisk.
A positive side-effect of mounting the USB key or cf-card read-only is that the computer can be switched off at any time at no risk of the filesystem integrity. Upon switching the computer off the ramdisk content is erased, and when switching on again CetUX will boot having no knowledge of prior boots.
Who created CetUX?
CetUX was created by Kjeld Jensen. CetUX is a port of the Debian GNU/Linux Sarge distribution, however, so most of the work should be credited to those contributing to the continued development of Debian.
While the distribution apply to many embedded solutions targeted for networking-, communications-, sensor- and control- applications, much of the inspiration comes from my work with field robotics at the Danish Institute of Agricultural Sciences. CetUX 1.0 (formerly named iComLinux) was developed while building a control computer for the Hortibot vehicle.
Some of the practical solutions were inspired by the Linux distribution pebble which I have previously been using for a firewall project.
What about copyright and software licences?
Debian GNU/Linux is free software, and the debian documentation states:
Free software, in part, means that the licenses of individual programs do not require you to pay for the privilege of distributing or using those programs. Free software also means that not only may anyone extend, adapt, and modify the software, but that they may distribute the results of their work as well.
This is exactly what CetUX is, a modified distribution of debian for you to install, use, modify and distribute.
Debian GNU/Linux itself is copyrighted and many of the programs used in the debian distribution are licensed under the GNU General Public License. I do not wish to impose any further copyright on the work I have put into creating CetUX. I created it for my own purposes and if you find it useful, then you are welcome to take advantage of my work. Naturally I would like to be credited for my work and I would be happy for a short description of your application also, but it is by no means a requirement.
I am no expert into copyright law, but it is my understanding that all copyrights upon the Debian GNU/Linux distributions and parts hereof are inherited by CetUX, so as long as you follow the Debian GNU/Linux copyright rules, then everything should be fine.
What about warranty?
This software comes with no warranties. No guarantee is made as to the suitability of the software for any given purpose. However, since the software is free, you are empowered to modify that software to suit your needs - and to enjoy the benefits of the changes made by others who have extended the software in this way.
How do I get support?
Unfortunately there is no free support for CetUX. While I encourage you to take advantage of my work, I cannot offer support unless you pay for this via the company Cetus.
How big a Compact Flash card or USB key is required?
The current CetUX image is created for a 1 Gb disk size. It will fit any larger disk, and this allows you to create a secondary partition if you need space for large data files. If you for instance use VFAT for the secondary partition, this partition will be acessible from both CetUX and from eg. MacOS X/Windows, if you mount the Compact Flash card or USB key.
Does CetUX work with all Compact Flash cards?
A Compact Flash card contains three different interfaces. Then one often used is the standard Compact Flash interface. Another interface, the IDE, is invoked if the cf-card is attached to the computer IDE bus. Not all Compact Flash card vendors have implemented correct support for IDE, so some Compact Flash cards work and some do not.
I normally use Sandisk Compact Flash cards. They are a bit expensive, but they have never let me down. If you have Compact Flash card from another just test if it works.
How do I copy the CetUX image to a Compact Flash card?
Linux
Place the Compact Flash card in an USB cardreader or a PC-card adapter and figure out which device name it attaches to. Then run the command:
# dd if=CetUX_v110.img of=/dev/sda bs=10M
Replace CetUX_v110.img with the correct image name and /dev/sda with the device name for the cf-card. Please notice that the device name adresse the entire disk not the first partition.
To prevent periodic filesystem checks run the command:
# tune2fs -c 0 -i 0 /dev/sda1
Replace /dev/sda1 with the device for the first partition on the Compact Flash card.
How do I reset a USB disk?
First you need to know which device is associated with the USB disk, it will probably be /dev/sdX where X is either a,b,c, ... It is very important that you find the correct one because we are going to clear the master boot record of that disk, and naturally you don't wnat it to be your computers hard disk.
Run this command to wipe out the master boot record (replace X with the correct letter):
# dd if=/dev/zero of=/dev/sdX bs=446 count=1
Then we create a new FAT32 partition on the disk, run:
# fdisk /dev/sdX
Within fdisk type 'n' to create a new partion, select partition number 1 and allocate all space available. Then type 'w' to write and 'q' to quit.
Now eject the USB key and reinsert it again. Then run the command:
# mkfs.vfat -F 32 /dev/sdX1
Your USB disk is now reset and will be viewable in Windows again.
Windows
The program dd used as described in the Linux section is also available for Windows at http://www.chrysocome.net/dd
How do I access CetUX?
Login using username root and password cetus
How do I connect via SSH?
ssh to to the CetUX IP address and log in using username root and password cetus.
Which directories are writable during normal operation?
The ramdisk is mounted at /ramdisk and any symbolic links to files or directories here are writable. If you just need to run some applications then you probably need not to concern about this. You can put any application specific writable files in /root/rw
How do I make the cf-card writable?
In come circumstances you may want to obtain write-access to the entire cf-card. When you run the command:
# makerw
the cf-card is remounted as rewritable and you may create, edit or delete files. Remember to remount as read-only again before switching the computer off:
# makero
Where do I put my applications?
I suggest you put them in /root/bin
Are there any other users than root?
No. Unless you have some specific purpose for this, the root account is probably all you ever need. But naturally you can add users just like a normal debian installation. Just remember to make the disk writable while adding the users eg.:
# makerw
# adduser username
# makero
How do I change the network setup?
The default network setup is DHCP which means that when CetUX is booting, it will try to acquire an IP address from a DHCP server. If successful it will echo that IP address to the console at the end of the boot process.
The easy way
The easy way is to use the netcfg script located in /root/sbin
To switch to DHCP run:
# netcfg
To switch to a static (manual) configuration run:
# netcfg cfgfile
where cfgfile is a configuration file located in /usr/sbin You will find some examples there like net_vmware.conf which you can use as a template for creating your own configuration file.
If you use static configuration, and you need internet access, you also need to add your DNS servers to /etc/resolv.conf
The hard way
If you want full control of the network setup then edit the files /etc/network/interfaces and /etc/resolv.conf by hand, then run:
# /etc/init.d/networking restart
How do I change the root password?
The default root password is 'icom'. To change the password login as root and execute these commands:
# makerw
# passwd
# makero
How do I perform a security upgrade?
If the computer is not connected to the internet and you are not having any problems, then you do not need to perform upgrades. If you want to perform upgrades, then execute these commands:
# makerw
# apt-get update
# apt-get upgrade
# cleanup
# makero
How do I mount an USB key?
Insert the USB key and try executing this command:
# mount -t vfat /dev/sda1 /mnt/usbkey
If you do not already have a /mnt/usbkey directory then you may create it using these commands:
# makerw
# mkdir /mnt/usbkey
# makero
Which Linux kernel is CetUX based on?
The kernel used for the CetUX distribution is the debian standard kernel.
You are encouraged to compile you own kernel in order to add drivers and features of your preference and optimize for speed and file size.
How do I upgrade the Linux kernel?
You have to compile the kernel using another computer running Linux. Assuming you have a debian package containing the new kernel and modules, run the following commands:
# makerw
# dpkg -i kernel-2.6.X.Y.deb
# cd /boot
# mkinitrd -o /boot/initrd.img-2.6.X.Y 2.6.X.Y
In /boot/grub/menu.lst add an 'initrd' parameter to the new kernel section just like there is one for the old kernel (you get the idea when you edit the file). After editing the file run:
# makero
And reboot to activate the new kernel.