Olpc-update/lang-jp

From OLPC
Jump to: navigation, search
  This page is monitored by the OLPC team.
  翻訳された Olpc-update 原文  
  english | español日本語   +/- 変更  
  For the general public

簡単なオンラインアップグレードの方法

olpc-update(XOのOS更新用のコマンドです)はたとえ十分な速度と品質のインターネット接続が得られなくても動作するように設計されています。そしてもしダウンロード中に不意に中断するようなことがあったとしてもシステムにはなんら影響を及ぼさないはずです。もし新しく更新されたバージョンのソフトウェアが気に入らなくても、次回あなたがラップトップのスイッチを入れるときにゲームパッドの"O"キーを押し続けることで古いバージョンに戻すことが出来ます。(ゲームパッドのキーは右側のスピーカーと電源ボタンの間にあります)


以下は、新しいバージョンがリリースされたときに、手動でアップグレードを行うための手順です。

  1. XOの電源コードをコンセントに差し込みます。
  2. インターネットに接続します。もし家にWPA hostspot(WPAに対応したアクセスポイント)が家にあるのでアップグレードをしようとしているのであれば、オンラインアップグレードを実行するためにインターネットに接続するのにT-Mobileのホットスポットや地元の図書館などの 公衆無線LANのホットスポットに行った方が良いかもしれません。(※訳注:XOは標準ではWPA形式の無線LAN接続に対応していないため。手動で対応させる方法が在るが、初心者には敷居が高い)


ファイアウォールを経由する場合の注意:olpc-upgradeを使うためには、外向きのTCPポート:873がホットスポットのファイアウォールにて解放されている必要が在ります。つまり、XOがインターネットに接続できたとしても(Browseとかでホームページが見れたとしても)olpc-upgradeは"I don't think you're connected to the internet.(どうもインターネットにつながってないみたいです)"というエラーメッセージを返します。その場合はホットスポットのファイアウォールが外向きのTCP873ポートをブロックしていないか確認してください。

  1. Terminalアクティビティ Activity-terminal.svg を開き、下記のコマンドを打ち込むか(各行の最後で毎回Enterを押します)、CTRL+ALT+(3つの点のアイコンが書かれたキー)を同時に押して"root"でログインし、そして以下のコマンドを入力します。
su -l
olpc-update build-number 

ここで、

  • su -lという行のところでは, 数字の"1"ではなく、"L"の小文字を入力します。

注意:suコマンドはいくつかのビルドではあなたが"root"にならないと、パスワードを入力しなければ機能しないことがあります。そのような場合はターミナルの画面の上にある"#_"アイコンを押すと"root"になることができます。またその他のビルドでは、上記の代わりに"sudo olpc-update build-number"と入力する必要があるかもしれません。

  • build-numberはあなたがアップグレードしたいビルドの番号を示します。
最新の安定版日ルドは656です。(訳注:G1G1のXOは656でリリースされています)
  • 656より以前のビルドにおいてインストールされた外部アプリケーションは、ビルド656へのアップグレードによって認識されなくなってしまうかもしれません。 詳しくはTrac #6317をご覧下さい。--Chihyu 13:26, 1 February 2008 (EST)
もしあなたが現在まだ正式にサポートされていないかなり新しい実験的レベルのXOソフトウェアのバージョンのテストを手伝ってくださるならば、developer keyが必要ないcandidate-703へアップデートすることが可能です。joyride-1914 (2008/4/30にビルド)に関してはdeveloper keyが必要で、実験やテストのレベルのバージョンのソフトウェアを含んでおり、そして不安定でしょう。(主として人柱になる覚悟のあるテスターや開発者向けです)

無事アップデートプログラムがアップデートサーバに接続されると、以下のようなメッセージが表示されるはずです。

Downloading contents of build build-number
Updating to version hash ...
Making clean /versions/updates/...
Trying irsync_pristine update from rsync://updates.laptop.org/build-build-number
- Cleaning tree.
- Fetching contents.
- Performing incremental rsync.
Verifying update.
Installing update in /versions/{pristine,run}/...


ここで、...はある特定のバージョン番号を示します。

このアップデートの処理は30分以上かかるかもしれません。処理が完了したら、 (olpc-updateコマンドに-rオプションを指定していたならば) XOは勝手にリスタートし、アップデート処理は完了です。


Simple Online upgrade

olpc-update is designed to work with even the worst internet connections, and will do no harm if it is interrupted during download. If you don't like your new software update, you can revert to the older version by holding down the O key on the game pad (between the right speaker and the power button) when you next turn the laptop on.


To manually upgrade your machine when a new version is released:

  1. Plug the XO into an electrical outlet
  2. Connect to the internet. If you are upgrading because you have a WPA hotspot at home, you might want to go to a Public Hotspot to connect to the internet for an online upgrade, such as a T-Mobile hotspot or a local libary.
    Firewall note: olpc-upgrade requires outgoing TCP PORT:873 to be unfiltered by the hotspot's firewall. In otherwords if the laptop has functional-access to the internet but olpc-upgrade returns the message "I don't think you're connected to the internet." check the hotspot's firewall is not blocking the outgoing TCP Port 873.
  3. Open the Terminal Activity Activity-terminal.svg and type the following (press the Enter key after each line) OR press CTRL+ALT+(Three Dots Icon) and log in as "root", and enter the following commands:
su -l
olpc-update build-number 

Where

  • in su -l, it's lower case "L", not the number "1"

