Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: DD Image - What does NOT get copied?

  1. #11
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: DD Image - What does NOT get copied?

    The issue may not be dd, but UEFI.
    But with gpt, you should only image the entire drive as gpt has GUID in both partition and both main & backup partition tables. If they get out of sync it can cause issues, but may be repairable with sgdisk.

    But UEFI forgets NVRAM issues if a drive is disconnected.
    So if you boot with blank drive or remove ESP - efi system partition, or install another system, it may forget old entries and use a new default in boot order. And many UEFI seem to always find the Windows entry and make it first in boot order.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  2. #12
    Join Date
    Apr 2009
    Location
    UK Lake District
    Beans
    3,093
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: DD Image - What does NOT get copied?

    Quote Originally Posted by Alan5127 View Post
    Hi Carl,

    Given you are using ionice, am I correct in thinking that you are running this while the machine is in use, or am I misunderstanding that?

    I always tend to image my machine from a boot cd, and image the entire disk to an external USB HDD.

    I use:

    dd if=/dev/sda conv=sync,noerror bs=64K of=/media/...../sda.img


    What do you see as the advantages (and disadvatages) of ddrescue over dd?


    Thanks,

    Alan.
    Not in use
    Running Parted Magic live from RAM
    Ubuntu 18.04

  3. #13
    Join Date
    Apr 2009
    Location
    UK Lake District
    Beans
    3,093
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: DD Image - What does NOT get copied?

    Quote Originally Posted by 4kh3RAm View Post
    When you mentioned "restoring an image" it got me thinking.

    How does it differ from doing a disk image ?

    Does it make an exact copy letting you revert to a previous state ?
    It's an exact copy of sda
    The entire HDD

    Once restored, everything works as it did with the original
    Ubuntu 18.04

  4. #14
    Join Date
    Apr 2011
    Beans
    133
    Distro
    Ubuntu

    Re: DD Image - What does NOT get copied?

    Hi Carl,

    Quote Originally Posted by carl4926 View Post
    Not in use
    Running Parted Magic live from RAM
    In that case, what is the benefit of running ionice, and would those benefits also apply to running dd (rather than ddrescue)?

    Thanks,

    Alan.

  5. #15
    Join Date
    Apr 2011
    Beans
    133
    Distro
    Ubuntu

    Re: DD Image - What does NOT get copied?

    Quote Originally Posted by carl4926 View Post
    It's an exact copy of sda
    The entire HDD

    Once restored, everything works as it did with the original

    Which has always been my experience with dd too over the last fifteen years or so. This scenario was the first time it ever 'failed' (and the failure was not catastrophic, just interesting).

    I am guessing that ddrescue (wrapped in ionice or not) would have exhibited the same issue probably, as it appears to be doing the same thing as dd under the hood?

    Alan.

  6. #16
    Join Date
    Jul 2013
    Beans
    251

    Re: DD Image - What does NOT get copied?

    Quote Originally Posted by carl4926 View Post
    It's an exact copy of sda
    The entire HDD

    Once restored, everything works as it did with the original
    Thanks.
    Thanks,
    Andy

    O.S. ubuntu-mate-16.04-desktop-amd64

  7. #17
    Join Date
    Apr 2011
    Beans
    133
    Distro
    Ubuntu

    Re: DD Image - What does NOT get copied?

    Hi oldfred,

    Quote Originally Posted by oldfred View Post
    The issue may not be dd, but UEFI.
    But with gpt, you should only image the entire drive as gpt has GUID in both partition and both main & backup partition tables. If they get out of sync it can cause issues, but may be repairable with sgdisk.

    But UEFI forgets NVRAM issues if a drive is disconnected.
    So if you boot with blank drive or remove ESP - efi system partition, or install another system, it may forget old entries and use a new default in boot order. And many UEFI seem to always find the Windows entry and make it first in boot order.
    I always image the whole HDD, but your post made me wonder, so I imaged the whole drive, then the four individual partitions that appear to relate to Win10 (Recovery Partition, EFI System Partition, another Recovery Partition, and the main Primary Windows partition - the 'C' drive if you like). I'm not sure why there are two recovery partitions - one is only 350MB, the other is 5GB, but I did them anyway using:

    dd if=/dev/sdaX conv=sync,noerror bs=64K of=/media/..../sdaX.img

    For what its worth, I did not backup the Ubuntu partitions, nor the data partition (except in the whole disk image which was my real backup!)

    I then opened up Win10 and did some stuff (so that things have now changed including adding a simple txt file to the desktop as a marker), and then restored each of those four partitions individually.

    It worked perfectly as expected with no issues, and the Grub boot menu offered me both Ubuntu and Win10 as normal.

    So, for what it's worth, for my specific setup here and now, dd seems to be fine backing up individual partitions, and can restore them, but noting that there were no changes to the disk 'structure' in between, even though it is GPT and using UEFI.


    Alan.

  8. #18
    Join Date
    Apr 2009
    Location
    UK Lake District
    Beans
    3,093
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: DD Image - What does NOT get copied?

    My use of ddrescue and ionice is simply down to best practice as a result of experience
    A simple dd may work fine
    However, since it may take the best part of a day to image a HDD and often I do it on behalf of a customer.
    I prefer to do it once
    Ubuntu 18.04

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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