Difference between revisions of "Troubleshooting an image upload"
m |
(No difference)
|
Revision as of 16:42, 9 August 2011
Troubleshooting an image upload
To make this process easier, we are going to use an Windows XP image. Note that this process has not been tested on Windows 7. Please also note that this process will change your partitions on the client computer. This tutorial assumes that your disk is /dev/sda1.
- In the management portal, start a debug task for the client computer in question. Allow the client to boot and at the bash prompt type the following commands.
- mkdir /images
- mount -o nolock x.x.x.x:/images/dev /images (where x.x.x.x is the server ip)
- cd /images
- dd if=/dev/sda of=/mbr.backup count=1 bs=512
- /usr/local/sbin/ntfsresize -f -i -P /dev/sda1
Look for You might resize you will need this number, so write it down. We will call this number NTFSSize. - Take NTFSSize and divide it by 1000
- Now add 300000 to that number and write down as N
- Now take NTFSSize again and multiply it by 1.1 and then round that to the nearest whole number and write it down as F
- /usr/local/sbin/ntfsresize -f -n -s Nk /dev/sda1
(where N is the value calculated above with a k after it. - If the test above ends successfully then run:
/usr/local/sbin/ntfsresize -f -s Nk /dev/sda1 - fdisk /dev/sda
- Press "d", then Enter
- Press "w", then Enter
- fdisk /dev/sda
- Press "n", then Enter
- Press "p", then Enter
- Press "1", then Enter
- Press "1", then Enter
- Press "+FK", then Enter (where F is the value calculated above; K must be capital)
- Press "t", then Enter
- Press "7", then Enter
- Press "a", then Enter
- Press "1", then Enter
- Press "w", then Enter
- partprobe
- /usr/local/sbin/partimage save /dev/sda1 /images/dev/[somefile] --volume=9900000000 -z1 -o -d -f3 -b
- dd if=/mbr.backup of=/dev/sda
- Press "w", then Enter
- partprobe
- /usr/local/sbin/ntfsresize /dev/sda1 -f -b -P
- mv /images/dev/[somefile] /images/[somefile]