Difference between revisions of "The Linux on the pc104"
(Elena.email@example.com moved page The Linux on the pc104 to The Linux on the pc104 oldrepo: Updating installation instructions to account for new YARP2.4 repository structure)
|Line 1:||Line 1:|
Revision as of 19:28, 10 September 2013
These instructions only apply to YARP > 2.3.23 and iCub > 1.1.13 software versions
See The Linux on the pc104 oldrepo for older instructions
The pc104 located inside the iCub head runs a full Debian distribution. This version of Linux has been customized for the specific application and to boot from an USB key. As the iCub (project) grows up, many updates have been performed to this Linux usb-key image to follow the hardware as well as the Debian distribution changes. Stable versions are frozen into image files and uploaded to liralab server, for detailed instruction on where to get the image and how to flash it, see following section.
At any time to determine the version of the image is running on your iCub, the following files in the root of the filesystem can be inspected:
- VERSION: contains the version of the image
- ChangeLog: list changes to the image
Important: the images come with a dummy password for icub and root users, we recommend you keep the pc104 disconnected form the external network or modify the password.
The image file name is composed by three parts: a major number related to the Debian distribution, a minor number which tells the internal update version and the build release is a short string related to the network configuration, for example the file image1.6-oc.img, the major number is 1, minor is 6 and build is oc.
At the moment we are supporting two versions:
1.x This is an Etch'n'half based distribution. 2.x This is a Lenny based distribution (this version is now obsolete, we recommend you use 3.x instead). 3.x This is a Squeeze based distribution.
Important: starting from 1.7 and 3.0 we no longer use the Debian-Live system, instead the images are now "persistent". This means that all space left inside usb-key can be used, files can be modified and changes will survive across reboots. The 3.x squeeze distribution also contains a kernel with Real-Time patch (rt.wiki.kernel.org).
The build release refers to the network configuration the final distribution will boot-up with. We release the following three types of configuration:
- oc: "open call" standard installation (static ip 10.0.0.2, it mounts software from 10.0.0.1).
- iit: custom IIT standard installation (static ip 10.0.0.20, it mounts software from 10.0.0.11), to be used inside IIT labs.
- dhcp: dhcp-enabled network configuration. If you want to connect the robot on your own network you should be able to use this image. The pc104 will use dhcp. If you configure your dhcp server appropriately you should be able to make this work (click here to see how: live-with-dhcp).
Which version do I need?
This question is quite common whenever the number of versions and revisions start to become... more than one.
The Debian image to use depends on the iCub version:
- iCub up to version 1.1 must use a Etch and a Half distribution (image version 1.x). Persistent filesystem allows deep system configuration; if you are happy with current configuration you can skip this update, while if you really need to change system configuration now you can by appling this update.
- iCub from version 1.2 on can use either a Lenny (2.x) or a Squeeze (3.x) distribution. We kindly recommend you to keep Debian system updated to the last version, so please use the last 3.x version available!! (at the time of writing it means the 3.0 @ May 2011)
Build version should be 'iit' for robots inside iit labs and 'oc' for all the others. For persistent filesystem this configuration can be changed without re-burning a new image, you can just edit the configuration files of the network as you would normally do with Linux system.
Burn a Persistent Debian
We provide instructions for Linux.
Important USB key size needs to be at least 4GB.
Identify device node
The aim of this step is to find out which device file has been assigned from the system to your USB device.
The DEVICE_NODE is something of the form "sbX" where "X" is "a, b, c, ..., etc" depending on the number of USB device you have plugged on your machine.
1. Insert the USB key on your machine
2. Detect the correct device file for your device
This operation can be done in different ways
- Graphical way:
If you have the 'Disk utility' GUI installed you can use this tool, it is usually located in the "Administration" tab of the main menù but not all Linux distros provide it. Selecting the USB key from the list of connected drives, the device file name will be shown under the "Device" label.
- From the command line. Type:
ls -la /dev/disk/by-id/usb-*
you will get something like:
lrwxrwxrwx 1 root root 9 2007-08-11 12:46 /dev/disk/by-i/usb-Kingston_DataTraveler_II+_5B720CB323C1->../../sdb
here /dev/sdb is the DEVICE_NODE of your usb key.
- An alternative method from the command line: unplug and plug back in the usb key and see how /dev/sd* changes, or type the command:
dmesg | tail
you will see something like:
sd 12:0:0:0: [sdb] Attached SCSI removable disk EXT4-fs (sdb1): mounted filesystem with ordered data mode.
here the DEVICE_NODE is "sdb" while "sdb1" is the first partition of the device.
Important: make sure you identify the device correctly, otherwise you risk to wipe the content of your hard drive. To be sure you can try procedures above a couple of time.
Download the image
Images can be downloaded here http://wiki.icub.org/iCub/downloads/pc104-images/, some images are compressed with bzip2, if so uncompress it before proceeding.
To verify the file has been successfully downloaded, the md5 code can be verified by placing the .md5 file in the same folder as the image and typing the following command:
md5sum --check MD5FILE.md5
The output will simply be IMAGEFILE.img OK in case of success or "computed checksum did NOT match" in case of failure.
Now you can burn the new image by typing the following command:
sudo dd if=IMAGE_FILE of=DEVICE_NODE
This step will take as long as 10 or 20 minutes to finish, depending on the speed of the USB. At the end unplug and plug back in the usb key to customize the image for your specific iCub.
Important: these instructions apply to the recent persistent images of the Linux (starting from 1.7 and 3.0); instructions for previous images are reported elsewhere.
There are some scripts that customize the Linux when the pc104 boots up; those scripts are inside /etc/rciCub.d folder.
- Set RobotName variable
edit the file:
replace the line:
with the name of your robot e.g. iCubGenova01
- Setup password-less login (PC104 & laptop):
See page ICub laptop installation for details.
Important: When upgrading the usb key to a different version, remember to clean the CMakeCache before compiling!! This is because some path are likely to be changed in the meanwhile.
The persistent version of the Debian distribution is now writable so any customization can be done. Please be aware of what you do, because any changes in configuration file can lead to malfunction.