LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Disk imaging Windows systems with free software - various questions. (https://www.linuxquestions.org/questions/general-10/disk-imaging-windows-systems-with-free-software-various-questions-786190/)

cantab 02-01-2010 07:23 AM

Disk imaging Windows systems with free software - various questions.
 
So I'm planning on using free disk imaging software to image a bunch of Windows machines, and I have a few questions. (The imaging software itself will probably run from a live Linux CD, so it's sort of a Linux question).

What imaging software should I use? I've used partimage before, but with Linux filesystems. I've also heard of FSArchiver, and of course there's plain old dd. The image will likely be pulled over the network from a server, but maybe I could use a DVD or usb drive instead.

Will imaging Windows work properly? I presume I have to create an image for each hardware setup (we have 3 different computer models, with between 3 and 13 of each).

Are there licensing issues? I think all the machines run an OEM copy of Windows XP.

schneidz 02-01-2010 10:14 AM

so long as you own a license of windows for each machine i dont see any problem.

dd is probably your easiest method.
http://www.linuxquestions.org/questi...ommand-362506/

i do this on my usb harddrives that run various live-usb distros.
e.g.:
Code:

dd if=/dev/sdx bs=4096 | bzip2 > sdx.iso.bz2  # to backup the drive
bunzip2 -c sdx.iso.bz2 | dd of=/dev/sdx bs=4096  # to restore the drive

this duplicates the entire disk device (boot sector + all partitions).
if you want specific partitions then use the partition device node (e.g. /dev/sdx1, /dev/sdx2, ...)

the problem with this approach is that the harddrives should be the exact same size.

jschiwal 02-01-2010 11:01 AM

You may be interested in the FOG project. It uses PXE and TFTP to start the computer running a bare bones Linux, and then get the HD image from the server. IIRC it used broadcasts to allow several computers to write the same image simultaneously. You can do this to install a large number of Linux or Windows installations.

As to the licensing issues, you need to read your license agreement with MS. Some contracts are for a set price up to a certain limit of machines.

http://twit.tv/floss53

I think if you are a member of their developers network, you may be able to do this as well. You may need to obtain a unique serial number from MS for each host. Otherwise you will be raising flags during updates and might be deauthorized.

cantab 02-01-2010 11:21 AM

I came across something called wpkg, which is supposed to manage software on Windows systems. Looks good for the updating aspect of things. Has anyone any experience with it?

Also 'unattended' is supposed to automate installation in a manner different to ghosting.

I haven't checked whether the PCs can boot from the network, though I expect they can. Broadcasting the image is a clever trick (the last time I did imaging I had to do every PC individually and could only image a few at a time).

jschiwal 02-01-2010 12:12 PM

We have racks of equipment at work that "replicate" video files from one "solicitor" device to the other devices in the rack.

The FOG server may be to much for a private user with a few hosts. They were talking about installing to 50 or 100 at a time.
I might be remembering wrong and it may be using a scatter gather process but I might be remembering a different project for clusters
on the latter. The Linux client doing the installation is probably using dd in the background to write segments of of the disk at a time.
Perhaps performing a checksum and requesting it be repeated if not successful. However, the write process could be a C program they wrote.

Unrelated but one idea I had for installing from images is to have slices of an image with the offset and length contained in the filename.
This would allow you to back up to DVDs and be able to use dd to restore even if you supply the DVDs in the wrong order.

However I'm not a fan of using images for backup purposes.

/dev/me 02-01-2010 02:41 PM

Quote:

Originally Posted by schneids
i do this on my usb harddrives that run various live-usb distros.
e.g.:

Code:

dd if=/dev/sda bs=4096 | bzip2 > sda.iso.bz2  # to backup the drive
bunzip2 -c sda.iso.bz2 | dd of=/dev/sda bs=4096  # to restore the drive

this duplicates the entire disk device (boot sector + all partitions).
if you want specific partitions then use the partition device node (e.g. /dev/sda1, /dev/sda2, ...)

Yeah? Does it work like that with NTFS also?

I always did it per partition, but mainly because I wanted the chance to pull /home/ from a different source. Now I'm looking at >20 reinstalls of Windows. And even though our intention is to clone them, it'll still be working late.
I wonder if I can use this method on Windows XP clients. I already have a portable PXE server and a client image that runs arbitrary scripts pulled from the server. It's mighty fast when it comes to cloning Linux clients, but I've never tried it on Windows clients.

Would this have a chance of succes?
Code:

dd if=/dev/hda bs=havetolookitup | bzip2 > /mnt/server/ostype-variety.bz2 # it's not an iso ;-)
bunzip2 -c /mnt/server/ostype-variety.bz2 | dd of=/dev/hda bs=4096?


jschiwal 02-01-2010 08:24 PM

The first one isn't an ISO either. I would use .img.bz for the extension. An ISO file is one with the ISO9660 or UDF filesystem.

In the second step, you can use "bzcat" instead of bunzip2 on the LHS of the pipe.

To save space and maybe time in the second step, you may want to save over the freespace with a file of just zero's. then delete it right away. This will clear out old deleted file patterns if it isn't a new disk.

sudo df --blocksize=512 /dev/hda
root's password:
Filesystem 512B-blocks Used Available Use% Mounted on
/dev/sda2 147492752 84222784 63269968 58% /windows/C
sudo dd if=/dev/zero of=/windows/C/zerofile.tmp bs=512 count=63269966
rm /windows/C/zerofile.tmp

Now the compressed image file might be about 60% the size it would be otherwise.
After repeating the process 100 times, saving 15 or 20 minutes each, it adds up.

It would be faster not compressing the image in the first place.
This would be true for restoring file backups as well, since the decompression is occurring before the data goes across the network connection.

If you have a client on the computer being cloned, decompressing it, that may be another story.

There will be some fixing up to do afterwards. E.G. giving unique hostnames to every computer; giving it its uniq windows License, a uniq IP address if not using DHCP, etc.

Since some of these things involve modifying the registry, I can't be much help with that, but maybe the FOG project site would have information on what fixups need to be done for each windows client. Perhaps upon rebooting into Windows, they run a script applying the final changes and performing checks that the process was successful.

aysiu 02-02-2010 12:04 AM

Don't forget CloneZilla... particularly good for mass deployments of a single image.

schneidz 02-03-2010 10:20 AM

the link i have above has cool tricks you can do with netcat for streaming the image across a server/ network.
i prefer sshfs

@ /dev/me: this backup method should be filesystem independant.

@ jschiwal: i just call them iso's because i dont know what else to call them but i guess img's would be a better label.

cantab 02-03-2010 10:55 AM

I'll reiterate my main concern:

The PCs have OEM licenses. Thus, each PC has a different Windows Product Key. If I use plain disk imaging, it will be as though all the machines had been installed using the same product key. That will I think make Windows Genuine Advantage throw a hissy fit.

Is it possible, after imaging, to 'correct' the product keys? (They're stuck on the side of the machines, so I do know them).

This is at my work, and I don't want to give the software mafia (the BSA) an excuse to harrass us.

jschiwal 02-03-2010 11:01 AM

Quote:

Originally Posted by cantab (Post 3850983)
I'll reiterate my main concern:

The PCs have OEM licenses. Thus, each PC has a different Windows Product Key. If I use plain disk imaging, it will be as though all the machines had been installed using the same product key. That will I think make Windows Genuine Advantage throw a hissy fit.

Is it possible, after imaging, to 'correct' the product keys? (They're stuck on the side of the machines, so I do know them).

This is at my work, and I don't want to give the software mafia (the BSA) an excuse to harrass us.

http://www.fogproject.org/wiki/index..._Serial_Number

FOG doesn't do it automatically but their Wiki explains how to do it with a windows program.
The third option sounds like what you want to do. Reset the Serial Number in a one of the Windows machines and then image it in that "reset Serial Number" state. On booting the target PCs, the serial number will need to be entered.

cantab 02-03-2010 01:01 PM

Great, it sounds like this
http://technet.microsoft.com/en-us/l.../bb457078.aspx
is what I need. Though it also shows MS are penises - anyone not knowing of this article would find that the legitimate product keys affixed to the computers are deemed pirated by M$.

smeezekitty 02-03-2010 01:20 PM

Quote:

ms are penises
ROTFLMFAO

x

schneidz 02-04-2010 01:21 PM

hi, when i was in college we would dual boot rh-9 and win-xp in three different labs. (1 for electrical engineers, mechanical engineers and civil engineers -- they each had three different sets of software). we would ghost 1 room each week from a server with 3 different norton ghost images.

we never had any license issues with the win-xp partition but that mite be because we re-ghosted once a week.

damgar 02-04-2010 01:28 PM

I like FSArchiver for the task. I'm reasonably sure it will image fat/ntfs.

cantab 02-04-2010 01:35 PM

IMHO reimaging each week is overkill. I'll only reimage if there's a problem. Perhaps when any virus is detected if I'm feeling ultra-cautious.


All times are GMT -5. The time now is 11:31 PM.