VOGONS


First post, by ShortstopGFX

User metadata
Rank Newbie
Rank
Newbie

Hey there,

A friend of mine setup a Windows 98 / XP rig last year and I was wondering:
- Would I be able to chuck this same SATA harddrive into my Linux desktop tower running Kubuntu, and run the 'dd' command to make a backup image file of the entire drive to restore it to another drive later using the same 'dd' command?

Asking since I'm not sure if the boot loader would get weird in a scenario like this for older versions of Windows.

I've made backup copies of SD card like this before easily for modded handheld devices and stuff like that but am wondering if this is the only possibility or if I have to run something like Norton Ghost or some kind of utility from a USB flashdrive.

The specs on that Windows XP machine is basically a Core 2 Duo with 4 gigs of RAM and some Nvidia video card with appropriate drivers.

Thanks, lemme know what you think.

Reply 1 of 4, by CwF

User metadata
Rank Member
Rank
Member

Yes. Install qemu-utils, it's small, and read the qemu-img man page.
I'd write a image from device to compressed qcow2, then back out to the next device.
Works well.

I used to know what I was doing...

Reply 2 of 4, by Horun

User metadata
Rank l33t++
Rank
l33t++

Yes possible. I suggest getting a "rescue media" bootable cd from early version of Acronis to do it just so the dual boot and XP are good when you write image to a new diff HD.
You need to consider what HD you may write that image too also, bios limits, OS hd limits etc...

Hate posting a reply and then have to edit it because it made no sense 😁 First computer was an IBM 3270 workstation with CGA monitor. Stuff: https://archive.org/details/@horun

Reply 3 of 4, by st31276a

User metadata
Rank Member
Rank
Member

Yes, that works well. Make sure you image the entire device and not only the partition, then the bootloader will remain intact.

If you want to save space, first mount it and write a zero filled file to the file system until it is full, then delete the zero filled file.

dd if=/dev/zero of=/mnt/wherever/z.img
rm /mnt/wherever/z.img
umount /mnt/wherever

Then you can pipe dd through gzip -c:

dd if=/dev/sd<x> | gzip -c | dd of=image.gz

Redirecting with > to image.gz should work too.

Then the file is small.

You can perform the reverse to cast it into another device that is the same size or bigger.

dd if=image.gz | gzip -d | dd of=/dev/sdx

You might want to specify a read/write size with bs=64k as a dd parameter to speed things up a bit.

Reply 4 of 4, by stanwebber

User metadata
Rank Member
Rank
Member

use a block size parameter of 1mb or more with dd, otherwise it takes forever with the default size (512b).