Download: Difference between revisions

From OLPC
Jump to navigation Jump to search
 
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>{{TOCright}}</noinclude>
To download is to copy a file from a web server to your local computer. Reliable downloading takes skill in the face of occasional technical challenges.
To download is to copy a file from a web server to your local computer. Reliable downloading takes skill in the face of occasional technical challenges.


Line 14: Line 15:


The file will be in your Downloads directory.
The file will be in your Downloads directory.

==== Using Firefox on Mac OS X ====

Some Mac OS X systems lack a right-click button. Use control-click instead of right-click, then follow the generic Firefox instructions above.


=== Using Safari ===
=== Using Safari ===
Line 25: Line 30:
The file will be in your Downloads directory.
The file will be in your Downloads directory.


=== Using Internet Explorer ===
=== Using Internet Explorer 9 ===
* right-click on the link, and a menu will appear, click on ''Save Target As...''

* a dialog window will appear asking you where to put the file. Select the location and maintain the file name and suffix.
* right-click on the link, select ''Download''.
* the window will appear at the bottom of the browser window will show the progress of the download.

* if at any point you close this progress window, you may again follow the progress by selecting Tools/View Downloads from the menu bar.
''(to be completed by someone who knows how it works)''
* the window will update indicating the download has completed, and then give an opportunity to open the download folder. At this point you may close the browser.


=== Using curl ===
=== Using curl ===
Line 38: Line 44:
''curl'' is available on Mac OS X by default, and can be installed on Linux or Microsoft Windows.
''curl'' is available on Mac OS X by default, and can be installed on Linux or Microsoft Windows.


* right-click on the link in your web browser, and select ''Copy Link Location'',
* right-click on the link in your web browser, and select ''Copy Link Location'' (Firefox), or control-click on the link and select ''Copy Link'' (Safari),
* start a Terminal, and then type
* start a Terminal, and then type
cd Downloads
cd Downloads
Line 59: Line 65:


Where ${URL} is the link.
Where ${URL} is the link.

To interrupt a download and resume it later, press Control/C. When you wish to resume, press up arrow once to recall the command, and then press enter to start it again. The download will resume from where you interrupted it.

