Results 1 to 8 of 8

Thread: How do I backup/restore XP using Knoppix?

Hybrid View

  1. #1
    Senior Member registered user
    Join Date
    Mar 2004
    Posts
    1,516
    dd will "create" te filesystems and partitions... if you clone the whole disk. if disk fail you need a new disk with same sector, cylinder and head count and preferably same exact size to make a bootable cloned system.

    the
    Code:
    dd /dev/hda2 of=/dev/sda1
    will require the two disks to be equal size and geometry that is same number of sectors, heads, cylinders... to work or there will be trouble somewhere, also just cloning one partition is near pointless as you will loose partitiontable and bootloader... making any files unreadable anyway, you can only do this safley if you make an IMAGE (one single file).

    if you really MUST use ntfs you could always do the
    Code:
    sudo dd if=/dev/hda of=/mnt/sda1/XP-backup2011-01-23.img
    to a linux partition of the extra hdd and then using the tools available to see linux partitions from windows copy the file created to a NTFS partition, doing a dd FROM a ntfs partition should work.

    just so you know this, that would still NOT allow you to ADD anything, that can not easily be done safely to a cloned XP+ntfs system, not even if it was seen as a valid partition by windows I would do it, this because XP and NTFS has some very nasty tricks up their sleeve for things like this to go wrong, to name on the timestamps of the files will not match which may make windows crash even before full boot.
    on the other hand I think I have something like 10 gzip'ed clones of my fathers computer on the backup disk I use to backup for him...

  2. #2
    OErjan:
    Thanks for your information again. I understand everything you say. I now have a 250GB USB drive and it IS the same 'geometry' as the main HD (255 heads, 64 sectors/track) but I think this is a 'virtual geometry' and not real.

    I have partitioned the USB drive with two partitions (sda1, sda2) which are exactly the same sector-size as the hda2 (the C: drive where Windows XP is located) and another 32GB FAT2 partition. Below is the output of the fdisk -l -u command:
    ++
    Disk /dev/sda: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Device Boot Start End Blocks Id System
    /dev/sda1 63 111266252 55633095 7 HPFS/NTFS
    /dev/sda2 111266253 222532442 55633095 7 HPFS/NTFS
    /dev/sda3 222532443 288061514 32764536 c W95 FAT32 (LBA)

    Disk /dev/hda: 60.0 GB, 60011642880 bytes
    255 heads, 63 sectors/track, 7296 cylinders, total 117210240 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Device Boot Start End Blocks Id System
    /dev/hda1 63 160649 80293+ de Dell Utility
    /dev/hda2 * 160650 111426839 55633095 7 HPFS/NTFS
    /dev/hda3 111426840 117194174 2883667+ db CP/M
    /dev/hda4 117194175 117210239 8032+ 83 Linux
    ++
    I did this partitioning with fdisk itself so that I could be certain that the sizes were exact - the partition tool in XP will only partition in integer multiples of 1MB. On hda I saw that the NTFS partition starts on a cylinder boundary but I didn't do this on sda, just start the first partition on sector 63 as usual. Windows seems to be happy about this. I formatted sda1, sda2 and sda3 in Windows and I can work with all partitions in both operating systems (but the NTFS partitions are read-only in Knoppix of course).

    Next job was to execute "dd if=/dev/hda2 of=/dev/sda1" but I found a problem - it's very slow (139kB/sec). The backup and restore operations will take more than 4 days at this speed! I checked a few other dd commands like "dd if=/dev/zero of=/dev/sda1" (fill sda1 with zeros) and that is also the same slow speed; "dd if=/dev/hda2 of=/dev/null" (read hda2 only) is 32MB/sec so that's OK. In Windows XP the transfer rate from the HD to the USB is 4MB/sec but that is copying a folder as files so maybe it could be faster for a single unfragmented file. But 4MB/sec would be acceptable for my purpose (~4 hours).

    So I have some work to do, to find why Knoppix is so slow. Maybe I experiment with the bs= parameter. Maybe Knoppix is driving my USB port in USB 1.0 mode. Maybe someone else reading this can help me with this?

    I don't think I will get into trouble with the NTFS filesystem inside sda1. Windows will only need to read/write inside the NTFS filing system on hda2. For the backup operation Knoppix will ONLY read hda2 and write sda1 as a single device. For the restore operation Knoppix will read sda1 and write hda2 as a single device. There will be no need for Windows or Knoppix to write to the NTFS filesystem in sda1. I could make it read-only. I think it will be OK for Windows to read files from the NTFS filesystem on sda1 if I need to do it. Knoppix could read files from sda1 but there will be no need for this for the backup/restore job.

    I think it will be easy to backup/restore the MBR/partitiontable on hda with ..
    dd if=/dev/hda of=/.../mbr.dat bs=512 count=1
    dd if=/.../mbr.dat of=/dev/hda

    Similarly for the other partitions on hda if I ever need them again, but they can be restored in other ways.

    Peter

  3. #3
    For the information of anyone else reading this, I did get the above idea working. But because there were some bad sectors on the HD, the 'dd' command failed on these and corrupted the filing system. Using 'dd_rescue' instead was OK although rather slower - it switches from 65536 byte blocks to 512-byte blocks when it sees the first bad sector but unfortunately then stays with 512 byte blocks for the rest of the copy.

    Copying to the backup partition rather than to an image file makes it easy to verify the backup is correct and easy to restore individual files from inside Windows. I have not yet needed to do a complete restore, but the plan would be to do that just by reversing the dd command from the Knoppix CD, after restoring the MBR/partition-table by hand.

    Peter

Posting Permissions

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


HP ProLiant MicroServer Gen8 G8 G2020T 8GB RAM 4x 1TB HDD 4x 3.5

HP ProLiant MicroServer Gen8 G8 G2020T 8GB RAM 4x 1TB HDD 4x 3.5" 712318-421

$269.99



Supermicro 1U Server X9DRW-3LN4F+ 2x E5-2680 2.7ghz / 128gb / 8xTrays / 2x 700w picture

Supermicro 1U Server X9DRW-3LN4F+ 2x E5-2680 2.7ghz / 128gb / 8xTrays / 2x 700w

$229.99



1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports picture

1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports

$149.00



1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE picture

1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE

$273.00



HP ProLiant MicroServer Gen8 | Intel XEON E3-1220L V2 | 8GB RAM | NO HDD | 4 BAY picture

HP ProLiant MicroServer Gen8 | Intel XEON E3-1220L V2 | 8GB RAM | NO HDD | 4 BAY

$249.99



SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture

SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount

$202.49



DATTO-1000 Mini PC Micro Server 8GB RAM picture

DATTO-1000 Mini PC Micro Server 8GB RAM

$67.48



HP HPE Microserver Gen 7 8 9 iLO 2/3/4/5Advanced License Lifetime Key| FAST SHIP picture

HP HPE Microserver Gen 7 8 9 iLO 2/3/4/5Advanced License Lifetime Key| FAST SHIP

$10.00



2U 12 Bay SAS3 SuperMicro Server 6028U-TR4T+ W/ X10DRU-i+ Barebone 12 Caddy RAIL picture

2U 12 Bay SAS3 SuperMicro Server 6028U-TR4T+ W/ X10DRU-i+ Barebone 12 Caddy RAIL

$299.00



1U 20

1U 20" Short Depth Server Firewall PFSense X11SSH-F Xeon 3.5Ghz 32GB RAM NVME

$247.00