Gentoo Archives: gentoo-user

From: Manuel Klemenz <m.klemenz@×××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Fast checksumming of whole partitions
Date: Sat, 05 Jun 2010 20:12:51
Message-Id: 201006052211.59256.m.klemenz@gmx.at
In Reply to: Re: [gentoo-user] Re: Fast checksumming of whole partitions by meino.cramer@gmx.de
1 I'm calculating checksums over partitions just by calling
2 # md5sum /dev/sda1
3 or for the complete disk (incl. partition table + all partitions)
4 # md5sum /dev/sda
5
6 that's it :) - works with any distro/liveDVD
7
8 --
9 Cheers,
10 Manuel Klemenz
11
12 On Saturday 05 June 2010 21:23:31 meino.cramer@×××.de wrote:
13 > 7v5w7go9ub0o <7v5w7go9ub0o@×××××.com> [10-06-05 20:22]:
14 > > On 06/05/10 02:39, meino.cramer@×××.de wrote:
15 > > []
16 > >
17 > > > Is there any faster and reliable way to checksum whole paritions (not
18 > > > on "per file" base)???
19 > >
20 > > FWIW, portage has a tool called "dcfldd" that works well for me. It is
21 > >
22 > > dd with the addition of:
23 > > * Hashing on-the-fly - dcfldd can hash the input data as it is
24 > >
25 > > being transferred, helping to ensure data integrity.
26 > >
27 > > * Status output - dcfldd can update the user of its progress in
28 > >
29 > > terms of the amount of data transferred and how much longer operation
30 > > will take.
31 > >
32 > > * Flexible disk wipes - dcfldd can be used to wipe disks quickly
33 > > and
34 > >
35 > > with a known pattern if desired.
36 > >
37 > > * Image/wipe Verify - dcfldd can verify that a target drive is a
38 > >
39 > > bit-for-bit match of the specified input file or pattern.
40 > >
41 > > * Multiple outputs - dcfldd can output to multiple files or disks
42 > > at
43 > >
44 > > the same time.
45 > >
46 > > * Split output - dcfldd can split output to multiple files with
47 > > more
48 > >
49 > > configurability than the split command.
50 > >
51 > > * Piped output and logs - dcfldd can send all its log data and
52 > >
53 > > output to commands as well as files natively.
54 > >
55 > >
56 > > e.g. when I copy my HD, I get a copy status report and hash by using the
57 > > following commands:
58 > >
59 > > #!/bin/bash
60 > > dcfldd if=/dev/sda bs=4096k sizeprobe=if status=on hashwindow=0
61 > > of=/dev/sdb dcfldd if=/dev/sdb bs=4096k sizeprobe=if status=on
62 > > hashwindow=0 of=/dev/null
63 > >
64 > > When they've completed, I'll visually compare the two hashes (you can
65 > > automate this.) You can get fancier and do the Verify instead of the
66 > > hashes.
67 > >
68 > > HTH
69 > >
70 > > (p.s. Part of your answer is setting the best blocksize for dd or
71 > > dcfldd.
72 > >
73 > > I'd presume it the smaller of your available memory, or the buffer size
74 > > on your HD?...... someone please correct me on this!?)
75 >
76 > That looks really interesting. The only problem I have with this is
77 > that I have to have /dev/sda as /dev/sdb idle (not mounted) and
78 > because of that I use knoppix as temporary system to boot. And I
79 > dont think that knoppix has this tool "on board".
80 >
81 > Or is there a way to do such copies from a one disk to another
82 > while one disk is booted???
83 >
84 > Best regards,
85 > mcc

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-user] Re: Fast checksumming of whole partitions 7v5w7go9ub0o <7v5w7go9ub0o@×××××.com>