If the [[#Running_out_of_space|available space is too small]], download directly to a USB drive; first insert the drive, then change directory to it, then use wget, like so:

cd /media/USB_DISK
wget --continue ${URL}

=== Using Browse ===

Browse is not recommended for large downloads, because:

* [[#Downloaded_File_has_Wrong_Name|the file name gets changed]], requiring extra steps,
* [[#Running_out_of_space|the available space may be too small]], requiring extra steps,
* some versions of Sugar may fail when copying very large files to USB drive, and;
* extra stress on the endurance limit of the internal storage.

However, if you wish to risk it:

* click on a download link to start, and a download progress will be shown,
* wait for the download to finish,
* copy the file to a USB drive (see the [http://wiki.sugarlabs.org/go/0.94/Notes#Enhanced_copy_option_in_the_Journal Journal Copy-to] option).


== Verifying ==
== Verifying ==


For some downloads, the directory also contains an md5 file that can be used to check that your copy of the file is intact.
For some downloads, the directory also contains an md5 file that can be used to check that your copy of the file is intact. If you have downloaded both filename and filename.md5, execute this command in the directory to which they were downloaded to check the integrity of filename.
md5sum -c filename.md5

If the md5 does not match, the file is corrupt, that is, part or all of the file contains wrong data. See Wrong Data below for how to fix.

== Problems ==
== Problems ==


Line 75: Line 106:


A download that takes too long is usually caused by:
A download that takes too long is usually caused by:
* your internet service is too slow,
* your Internet service is too slow,
* your internet service is being shared with other people,
* your Internet service is being shared with other people,
* the file is far too large.
* the file is far too large.


You should either keep waiting, or use one of the interrupt and resume methods above.
You should either keep waiting, or use one of the interrupt and resume methods above.

=== Running out of space ===

Running out of space will cause a download to be interrupted.

You must make more space available, by either deleting things, or by adding external storage.

Then you should either try the download again, or try to resume it using one of the methods above, such as wget or curl.


=== Interrupted ===
=== Interrupted ===


A faulty or irregular internet service may cause a download to be interrupted.
A faulty or irregular Internet service may cause a download to be interrupted.


You should either try the download again, or try to resume it using one of the methods above, such as wget or curl.
You should either try the download again, or try to resume it using one of the methods above, such as wget or curl.

For Firefox, try the [https://addons.mozilla.org/en-US/firefox/addon/downthemall/ DownThemAll!] extension.

=== Downloaded File is a Document ===

We use several unusual file types that are not known by your computer. This may cause your computer to use an icon for the file that represents a document. We can't fix this. This can be ignored. Proceed to use the file as instructed.

In Mac OS X for example, a .zd file is shown in Finder as a document. An .img file does not, since .img is a file type that is used for disk images.

Other operating systems may indicate that the file is a document.

=== Downloaded File has Wrong Name ===

Some methods of downloading may change the file name.

In particular, using Browse and the Journal will add .bin to the end of the file name. You must fix that by renaming the file. In GNOME right-click on the file and rename. Or in Terminal:

cd /media
cd 'USB DISK'
mv filename.zd4.bin filename.zd4

=== Wrong Data ===

This is where the length of the file matches exactly, but the md5sum does not.

The simplest way to fix wrong data is to download the file again, in the hope that whatever caused the wrong data won't happen a second time.

A more complex way is to use tools designed for recovering from the wrong data situation, such as rdiff or rsync, or manual division.

==== rsync ====

Most files that OLPC provide are not available via rsync without prior arrangement. If you face a long expensive download, please check to see if OLPC can provide the file via rsync. Then rsync is used with your existing file, and it checks what parts of the file are wrong, and downloads only those wrong parts. After it completes, the file will be correct.

If you have a remote shell account with high speed access, use that to download the file, then rsync from there.

A mirror of download.laptop.org is available via rsync at
rsync://mirror.aarnet.edu.au/pub/olpc/

==== rdiff ====

*identify a correspondent who has a copy of the uncorrupted file,
*use ''rdiff signature'' to create a file signature of your corrupted file,
*send the file signature to your correspondent,
*the correspondent is to use ''rdiff delta'' to generate a binary patch and send it back,
*apply the patch using ''rdiff patch''.

==== manual division ====

This method is suited to e-mail, and requires a correspondent who has a copy of the uncorrupted file.

*both you and the correspondent are to split the file into a suitable number of pieces and generate an md5sum of each piece, and exchange the list of md5sums,
*the md5sums are compared, identifying which parts of the file are corrupt,
*for each corrupt part, the correspondent is to provide the file to you, by e-mail, or by download,
*once all parts are present, you are to assemble the parts into the whole.

Example:

Your correspondent splits the uncorrupted file and sends you the checksums:

split --bytes 5315584 --numeric-suffixes --suffix-length=3 os883.img
md5sum x* > good.txt

You split the corrupted file and sends you the checksums:

split --bytes 5315584 --numeric-suffixes --suffix-length=3 os883.img.bad
md5sum x* > bad.txt

You or your correspondent can then compare the parts:

diff bad.txt good.txt

Assume at this point that only the file x030 is corrupt. You would then remove that file.

rm x030

And wait for it to be provided by the correspondent.

Then assemble the parts into the whole:

cat x??? > os883.img

And check the md5sum again.

Latest revision as of 23:41, 2 September 2013

To download is to copy a file from a web server to your local computer. Reliable downloading takes skill in the face of occasional technical challenges.

Back on the page that referred you here, you should have a download link that you are interested in. The following instructions relate to that page. Place the pages side by side.

How to Download

Using Firefox

  • right-click on the link, and a menu will appear,
  • click on Save Link As..., and a dialog window will appear asking you where to put the file,
  • tell it where you want the file put, and then a Downloads window will appear,
  • wait for the download to complete,
  • close the Downloads window,

The file will be in your Downloads directory.

Using Firefox on Mac OS X

Some Mac OS X systems lack a right-click button. Use control-click instead of right-click, then follow the generic Firefox instructions above.

Using Safari

  • control-click on the link, select Download Linked File As ..., and a Save As dialog will appear,
  • click on Save, the dialog will go away,
  • a Downloads window will appear,
  • wait for the download to complete,
  • close the Downloads window.

The file will be in your Downloads directory.

Using Internet Explorer 9

  • right-click on the link, and a menu will appear, click on Save Target As...
  • a dialog window will appear asking you where to put the file. Select the location and maintain the file name and suffix.
  • the window will appear at the bottom of the browser window will show the progress of the download.
  • if at any point you close this progress window, you may again follow the progress by selecting Tools/View Downloads from the menu bar.
  • the window will update indicating the download has completed, and then give an opportunity to open the download folder. At this point you may close the browser.

Using curl

curl is a download program that is very simple, very reliable, and can restart a partial download.

curl is available on Mac OS X by default, and can be installed on Linux or Microsoft Windows.

  • right-click on the link in your web browser, and select Copy Link Location (Firefox), or control-click on the link and select Copy Link (Safari),
  • start a Terminal, and then type
cd Downloads
  • then type
curl -OC -
  • press the space bar once more, to add a gap after the dash,
  • paste the link, so that the command looks like this:
curl -OC - http://something/
  • press enter, and the download will begin,
  • wait for the download to complete,
  • close the terminal.

To interrupt a download and resume it later, press Control/C. When you wish to resume, press up arrow once to recall the command, and then press enter to start it again. The download will resume from where you interrupted it.

Using wget

Start a Terminal, then type

wget --continue ${URL}

Where ${URL} is the link.

To interrupt a download and resume it later, press Control/C. When you wish to resume, press up arrow once to recall the command, and then press enter to start it again. The download will resume from where you interrupted it.

If the available space is too small, download directly to a USB drive; first insert the drive, then change directory to it, then use wget, like so:

cd /media/USB_DISK
wget --continue ${URL}

Using Browse

Browse is not recommended for large downloads, because:

However, if you wish to risk it:

  • click on a download link to start, and a download progress will be shown,
  • wait for the download to finish,
  • copy the file to a USB drive (see the Journal Copy-to option).

Verifying

For some downloads, the directory also contains an md5 file that can be used to check that your copy of the file is intact. If you have downloaded both filename and filename.md5, execute this command in the directory to which they were downloaded to check the integrity of filename.

md5sum -c filename.md5

If the md5 does not match, the file is corrupt, that is, part or all of the file contains wrong data. See Wrong Data below for how to fix.

Problems

Displayed instead of Downloaded

If you use the normal click, some web servers cause your web browser to display the file instead of download it.

You must bypass this using one of the methods above.

Takes Too Long

A download that takes too long is usually caused by:

  • your Internet service is too slow,
  • your Internet service is being shared with other people,
  • the file is far too large.

You should either keep waiting, or use one of the interrupt and resume methods above.

Running out of space

Running out of space will cause a download to be interrupted.

You must make more space available, by either deleting things, or by adding external storage.

Then you should either try the download again, or try to resume it using one of the methods above, such as wget or curl.

Interrupted

A faulty or irregular Internet service may cause a download to be interrupted.

You should either try the download again, or try to resume it using one of the methods above, such as wget or curl.

For Firefox, try the DownThemAll! extension.

Downloaded File is a Document

We use several unusual file types that are not known by your computer. This may cause your computer to use an icon for the file that represents a document. We can't fix this. This can be ignored. Proceed to use the file as instructed.

In Mac OS X for example, a .zd file is shown in Finder as a document. An .img file does not, since .img is a file type that is used for disk images.

Other operating systems may indicate that the file is a document.

Downloaded File has Wrong Name

Some methods of downloading may change the file name.

In particular, using Browse and the Journal will add .bin to the end of the file name. You must fix that by renaming the file. In GNOME right-click on the file and rename. Or in Terminal:

cd /media
cd 'USB DISK'
mv filename.zd4.bin filename.zd4

Wrong Data

This is where the length of the file matches exactly, but the md5sum does not.

The simplest way to fix wrong data is to download the file again, in the hope that whatever caused the wrong data won't happen a second time.

A more complex way is to use tools designed for recovering from the wrong data situation, such as rdiff or rsync, or manual division.

rsync

Most files that OLPC provide are not available via rsync without prior arrangement. If you face a long expensive download, please check to see if OLPC can provide the file via rsync. Then rsync is used with your existing file, and it checks what parts of the file are wrong, and downloads only those wrong parts. After it completes, the file will be correct.

If you have a remote shell account with high speed access, use that to download the file, then rsync from there.

A mirror of download.laptop.org is available via rsync at

rsync://mirror.aarnet.edu.au/pub/olpc/

rdiff

  • identify a correspondent who has a copy of the uncorrupted file,
  • use rdiff signature to create a file signature of your corrupted file,
  • send the file signature to your correspondent,
  • the correspondent is to use rdiff delta to generate a binary patch and send it back,
  • apply the patch using rdiff patch.

manual division

This method is suited to e-mail, and requires a correspondent who has a copy of the uncorrupted file.

  • both you and the correspondent are to split the file into a suitable number of pieces and generate an md5sum of each piece, and exchange the list of md5sums,
  • the md5sums are compared, identifying which parts of the file are corrupt,
  • for each corrupt part, the correspondent is to provide the file to you, by e-mail, or by download,
  • once all parts are present, you are to assemble the parts into the whole.

Example:

Your correspondent splits the uncorrupted file and sends you the checksums:

split --bytes 5315584 --numeric-suffixes --suffix-length=3 os883.img
md5sum x* > good.txt

You split the corrupted file and sends you the checksums:

split --bytes 5315584 --numeric-suffixes --suffix-length=3 os883.img.bad
md5sum x* > bad.txt

You or your correspondent can then compare the parts:

diff bad.txt good.txt

Assume at this point that only the file x030 is corrupt. You would then remove that file.

rm x030

And wait for it to be provided by the correspondent.

Then assemble the parts into the whole:

cat x??? > os883.img

And check the md5sum again.