Olpc-update

From OLPC
Revision as of 02:18, 11 October 2007 by Quozl (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This method of updating from one OS build to another is experimental. It works by transferring only the differences across the internet link from an updates server.

As an example of the data efficiency gain,

  • an autoreinstallation from OS build 602 to 603 would normally take about 279Mb of download data, whereas olpc-update takes 16Mb of download data,
  • an autoreinstallation from OS build 603 to 608 would normally take 262Mb of download data, whereas olpc-update takes 6.5Mb of download data,

The time efficiency gain is less easy to characterise. It depends on the speed of the internet link, and whether the autoreinstallation image needs to be downloaded. An olpc-update from 602 to 603 cost under 17 minutes.

The current updates server is updates.laptop.org.


Usage:

  • Ensure the laptop is able to access the internet,
  • Be root at a command prompt,
  • Type olpc-update NNN where NNN is the build number.

Q: What update targets are available?

A: recent OS builds, including Debian buils.

# rsync rsync://updates.laptop.org | sort

A: With bleeding-edge versions of rainbow and pyvserver, this feature is available as

# olpc-update -l

Q: What is the latest version of the updater?

A: the most-recent released version of the updater is at:

# wget http://dev.laptop.org/~mstone/olpccontents-latest.rpm
# wget http://dev.laptop.org/~mstone/rainbow-latest.rpm

A: the most-recent unstable version of the updater is at:

# wget http://dev.laptop.org/~mstone/pyvserver.rpm
# wget http://dev.laptop.org/~mstone/rainbow.rpm

These packages can be installed with something like:

# rpm --upgrade --force  *.rpm

Q: How can I re-use the bits for multiple laptops, using a laptop?

A: Imagine that you have two laptops, one is called SOURCE and the other TARGET.

On the SOURCE laptop, add an rsyncd.conf file to /etc:

[contents]
        path = /versions/contents
        uid = root
        gid = root

[pristine]
        path = /versions/pristine
        uid = root
        gid = root

Then start rsync --daemon there.

On the TARGET laptop, use rsync to check access and identify the build that is available:

rsync rsync://SOURCE/contents

Where SOURCE is the IP address or domain name of the SOURCE laptop.

Take note of the build identifier. It will be a hexadecimal hash.

On the TARGET laptop, use olpc-update to upgrade or downgrade to that build:

olpc-update -u rsync://SOURCE/contents/BUILD rsync://SOURCE/pristine/BUILD/

Note that the extra slash on the second argument is needed.

Several laptops can all be updated in the same way from one source.


Q: How can I re-use the bits for multiple laptops, using a server?

A: This feature is available for testing but is not yet released. Also, no one that I know of is yet publishing their own builds.

In any case, in very recent versions of the updater, one may specify something like

# olpc-update -s rsync://teach.laptop.org -l

to see a list of builds available from teach.laptop.org.

Note: In the future, it may be possible to use this feature to perform incremental updates from a USB stick or SD card, e.g. by giving something like

# olpc-update -s /mnt/mmcblk0p1 613

Please give feedback on whether you would use such an update target.

  • manifest was an old name for contents, and was present for builds 602 603 605 607 608 and omitted from builds 609 610 611 612,
  • updates.laptop.org generates an AUTH request, so an ident server on the system running rsync may be helpful, Debian package oidentd is sufficient,

Q: Where is the source?

A: The source repo is http://dev.laptop.org/git/users/mstone/security

The branch you want is currently called updater, though this will likely change in the future. There are five important files in the repository. They are:

rainbow/sbin/olpc-update
rainbow/sbin/olpc-update-rsync
rainbow/rainbow/update.py
rainbow/rainbow/launch/targets/update.py
rainbow/rainbow/launch/stages/update.py

A: More recent work is being done on the master branch.


See also