0
I've seen a few questions about how to install windows from linux using ISO. And after some search also found how to install an image of a linux from linux: Create an image file of a running Linux system
Now what I want to do is different there though. My plan is to make an image of my windows system drive (about once a month). And then use that to reinstall in case the hard drive fails or an installation went awry. And all of that as automatic as possible.
Thus I came up with the plan to use a linux there to boot (without installing the linux) and then use command line statements that I could then put onto an USB stick in order to just call a single command and get my hard drive and system back to working condition.
As I didn't find much info there, my question would be how to do it? In essence it boils down to these two parts:
- What do I need to keep in mind when creating the image (program restrictions, ...)
- How can I restore the image of the windows OS to the PC (what commands to use there, what to keep in mind)?
As a note: I'm taking the worst case scenario into account there that the hard drive crashed and has to be replaced. Thus the computer has no OS installed at all afterwards. Thus the idea of the live linux there. Maybe as a remark: The image of the windows drive should be created from within windows itself.
+1 for the details and warnings. Btw the picture that made me laugh :). I've heard windows sometimes even thinks that if you change just the memory so the SHOULD be is sadly really a should. But as its just an image written in case of a defective hdd reactivating should be possible without much problems (latest after a call to the microsoft support line). but back to topic. The 2 commands+parameters you listed for restore and backup do make the image for teh whole drive with ALL of the partitions correct? – Thomas – 2015-11-30T11:13:33.193
Btw interesting part about compressing the image. if I'm not mistaken it makes the image then compresses it. Am I right that I then need to use gzip and pipe the result to dd for installing the image? – Thomas – 2015-11-30T11:14:21.117
If it's a zipped image, then would first need to unzip & pipe, correct. Like with
gzip -dc file |dd ...
orzcat file |dd ...
. If a drive/partition is mostly empty then they can compress all the zero's a LOT, butdd
reads whatever is on the disk, old files marked deleted and everything, it doesn't skip over "free" space. I have a potentially better idea on how to "get windows back" after having to change disks, I'll edit it into the answer. – Xen2050 – 2015-11-30T14:37:49.377