The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

How to grab an image of a HDD in Linux? by romandas2004-12-30 15:05:46
  dd should do the job nicely... by Bellator2004-12-30 15:08:29
    That's what I was thinking.. by romandas2004-12-30 15:11:35
      invoke man dd :) by Tars_Tarkas 2004-12-30 15:16:27
suppose /dev/hda is the device for your harddrive, and you want the image in /var/tmp/hda.img do:

#>dd if="/dev/hda" of="hda.img" bs=512

if -> input file
of -> output file
bs -> blocksize in byte (I think 512 is the standard harddisk blocksize).
You could, I guess, leave out the bs=512. There's also another parameter "count" which says how many blocks of size "bs" you want to copy.

#>dd if=/dev/hda of=/var/tmp/hda.1st bs=512 count=1 would copy the first block of that drive to a file. Useful for storing the partition table and such as backup.

Just don't confuse if and of, that would be pretty desasterous.
--
Tars Tarkas, Holder of Opinions and Views, Giver of no guarantees.
[ Reply ]
        compressed... by tangentblade2004-12-30 15:50:16
          Yea, better in fact, since you avoid by Tars_Tarkas2004-12-30 16:05:13
            Of course, if you leave out the whole "| bzip2 - by bwkaz2004-12-30 16:18:58
              Which is always fun. by LionsPhil2004-12-30 16:27:19
                I accidently did somethig like that once... by Tars_Tarkas2004-12-30 16:36:07

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)