dd - OS partitions backup & restore

Discussion in 'macOS' started by d3nn16, Dec 21, 2010.

  1. d3nn16

    d3nn16 MDL Novice

    Dec 21, 2010
    1
    0
    0
    Hi,

    I want to be able to do some advanced backups and restores with dd tool (other products don't interest me unless I have a proof it is impossible to do it with dd). Therefore I am trying to find out if I can use dd to do 2 things :

    1) backup and restore a partition to the same location (same partition specs present in MBR). After some googling I found out this works fine, but didn't test it yet.

    For example I start a Fedora 13 Live CD and use the dd tool to backup in 2 files the 2 Windows 7 partitions: System Reserved and Windows OS partition. To test it, I will delete filesystems on the 2 partitions and then restore them with dd, and check if it's OK.

    2) backup a partition and restore it on another partition (different specs in MBR for the 2 partitions, the restore partition being at least the exact size as the backup partition), partitions being on different disks or on the same disk.

    I couldn't find in Google similar attempts, so here I am posting in this forum (to begin with).


    For point 2) I tried a test that resulted in "A disk read error occurred Press Ctrl + Alt + Del to restart". For this test, I used partitions holding Windows stuff (boot files and OS files).

    2 disks configuration (setup before test):
    - WD Caviar Blue 320GB
    ---- active NTFS primary partition : System Reserved ~120MB
    ---- NTFS primary partition : Windows OS ~20GB
    ---- NTFS primary partition : data partition ~290GB
    - Seagate Barracuda 500GB
    ---- active ext4 primary partition : grub boot partition ~1GB
    ---- LVM primary partition : Fedora 13 partition ~15GB
    ---- free space : ~100GB
    ---- ext2 primary partition : data partition ~350GB

    BIOS first boot disk is Barracuda, active partition is grub boot partition, in GRUB menu I can boot Fedora and bootstrap the Caviar MBR which starts Windows 7, System Reserved is the active partition on this disk.

    The test consists in copying the 2 Windows partitions from Caviar to Barracuda, setting BIOS to boot Barracuda first, and making the System Reserved partition that I just copied into Barracuda active. Also I used the Windows 7 install CD to fix the MBR on Barracuda to be Windows 7 compatible (bootsect /nt60 I: /mbr, I: being new System Reserved partition letter under Windows Recovery System).

    2 disks configuration (setup for test):
    - WD Caviar Blue 320GB
    ---- active NTFS primary partition : System Reserved ~120MB
    ---- NTFS primary partition : Windows OS ~20GB
    ---- NTFS primary partition : data partition ~290GB
    - Seagate Barracuda 500GB
    ---- active ext4 primary partition : grub boot partition ~1GB
    ---- LVM primary partition : Fedora 13 partition ~15GB
    ---- active NTFS primary partition : System Reserved ~200MB
    ---- NTFS primary partition : Windows OS ~30GB
    ---- free space : ~450GB

    When booting I get the "A disk read error occurred Press Ctrl + Alt + Del to restart". The Ctrl + Alt + Del combo doesn't work and I have to press the power button to shut down the PC.

    Does anyone have an idea why do I have this error ?

    NB: the 2 Windows partitions I copied from Caviar to Barracuda seem to work since I could list the files in both from Fedora 13 Live and could create 2 files to identify the new partitions in the Windows Recovery System.

    Another question related to this test is : Does the NTFS filesystem make use of absolute disk sector references which could explain the error message ? Does such a filesystem exist ? According to this document www . win . tue . nl/~aeb/linux/vfs/trail-3.html the block / sector conversion seems to be done at a level lower than the filesystem type dependent code in the Linux kernel, also hard coded sector references in filesystems don't make sense. What about Windows kernel ?

    Thanks