特殊:Badtitle/NS100:VerifyIsoHowto:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/VerifyIsoHowto}} {{Languages|UbuntuHelp:VerifyIsoHowto}} The steps are * Download `MD5SUMS` and `MD5SUMS.gpg` * Get the key used for the signatur...
 
Wikibot留言 | 贡献
无编辑摘要
第2行: 第2行:
{{Languages|UbuntuHelp:VerifyIsoHowto}}
{{Languages|UbuntuHelp:VerifyIsoHowto}}
The steps are
The steps are
 
# Download `MD5SUMS` and `MD5SUMS.gpg`
* Download `MD5SUMS` and `MD5SUMS.gpg`
# Get the key used for the signature
* Get the key used for the signature
# Verify the signature
* Verify the signature
# Check the ISO with `md5sum`
* Check the ISO with `md5sum`
 
== Download MD5SUMS and MD5SUMS.gpg ==
== Download MD5SUMS and MD5SUMS.gpg ==
Just download the two files from any of the mirrors. Store them in the same
Just download the two files from any of the mirrors. Store them in the same
directory.
directory.
== Get the key ==
== Get the key ==
By running GnuPG to verify the signature we can find out what key is needed:
By running GnuPG to verify the signature we can find out what key is needed:
<pre><nowiki>
<pre><nowiki>
$ gpg --verify MD5SUMS.gpg MD5SUMS
$ gpg --verify MD5SUMS.gpg MD5SUMS
第22行: 第16行:
gpg: Can't check signature: public key not found
gpg: Can't check signature: public key not found
</nowiki></pre>
</nowiki></pre>
The key ID is `0xFBB75451`.
The key ID is `0xFBB75451`.
The easiest way is to configure GnuPG to use a keyserver. Any of the ones
The easiest way is to configure GnuPG to use a keyserver. Any of the ones
listed in the default configuration should do it. (`hkp://subkeys.pgp.net`
listed in the default configuration should do it. (`hkp://subkeys.pgp.net`
works just fine.) Add it to your keyring:
works just fine.) Add it to your keyring:
<pre><nowiki>
<pre><nowiki>
$ gpg --recv-keys 0xFBB75451
$ gpg --recv-keys 0xFBB75451
第35行: 第26行:
gpg:              imported: 1
gpg:              imported: 1
</nowiki></pre>
</nowiki></pre>
== Verify signature ==
== Verify signature ==
Now when you verify the `MD5SUMS` file you'll get a result resembling this:
Now when you verify the `MD5SUMS` file you'll get a result resembling this:
<pre><nowiki>
<pre><nowiki>
$ gpg --verify MD5SUMS.gpg MD5SUMS
$ gpg --verify MD5SUMS.gpg MD5SUMS
第49行: 第37行:
Primary key fingerprint: C598 6B4F 1257 FFA8 6632  CBA7 4618 1433 FBB7 5451
Primary key fingerprint: C598 6B4F 1257 FFA8 6632  CBA7 4618 1433 FBB7 5451
</nowiki></pre>
</nowiki></pre>
(You might want to increase your own trust in the key you just downloaded.
(You might want to increase your own trust in the key you just downloaded.
That is something for another page though.)
That is something for another page though.)
== Check the ISO ==
== Check the ISO ==
The file `MD5SUMS` contains MD5 hashes of the ISO images. Run `md5sum` on the
The file `MD5SUMS` contains MD5 hashes of the ISO images. Run `md5sum` on the
ISO and compare the result with the relevant line in `MD5SUMS`.
ISO and compare the result with the relevant line in `MD5SUMS`.
<pre><nowiki>
<pre><nowiki>
$ md5sum ubuntu-5.04-dvd-i386.iso
$ md5sum ubuntu-5.04-dvd-i386.iso
765dc370887735af71bc2cf6fcc9fafd  ubuntu-5.04-dvd-i386.iso
765dc370887735af71bc2cf6fcc9fafd  ubuntu-5.04-dvd-i386.iso
</nowiki></pre>
</nowiki></pre>
Check again after burning since growisofs adds extra blank bytes increasing file size from 3048179712 (0xB5AF8800) to 3048210432 (0xB5B00000) bytes
Check again after burning since growisofs adds extra blank bytes increasing file size from 3048179712 (0xB5AF8800) to 3048210432 (0xB5B00000) bytes
<pre><nowiki>
<pre><nowiki>
$ md5sum ubuntu-5.10-dvd-i386.iso
$ md5sum ubuntu-5.10-dvd-i386.iso
e41c0631f6f2c138a417b59bcb880fce
e41c0631f6f2c138a417b59bcb880fce
$ wc -c ubuntu-5.10-dvd-i386.iso
$ wc -c ubuntu-5.10-dvd-i386.iso
3048179712
3048179712
$ dd if=/dev/dvdwriter | head -c 3048179712 | md5sum
$ dd if=/dev/dvdwriter | head -c 3048179712 | md5sum
e41c0631f6f2c138a417b59bcb880fce
e41c0631f6f2c138a417b59bcb880fce
$
$
</nowiki></pre>
</nowiki></pre>
You can also check a disc while you are booting from it.  This is useful for testing that your target hardware can properly read all of the disc.
You can also check a disc while you are booting from it.  This is useful for testing that your target hardware can properly read all of the disc.
Divide the image size in bytes by 512 to get the size in blocks.  Boot from the disc, and when the installer has reached the disk partitioning stage, switch to a shell (alt-2) and run the following command, adding the size of the ISO image in blocks as the argument "count".
Divide the image size in bytes by 512 to get the size in blocks.  Boot from the disc, and when the installer has reached the disk partitioning stage, switch to a shell (alt-2) and run the following command, adding the size of the ISO image in blocks as the argument "count".
<pre><nowiki>
<pre><nowiki>
$ dd if=/dev/cdroms/cdrom0 count=5953476 | md5sum
$ dd if=/dev/cdroms/cdrom0 count=5953476 | md5sum
e41c0631f6f2c138a417b59bcb880fce
e41c0631f6f2c138a417b59bcb880fce
</nowiki></pre>
</nowiki></pre>
'''Other Languages:'''
'''Other Languages:'''
* Spanish (Español): ComoVerificarIso
* Spanish (Español): ComoVerificarIso

2007年11月30日 (五) 22:05的版本

{{#ifexist: :VerifyIsoHowto/zh | | {{#ifexist: VerifyIsoHowto/zh | | {{#ifeq: {{#titleparts:VerifyIsoHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:VerifyIsoHowto|1|-1|}} | zh | | }}

The steps are

  1. Download `MD5SUMS` and `MD5SUMS.gpg`
  2. Get the key used for the signature
  3. Verify the signature
  4. Check the ISO with `md5sum`

Download MD5SUMS and MD5SUMS.gpg

Just download the two files from any of the mirrors. Store them in the same directory.

Get the key

By running GnuPG to verify the signature we can find out what key is needed:

$ gpg --verify MD5SUMS.gpg MD5SUMS
gpg: Signature made Thu 12 May 2005 12:41:32 BST using DSA key ID FBB75451
gpg: Can't check signature: public key not found

The key ID is `0xFBB75451`. The easiest way is to configure GnuPG to use a keyserver. Any of the ones listed in the default configuration should do it. (`hkp://subkeys.pgp.net` works just fine.) Add it to your keyring:

$ gpg --recv-keys 0xFBB75451
gpg: key FBB75451: public key "Ubuntu CD Image Automatic Signing Key <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Verify signature

Now when you verify the `MD5SUMS` file you'll get a result resembling this:

$ gpg --verify MD5SUMS.gpg MD5SUMS
magnus@die[~/dload].$ gpg --verify MD5SUMS.gpg MD5SUMS
gpg: Signature made Thu 12 May 2005 12:41:32 BST using DSA key ID FBB75451
gpg: Good signature from "Ubuntu CD Image Automatic Signing Key <[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: C598 6B4F 1257 FFA8 6632  CBA7 4618 1433 FBB7 5451

(You might want to increase your own trust in the key you just downloaded. That is something for another page though.)

Check the ISO

The file `MD5SUMS` contains MD5 hashes of the ISO images. Run `md5sum` on the ISO and compare the result with the relevant line in `MD5SUMS`.

$ md5sum ubuntu-5.04-dvd-i386.iso
765dc370887735af71bc2cf6fcc9fafd  ubuntu-5.04-dvd-i386.iso

Check again after burning since growisofs adds extra blank bytes increasing file size from 3048179712 (0xB5AF8800) to 3048210432 (0xB5B00000) bytes

$ md5sum ubuntu-5.10-dvd-i386.iso
e41c0631f6f2c138a417b59bcb880fce
$ wc -c ubuntu-5.10-dvd-i386.iso
3048179712
$ dd if=/dev/dvdwriter | head -c 3048179712 | md5sum
e41c0631f6f2c138a417b59bcb880fce
$

You can also check a disc while you are booting from it. This is useful for testing that your target hardware can properly read all of the disc. Divide the image size in bytes by 512 to get the size in blocks. Boot from the disc, and when the installer has reached the disk partitioning stage, switch to a shell (alt-2) and run the following command, adding the size of the ISO image in blocks as the argument "count".

$ dd if=/dev/cdroms/cdrom0 count=5953476 | md5sum
e41c0631f6f2c138a417b59bcb880fce

Other Languages:

  • Spanish (Español): ComoVerificarIso