Wiki: Troubleshooting an Image Upload


  • Developer

    [url]http://fogproject.org/wiki/index.php?title=Troubleshooting_an_image_upload[/url]


    To make this process easier, we are going to use an Windows XP image.[B] Note that this process has not been tested on Windows 7[/B]. Please also note that this process will change your partitions on the client computer. This tutorial assumes that your disk is /dev/sda1.

    [LIST=1]
    []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]
    [/LIST]



  • I can confirm that this doesn’t work on Windows 7 as written. Since I’m unfamiliar with the unix tools, I just destroyed my reference workstation. I managed to work with the 100Mb Win7 boot partition, but destroyed the partition containing the C: drive… lol



  • Blackout,

    Using these instructions for kernel 2.6.39.1 Core do not work. The ntfsresize command is in /usr/sbin, not /usr/local/. Also, on step 23, wouldn’t that just be +F without the K? We didn’t modify F be ntfssize / 1000 like we did for N.

    Thanks,
    Jesse


Log in to reply
 

417
Online

39.3k
Users

11.0k
Topics

104.6k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.