Imaging Guide

(Difference between revisions)
Jump to: navigation, search
(Small formatting changes)
Line 1: Line 1:
 
Decprecated incarnations of tablet imaging walkthroughs are located at the [[Deprecated Imaging Guides]].
 
Decprecated incarnations of tablet imaging walkthroughs are located at the [[Deprecated Imaging Guides]].
  
== Clonezilla Implementation ==
+
== CloneZilla Implementation ==
 
There is some patchy original documentation at the [http://www.clonezilla.org/clonezilla-server-edition/ Clonezilla Guide] and [http://drbl.sourceforge.net/ DRBL homepage].
 
There is some patchy original documentation at the [http://www.clonezilla.org/clonezilla-server-edition/ Clonezilla Guide] and [http://drbl.sourceforge.net/ DRBL homepage].
  
Line 39: Line 39:
  
  
 +
 +
== CloneZilla Netboot without DHCP ==
 +
In the past TICC used CloneZilla from a local computer, requiring us to setup some computer to run CloneZilla (above process) ''every time we imaged''.  The reason we had to do this is that we do not have control over the DHCP server on the network, so we cannot use PXE to boot our clients if we connect them to the network.  To work around this we have been developing a DHCP-server-less configuration of CloneZilla that allows us to perform our imaging.  This build has 2 components: a special netbooting USB flash disk and modifications to our CloneZilla installation.
 +
 +
=== Netboot USB Flash Disk ===
 +
* started with hardy live cd
 +
* modified cd image for usb (find link)
 +
* added netboot to usb (find link)
 +
* tweaked the syslinux menu to have special clonezilla options
 +
* added "ifconfig lo up" so DRBL doesn't puke
 +
 +
=== CloneZilla Modifications ===
 +
changes to /tftpboot/node_root/sbin/init:
 +
* changed "nfsserver" to not "ip match"
 +
* added early mount for /opt
 +
* added ssh routine to copy the template for our IP
 +
 +
changes to /tftpboot/node_root/:
 +
* placed ssh in /usr/bin
 +
* placed a bunch of libraries need by ssh in /lib (find list)
 +
 +
added a user and group "clonezilla"
 +
 +
changes to /tftpboot/nodes/:
 +
* copied the original IP to "template"
 +
* applied "chmod -R g+rw template"
 +
* applied g+x to all directories (find command)
 +
* applied "chown -R "root:clonezilla template"
  
 
== The Grand Unified Tablet Build ==
 
== The Grand Unified Tablet Build ==

Revision as of 18:16, 14 January 2009

Decprecated incarnations of tablet imaging walkthroughs are located at the Deprecated Imaging Guides.

Contents

CloneZilla Implementation

There is some patchy original documentation at the Clonezilla Guide and DRBL homepage.

Import the repo key to your keyring

wget http://drbl.nchc.org.tw/GPG-KEY-DRBL; apt-key add GPG-KEY-DRBL

Edit sources.list

Add the following to your /etc/apt/sources.list

(This should also work if you add a file in /etc/apt/sources.list.d/, then apt-get update) This repo is the only one with the DRBL package, but it's really slow. Consider downloading the DEB file from Sourceforge and installing it locally. sudo apt install XYZ.deb or apt-get update && apt-get install drbl will install the required files.

Install DRBL, step 1

There are two commands you use to install and activate CloneZilla. The first is /opt/drbl/sbin/drblsrv -i . Note: There is a space before the "-i". The first time you run it, this will also connect to the Intarweb and download a bunch of packages. Decline installing packages for “Diskless Linux”, as we don't run any thin clients. Other than that, the questions are pretty straightforward. Make sure you have two network interfaces up when you run this command – it will detect one as “Internet” and one as “private”. If it doesn't detect two interfaces, the clients won't get a DHCP lease. Don't bother to configure your clients – letting the range in dhcp.conf control leases is fine. It warns you about this, but we don't care.

Install DRBL, step 2

Run /opt/drbl/sbin/drblpush -i - Sorry, I don't remember what this does, just that it's necessary. The default options are again mostly acceptable. We want “no diskless Linux” and “Clonezilla box”. Some options give information about “increased requirements on server for more clients”. These options are never what we want – we don't care about persistent client configuration.

Get image from source tablet

Now run /opt/drbl/sbin/dcs to set the mode. Primarily pay attention to “clonezilla-start” and “clonezilla-stop”, then “clonezilla-save-disk” or “clonezilla-restore-disk”. Note that the defaults include no graphical boot screen – this is nice to have, so change this option. Also, choose whether you want to set the image name now or later. “Now” is fine. Your first task is to receive an image, so select that option. Netboot your master, and follow the instructions.

Broadcast image

After you receive the image, you have to put it back out to the others. Rerun /opt/drbl/sbin/dcs, selecting “clonezilla-start” and “clonezilla-restore-disk”. When you are broadcasting an image, you have two options. You can wait for a certain amount of time or a certain number of clients. I suggest the “number of clients” option, as it should prevent the problem we've experienced with our dd/udpcast script of missing one client and having to reboot all the clients.

Da-da!

That's it! Our test run showed a sustained transfer speed of about 1GB of data/minute, which may or may not happen on a regular basis.

Misc. Comments

Each interactive command ends with a statement like “Next time you want to do this, run the following command”, giving you a method to bypass the interactive part by using a huge command line instead. I was never paying enough attention to capture these, but we should get them and put them up on the wiki to save some time.

Good luck!


CloneZilla Netboot without DHCP

In the past TICC used CloneZilla from a local computer, requiring us to setup some computer to run CloneZilla (above process) every time we imaged. The reason we had to do this is that we do not have control over the DHCP server on the network, so we cannot use PXE to boot our clients if we connect them to the network. To work around this we have been developing a DHCP-server-less configuration of CloneZilla that allows us to perform our imaging. This build has 2 components: a special netbooting USB flash disk and modifications to our CloneZilla installation.

Netboot USB Flash Disk

  • started with hardy live cd
  • modified cd image for usb (find link)
  • added netboot to usb (find link)
  • tweaked the syslinux menu to have special clonezilla options
  • added "ifconfig lo up" so DRBL doesn't puke

CloneZilla Modifications

changes to /tftpboot/node_root/sbin/init:

  • changed "nfsserver" to not "ip match"
  • added early mount for /opt
  • added ssh routine to copy the template for our IP

changes to /tftpboot/node_root/:

  • placed ssh in /usr/bin
  • placed a bunch of libraries need by ssh in /lib (find list)

added a user and group "clonezilla"

changes to /tftpboot/nodes/:

  • copied the original IP to "template"
  • applied "chmod -R g+rw template"
  • applied g+x to all directories (find command)
  • applied "chown -R "root:clonezilla template"

The Grand Unified Tablet Build

TICC is now using a single build to image all of our tablets. Our first attempt at this build has focused on the tc1100 and tc4200, this build will eventually be updated to handle differences between these tablets and the tc4400 and 2710p tablets. To setup a tablet with the GUTB scripts just download the archive and copy it to the root partition (/), untar it (tar -xzf ticc-scripts.tar.gz), and then run the install script (/scripts/INSTALL.sh).

Archive.png Download ticc-scripts for the GUTB (Alpha Release)

Detection of Tablet Model

A simple hash of the CPU information is used to create a unique identifier for each tablet. The script '/scripts/cpuhash.sh' can be used to generate this id, this script just runs the command:

cat /proc/cpuinfo | grep -v bogomips | grep -v "cpu MHz" | md5sum | awk '{ print $1 }'

This command takes the CPU identification and strips out the part that varies from time to time (bogomips and "cpu MHz") and creates an md5sum of the remaining data. It is important to note that because of the technique used to detect the model, more than one CPU can correspond to a particular tablet model. To add a hash to the list so that it correspond to a particular model you must tack on the result of '/scripts/cpuhash.sh' to the file '/scripts/hashes.sh'. This file is formatted 'addHash <hash> <name>'; for example, the tc1100 entry appears as:

        # CPU Hash                       # Tablet Name
addHash d4c66c8352264f0fd3a70935ad43dacc tc1100

Differences in the Wacom Driver

The tc1100 and tc4200 have three major differences in how they utilize the Wacom pen: the tc1100 has no eraser, the side-buttons have different IDs on the two tablets, and the serial port used by the pen controller has a different address. To resolve the eraser issue, there is a separate xorg.conf for each tablet. To handle the button codes being different there is a separate folder of scripts for each pen button for the two tablets, when the tablet starts up a symbolic link is made to the appropriate script folder. In order to handle the different serial ports being used, a unique "autoserial.conf" file (part of setserial) is used for each tablet and a symbolic link is made to the appropriate configuration file on boot.

Differences in the Video Driver

The tc1100 uses nVidia's proprietary video card driver while the tc4200 uses the open-source Intel i810 driver. Due to this issue there is a separate xorg.conf for each tablet and there are also separate GLX and OpenGL libraries (libglx.so and libGL.so.1). While the tablets will work without these changes, without xorg.conf you will need to reconfigure the graphics driver at every boot and without the correct graphics libraries Compiz will not be able to function.

Personal tools
Namespaces
Variants
Actions