Note: su does not work in terminal with some builds which require a password until you become "root". You can become "root" by pressing the "#_" icon at the top of the terminal screen. In some other builds you may need to type "sudo olpc-update build-number" instead.

  • build-number is the number of the build to be updated to.
The latest stable build is 656.
  • Please note that upgrading to build 656 may disassociate the external applications installed in the previous build. See Trac #6317. --Chihyu 13:26, 1 February 2008 (EST)
If you want to help test a new and highly experimental version of the XO software (unsupported as of yet), a developer key is not needed ,you can then update to candidate-703. joyride-1914 (30 April 2008 build) requires a developer key, contains experimental and test version software and may be unstable (for intrepid software testers and developers).

If the update program successfully connects to the update server some messages should display

Downloading contents of build build-number
Updating to version hash ...
Making clean /versions/updates/...
Trying irsync_pristine update from rsync://updates.laptop.org/build-build-number
- Cleaning tree.
- Fetching contents.
- Performing incremental rsync.
Verifying update.
Installing update in /versions/{pristine,run}/...

Where ... is a version specific number.

This process may take more than thirty minutes. When the process is complete, the XO will restart (if the -r option was passed to olpc-update) and the update will be complete.


{{{1}}}
{{{1}}}

USB upgrade

At your root prompt, type:

olpc-update --version

(If the command is not found, perhaps /usr/sbin is not in your PATH, as is the case for example if you just typed "su" from the Terminal in at least some builds - you can put /usr/sbin into your PATH and try again.)

The first line of the response should be something like:

olpc-update 2.0, Copyright (C) 2007 One Laptop Per Child Association, Inc.

If you don't even have the --version option, or if it does not say that you are using at least version 2.0 of olpc-update, you will need to upgrade olpc-update before continuing.

Now use the links in the "latest releases" box above to download two files to the top directory of your USB key: osXYZ.usb and osXYZ.toc, where XYZ is the numeric part of the build you are updating to. For example, if you are updating to build 650, the files would be named os650.usb and os650.toc. If you are updating to build joyride-1452, the files would be named os1452.usb and os1452.toc.

Insert your USB key with these files on it into your XO. At your root prompt, type:

olpc-update --usb

When olpc-update is finished, you should reboot to start using your new build.

The update mechanism preserves the build from which you ran the updater as an "alternate" image from which you can boot. To swap the "primary" and "alternate" images, hold the 'O' gamepad key during boot.

Workaround: updating olpc-update

If you are using an old build, olpc-update might not be recent enough to let you update via USB, or update to a build containing a library. Here's how to upgrade olpc-update to allow you to use the processes described above.

From a root prompt on your XO (see above for information):

# wget -P /tmp/X -r -np -nd http://dev.laptop.org/~cscott/olpc-update/
# rpm -Uvh --force /tmp/X/olpc*.rpm

Or, if you are working without a internet connection on the OLPC, go to http://dev.laptop.org/~cscott/olpc-update/ and download both files to your USB drive. Then with the USB drive inserted into the OLPC:

# rpm -Uvh --force /media/USB_Drive_Name/olpc*.rpm

Now:

# olpc-update --version

should tell you that you have version 2.5 of olpc-update.

More information

The olpc-update script works by transferring only the differences between builds from a USB key or across the internet link from an updates server. This makes updating easier, mostly quicker, and almost always with less data transfer.

As an example of the data efficiency gain,

  • A full reinstallation from OS build 602 to 603 would normally take about 279Mb of download data, whereas olpc-update takes 16Mb of download data,
  • A full reinstallation from OS build 603 to 608 would normally take 262Mb of download data, whereas olpc-update takes 6.5Mb of download data,
  • An olpc-update from OS build 602 to 625 takes 33Mb of download data.

The time efficiency gain is less easy to characterize. It depends on the speed of the internet link, the speed of the updates server, and whether the update was able to use its server-friendly efficiency mode. An olpc-update from 602 to 603 cost under 17 minutes.

The current updates server is updates.laptop.org.

Usage

In summary:

  • Be connected to the internet,
  • Log in as root,
  • Type olpc-update NNN where NNN is the build number or name,
  • Wait for the update to complete,
  • Reboot.

What version am I running?

You can find the current version of your system software by typing "cat /boot/olpc_build" (a chattier version is at /etc/issue).

Be Connected

Ensure the laptop or the emulator is able to access the internet, by being connected an an access point, or via the mesh, or using an ethernet connection.

Run olpc-update

Normally you only need to run olpc-update with a build number, like this:

# olpc-update 656

or

# olpc-update joyride-1779

There are other options. For example:

# olpc-update --help
Usage: 
 olpc-update [options] --hints hints-file
 olpc-update [options] [-rf] build-number
 olpc-update [options] [-rf] --usb
 olpc-update --version
 olpc-update --help

For example:
 olpc-update 656
 olpc-update joyride-1779
 olpc-update update.1-700

Options:
  -h, --help    show this help message and exit
  -f, --full    skip incremental update attempt.
  --force       force update to an unsigned build.
  -r, --reboot  reboot after a successful update.
  --hints=FILE  name of json-encoded hints dictionary identifying the desired
                new version.
  -u, --usb     upgrade from new build on inserted USB stick.
  -v            display verbose progress information; repeat for more verbose
                output.
  -q, --quiet   don't output anything; use exit status to indicate success.
  --version     display version and license information.

Update Targets

There are several update targets available. There is usually one for each operating system build, and there are others for test builds and for Debian. To get a partial list of the available builds, use the command:

# rsync rsync://updates.laptop.org
{{{1}}}
{{{1}}}
{{{1}}}