How to edit files in an image without deploying...
-
Is this possible? I made a booboo in my unattend.xml file, and now I get an error during setup. I know exactly what I did, I just need to get into the image and modify the unattend to fix this. I know ghost has a program that allows you to open up an image and modify the contents. Is there anything that Linux has that can do this too?? I really hope soâŠ
-
You can mount the drive in linux. So write the image to the disk, mount the sys partition to /ntfs Goto:
[code]/ntfs/Windows/System32/Sysprep[/code] or where ever itâs located and edit the file from the fog system using VI. If youâre not comfortable with VI let me know and Iâll try to help you out as best I can. -
You will have to reupload the image once complete, but it should work afterward.
-
⊠Iâm not sure where to start here⊠so I canât open the actual pulled image file that is on the fog server? The original Win7 install that I pulled to the fog server, was on a laptop. Do I need to run some sort of linux on the laptop, in order to mount the ntfs volume?
-
It doesnât matter where you mount the image, on the fog server on a laptop, on a desktop; but yes it needs to be done in linux.
Just to note the FASTEST way to image is with a virtual machine, you can take what are called snapshots that save the state so you can return to them later. I do so after installing windows, installing updates, adding software, and right before sysprep incase I have issues, or like you, had an issue with the unattend.xml file.
This way you donât have to fumble around and try to fix an issue an have to make a whole new image, or mount and fix and upload, instead you just load up your snapshot, make your fix, upload the image again.
-
I know you donât want to deploy the image, but set the task up as Download - Debug. This way you get Command line after the imaging is complete.
Once the youâre back at the command prompt, you can mount the /dev/sda2 partition to a folder.
So you may have to make the /ntfs directory, though not so if you have Hostname_Early enabled.
[code]mkdir /ntfs[/code]
Then mount the System partition:
[code]ntfs-3g -o force,rw /dev/sda2 /ntfs[/code]Then cd into the location of the unattend file.
[code]cd /ntfs/Windows/System32/sysprep[/code] or where ever itâs located.
Edit the unattend file using vi, sorry I didnât add nano or pico to the init.gz.
[code]vi unattend.xml[/code]
After you make and save your edits, youâll have to re-upload the task, but as long as you know it works you should be good to go.
Before rebooting unmount the /ntfs directory.
[code]cd /
umount /ntfs
reboot
[/code] -
Tom is always showing off
Thanks for the step by step tom I know this will help others.
-
Lol, not showing off, just pointing out the facts.
-
I meant, can I open up and modify the saved, âd1p2.imgâ file that is saved on the FOG server? Ghost has âGhost Explorerâ which allows you to open up and modify files that are stored in the image, without pushing it to a machine.
I understand your view on using a virtual machine, but the initial image has to be set up on the final machine that itâs going on. We pre-load all driver software for a specific model that the image is being pulled for. In this case, itâs an HP laptop.
-
Oh, thanks⊠Didnât see your steps until I posted my last replyâŠ
-
I just thought of another way!
You can use a Windows 7 recovery CD right after downloading a fresh image.
In my case, I have a Win7 boot USB stick. You load into the Recovery Console and run Command Prompt.
Next, you just type notepad.exe to bring up the notepad GUI and just navigate to the unattend file.
It should be located in âD:â drive. Not sure why, but WinPE gives the local disk, letter âDâ.
NOTE - You have to do this process before the first (setup) boot, or it breaks.
-
That sounds like it can be very tedious, glad you found a work around for you⊠but personally I aim to fix issues so that when I deploy I donât have to touch 200+ machines.
-
I understand that⊠I have right around 180 machines. My ultimate goal is to get a âSystem Center-likeâ setup⊠minus the $10k plus pricetag.
And honestly, FOG is the first software Iâve found, that can even come close to this goal!
-
Keep us posted on your journeys, I love to hear about all the cool stuff fog can do for FREE that other softwares canât
-
Iâm still running into this same issue⊠I noticed that the setup error was pointing to C:\Windows\Panther\unattend.xml and not the original file, C:\Windows\System32\sysprep\unattend.xml. I guess when you actually run sysprep, it copies your unattend to that location. I tried to modify it after the error popped, but still getting âThe computer restarted unexpectedly or encountered an unexpected errorâŠâ.
Going to re-image one more time, and try to edit the unattend.xml located in the âPantherâ folder. If this doesnât work⊠I may have to re-build the image from scratch⊠:mad:.
-
Yes, windows makes a copy of the sysprep file to C:\Windows\Panther. This is the file actually used by the OOBE process after imaging.
I believe it is copied from the sysprep folder during the sysprep process, if memory serves me correctly.
-
Yep! That was it. I just modified the unattend.xml in the Panther folder, and itâs fixed! ! !
Whew!! Close call there. That image took 2-3 days to build.
-
Did you reupload it once it was fixed so you donât have to do all of that again?
Also you can scp the unattend file thatâs fixed back to your FOG Server or whereever so you have the âgoodâ one when youâre recreating images as well.
-
Iâm in the process of re-uploading a new sysprepped image now. This image is weird though. It seems to take forever to upload. Every other image Iâve uploaded, runs at a rate of around 2-3 GB/min, but for some reason, this specific image is only running at around 250-350 MB/min. It pushes out at 2.5-3 GB/min though⊠so weird.
Also, I already have a copy of the fixed unattend.xml saved on my desktop.
-
That may be the NFS adjustments I made. Iâll try removing the âtweaksâ to the upload side as it may not work as well when writing vs deploying.