dd/dcfl with compression and splitting

2006-09-02
2013-04-26
  • Sylvie Migneault

    Hi Steve,

    I give you a suggest for the next release of AIR:
        «dd/dcfldd with compression and splitting»

    EXAMPLES:

    1) dd/gzip/split

        a) Making image:

        # dd if=/dev/hda | gzip -c | split -b 2000 - /mnt/hdc1/image.dd.gz.

        The -c option switch is used to output the result to stdout
        The -b 2000m switch tells split how big to make the individual files
        The - option tells split to read from stdin
        Split will create files named image.dd.gz.aa, image.dd.gz.ab, image.dd.gz.ac, etc...

        b) Restoring the multi-file image on hard disk:

        # cat /mnt/hdc1/image.dd.gz.* | gzip -dc | dd of=/dev/hda

        c) For decompression of multi-file image:

        # cat /mnt/hdc1/image.dd.gz.* | gzip -dc | dd of=/mnt/hdc1/image.dd

    2) dd/bzip2/split

        Same at gzip

        a) Making image:

        # dd if=/dev/hda | bzip2 -c | split -b 2000 - /mnt/hdc1/image.dd.bz2.

        The -c option switch is used to output the result to stdout
        The -b 2000m switch tells split how big to make the individual files
        The - option tells split to read from stdin
        Split will create files named image.dd.bz2.aa, image.dd.bz2.ab, image.dd.bz2.ac, etc...

        b) Restoring the multi-file image on hard disk:

        # cat /mnt/hdc1/image.dd.bz2.* | bzip2 -dc | dd of=/dev/hda

        c) For decompression of multi-file image:

        # cat /mnt/hdc1/image.dd.bz2.* | bzip2 -dc | dd of=/mnt/hdc1/image.dd

    3) dcfldd/gzip/split

        a) Making image:

        # dcfldd if=/dev/hda | gzip -c | split -b 2000m - /mnt/hdc1/image.dcfl.gz.

        The -c option switch is used to output the result to stdout
        The split linux command is use, not the split option under dcfldd
        The -b 2000m switch tells split how big to make the individual files       
        The - option tells split to read from stdin
        Split will create files named image.dcfl.gz.aa, image.dcfl.gz.ab, image.dcfl.gz.ac, etc...

        b) Restoring the multi-file image on hard disk:

        # cat /mnt/hdc1/image.dcfl.gz.* | gzip -dc | dcfldd of=/dev/hda

        c) For decompression of multi-file image:

        # cat /mnt/hdc1/image.dcfl.gz.* | gzip -dc | dcfldd of=/mnt/hdc1/image.dcfl   

    4) dcfldd/bzip2/split

        Same at gzip

        a) Making image:

        # dcfldd if=/dev/hda | bzip2 -c | split -b 2000 - /mnt/hdc1/image.dcfl.bz2.

        The -c option switch is used to output the result to stdout
        The split linux command is use, not the split option under dcfldd
        The -b 2000m switch tells split how big to make the individual files       
        The - option tells split to read from stdin
        Split will create files named image.dcfl.gz.aa, image.dcfl.gz.ab, image.dcfl.gz.ac, etc...

        b) Restoring the multi-file image on hard disk:

        # cat /mnt/hdc1/image.dcfl.bz2.* | bzip2 -dc | dcfldd of=/dev/hda

        c) For decompression of multi-file image:

        # cat /mnt/hdc1/image.dcfl.bz2.* | bzip2 -dc | dcfldd of=/mnt/hdc1/image.dcfl

    NOTE:

    I have tested all this examples. It's OK.

    REFERENCES:

    http://wiki.linuxquestions.org/wiki/Dd#Getting_around_file_size_limitations_using_split

     
    • Nobody/Anonymous

      Don't forget to add verification to the process. Without verification (matching hashes) you won't know if the images match.

       
    • Nobody/Anonymous

      Hi,

      Verify with dd/dclfdd:

      md5sum /dev/hda | bar
      cat image* | gzip -dc | bar | md5sum
      cat image* | bzip2 -dc | bar | md5sum

      link for bar utility: http://clpbar.sourceforge.net

      alisou

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks