dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Clone a disk to a zipped image file

  1. #1
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,964

    Clone a disk to a zipped image file

    I am having a bit of a problem with backing up a drive that has a bad sector, I need an image of the whole drive so that if anything goes wrong with the repair, I can return the drive to its original damaged state and try again to repair with another disk tool.

    I am currently running Ubuntu on the damaged machine from an SD Card so the drives are not mounted, only the target drive is mounted.

    Something odd with the resulting image, when I view it, the 51 GB image file has a file inside thats 3.9 GB in size.

    I issued a
    Code:
    dd if=/dev/sda | gzip -c > /media/mountpoint/externalUSBdrive/ssd.img.gz
    which resulted in the PC being occupied for 10 hours, my PC is a bit odd in itself, windows report its quad core, box says dual core, so I can't say for sure what it is but 10 hours to compress a drive image of 64GB when copying the accessible files of some 40+ Gigs too about 45 minutes, say that something wasn't right.

    Any thoughts?
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,964
    Well despite examples like I posted in my previous comment, I have since learned thet you SHOULD NEVER produce a disk image using gzip ir zip or any of the compression methods.

    What you are supposed to do is first off creat a bit for bit copy of the drive and this is achieved by issuing the following commands

    user@ubuntu:~$ sudo dd if=/dev/sda of="/media/mountpoint/externalUSBdrive/ssd.img"
    [sudo] password for user:<password>

    Then record the drive geometary with:

    user@ubuntu:~$ sudo fdisk -l /dev/sda > "/media/mountpoint/externalUSBdrive/list_fdisk.info"

    This will then create a file names ssd.img on the target device via its mount reference. It will take about 9 hours on a 64GiB drive, assuming that the system is like my nettop which is an Intel dual core 32 bit PC @ (1.6Ghz per CPU) or 3.2Ghz total bridged as a 32bit or 3Ghz as a 64 bit system and 2GiB RAM.

    A few things that need to be remembered is the source device /dev/sda will need to have an unmount commant issued or unmounted in the GUI program 'disks' the user will need to for safe operation if they are trying to copy the boot drive,MUST run a Live CD / USB.

    My intention is simply to have a copy of the drive in its damaged state to restore the image if the repair on the original drive doesn't go well and I am looking at binary spaghetti.

    Its been a long drawn out ordeal to get an answer out of askubuntu.com, too many anal moderators blocking users and rejecting questions and claiming that questions are or mark questions as duplicates... when they are not, this being because the first question asked or questions read to get an answer don't answer the problem thats being faced.

    All someone had to do in one of my questions was to say I needed to quote a path that has spaces in it, it took aboiut 5 questions to actually get to the bottom of the problem despite stating the error messages, all mods could do is mark the question as duplicate. The other problem with askubuntu is that the posts on there are only live, at most for a few hours before the question is swamped by other questions by other users.

    Finally, if anyone is thinking of running Ubuntu 14.10 as an install, my advice is don't Unity desktop is annoying, not helpful and you have no idea of what is installed unless it is pinned to the Unity side bar, complete pointless *&^%*%$ (that was me BTW and not a filter) and very few programs or hardware works that is bundled, fact that they bundled 500MB of programs that need a further 336 MB of libraries (dependencies) to make the software work.

    I have been informed that Linux Mint with MATE is what I am looking for, a friendlier uncluttered and faster distro as Unity dashboard as far as I understand required allot of processing and judging by the sound of my cooling fans, sounds like my CPU's are running flat out under Ubuntu 14.10 with Untiy.
    Last edited by \\.\; 03-04-2015 at 04:49 PM.
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,964
    Well this week I am dropping Ubuntu for the pile of pants it has become, after trying Linux MINT, I can understand why it has jumpt to the No.1 desktop and out numbers all the other distros put together.

    I got a copy of Mint with MATE desk top, very clean, very very fast, I couldn't believe that even running it from a Live CD running the same Debain base so I could compare with Ubuntu, sorry guys at Ubunty, you really really do need to dump Unity desktop, it is a real resource hog and I am surprised that my Quad core PC keeps on stalling and I keep on getting Grey screens.

    Unity IMHO is going to bring about Ubuntu's demise.
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles