Novell Home

How to use ZENworks Imaging for Partition Manipulation

Novell Cool Solutions: Trench
By Dennis Hestbech

Digg This - Slashdot This

Posted: 5 Aug 2004
 

ZENworks for Desktops Imaging can be made to do some of what partition manipulation programs do, should the need arise.

It's pretty fast, can be automated (even scheduled, if you have Wake-On-Lan working) and since the method includes taking a temporary backup of the partition or disk in question, it is also reasonably safer than using most partition manipulation programs. (Did you read the fine print in the manual? I mean, the part that says you should never proceed with partition operations without a proper backup?)

Having ZENworks for Desktops installed, and especially having your PCs imported in eDirectory, is really all you need for this to be done - automatically.

The method is straightforward, and involves nothing more than the admin would have to do without the use of a partition manipulation program - namely to back up the data on the partition(s), manipulate the partition sizes, then restore the data.

Imaging scripting - and a little space on your imaging proxy server is your friend in this regard.

What you do is make a Workstation Image Object, have it use scripted imaging, and add the proper commands.

On the Workstation Object in question, make it take the Workstation Image Object, that you just made, at next PXE boot.

In this case, the admin faces the task of re-sizing one or more partition(s) (de- or increasing) without losing the data on the harddisk.

His Imaging proxy server is on a server called SERVER, the server has the IP address 10.10.10.2, and has a volume VOL1:. The admin has allowed the uploading of images to (and overwriting) the directory IMG on VOL1: in his server policy package.

Let's have a few examples.

Example 1: (the obvious, simple use)

The admin has a PC with 20 GBytes HD, the HD is partitioned with one partition of 20 GBytes. He wants two partitions, the first with the content it has right now, size 12 GBytes (bootable), the second an empty data partition filling out the rest of the disk. Both partitions should be NTFS. The PC(s) in question only has one harddisk.

The proper commands would be:

Commands Comments
img mp 10.10.10.2 //SERVER/VOL1/IMG/temp.zmg Make an image of the (only) partition on the PC
img pd1 Delete the partition
img pc1 NTFS 12000 Create a new first partition, NTFS formatted, size 12 GBytes
img pc2 NTFS Create a new second partition, NTFS formatted, filling up the disk
img rp 10.10.10.2 //SERVER/VOL1/IMG/temp.zmg a1:p1 Restore the image to the first partition
img pa1 Make the first partition active

Example 2: (even simpler)

Resizing the first partition can be done by omitting the line that creates the second partition.

To resize the first partition to 10 Gigabytes:

Commands Comments
img mp 10.10.10.2 //SERVER/VOL1/IMG/temp2.zmg Make an image of the (only) partition on the PC
img pd1 Delete the partition
img pc1 NTFS 10000 Create a new first partition, NTFS formatted, size 10 GBytes
img rp 10.10.10.2 //SERVER/VOL1/IMG/temp2.zmg a1:p1 Restore the image to the first partition
img pa1 Make the first partition active

Example 3: (a little more advanced)

The admin has a PC with 20 GBytes HD; the HD is partitioned with two partitions: one system partition of 6 GBytes (bootable) and one data drive of 14 GBytes. There is data on both partitions, and the result should be an increase of the system partitions's size and a decrease in the data partition's size to, respectively, 9 and 11 GBytes:

Commands Comments
img mp 10.10.10.2 //SERVER/VOL1/IMG/temp3.zmg Make an image of both partitions on the PC
img pd1 Delete the partitions
img pd2 Delete the partitions
img pc1 NTFS 9000 Create a new first partition, NTFS formatted, size 9 GBytes
img pc2 NTFS Create a new second partition, NTFS formatted, filling up the rest of the disk
img rp 10.10.10.2 //SERVER/VOL1/IMG/temp3.zmg a1:p1 Restore the first imaged partition to the new, first partition
img rp 10.10.10.2 //SERVER/VOL1/IMG/temp3.zmg a2:p2 Restore the 2nd imaged partition to the new, 2nd partition
img pa1 Make the first partition active

Example 4: (hold onto your hats - the implications of this can be pretty wild!)

(Or for the sissy-boys, who always crave a fast "roll-back option".)

The admin wants to roll out a test installation to certain users' PC's. With image objects, he can put another OS in another partition on the harddisk - and even control what partition the users boot off.

The PCs all have 20 Gbytes HDs, and an OS installed on a partition, that takes all the space. The admin wants another OS installed, and the ability to fall back to the "old" one, should the new stuff be "less than expected."

Commands Comments
img mp 10.10.10.2 //SERVER/VOL1/IMG/temp4.zmg Make an image of both partitions on the PC
img pd1 Delete the partitions
img pd2 Delete the partitions
img pc1 NTFS 9000 Create a new first partition, NTFS formatted, size 9 GBytes
img pc2 NTFS Create a new second partition, NTFS formatted, filling up the rest of the disk
img rp 10.10.10.2 //SERVER/VOL1/IMG/temp4.zmg a1:p1 Restore the old partition to the new, first partition
img rp 10.10.10.2 //SERVER/VOL1/IMG/testOS.zmg a1:p2 Restore the new OS for test to the new, 2nd partition
img pa1 Make the first partition active. This leaves the PC "unchanged" to the user, but prepared for a slick "rollout" of the new OS, simply by imaging the PC with--
img pa2 this!
img pa1 And "Roll-Back image"

Variations are endless - as always with ZENworks, the imagination is the real limit.

If you have any questions, contact Dennis by adjusting this email address with an @ and . where appropriate. dennisheATmyrealboxDOTcom


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell