• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

How to edit files in an image without deploying...

Scheduled Pinned Locked Moved
Windows Problems
4
21
9.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    Jaymes Driver Developer
    last edited by Feb 24, 2014, 2:49 PM

    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.

    WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Feb 24, 2014, 2:49 PM

      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]

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 1
      • J
        Jaymes Driver Developer
        last edited by Feb 24, 2014, 2:51 PM

        Tom is always showing off 😛

        Thanks for the step by step tom I know this will help others.

        WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

        1 Reply Last reply Reply Quote 0
        • T
          Tom Elliott
          last edited by Feb 24, 2014, 2:52 PM

          Lol, not showing off, just pointing out the facts.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • B
            BigMan99211
            last edited by Feb 24, 2014, 2:59 PM

            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.

            "Failure is not an option. It come pre-installed on Windows…" - Anonymous

            "Life is hard; It's harder if you're stupid" - John Wayne

            1 Reply Last reply Reply Quote 0
            • B
              BigMan99211
              last edited by Feb 24, 2014, 3:04 PM

              Oh, thanks… Didn’t see your steps until I posted my last reply…

              "Failure is not an option. It come pre-installed on Windows…" - Anonymous

              "Life is hard; It's harder if you're stupid" - John Wayne

              1 Reply Last reply Reply Quote 0
              • B
                BigMan99211
                last edited by Feb 24, 2014, 3:39 PM

                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.

                "Failure is not an option. It come pre-installed on Windows…" - Anonymous

                "Life is hard; It's harder if you're stupid" - John Wayne

                1 Reply Last reply Reply Quote 0
                • J
                  Jaymes Driver Developer
                  last edited by Feb 24, 2014, 3:41 PM

                  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.

                  WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

                  1 Reply Last reply Reply Quote 0
                  • B
                    BigMan99211
                    last edited by Feb 24, 2014, 3:58 PM

                    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!

                    "Failure is not an option. It come pre-installed on Windows…" - Anonymous

                    "Life is hard; It's harder if you're stupid" - John Wayne

                    1 Reply Last reply Reply Quote 0
                    • J
                      Jaymes Driver Developer
                      last edited by Feb 24, 2014, 4:05 PM

                      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 😉

                      WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

                      1 Reply Last reply Reply Quote 0
                      • B
                        BigMan99211
                        last edited by Feb 24, 2014, 4:44 PM

                        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:.

                        "Failure is not an option. It come pre-installed on Windows…" - Anonymous

                        "Life is hard; It's harder if you're stupid" - John Wayne

                        1 Reply Last reply Reply Quote 0
                        • J
                          Jaymes Driver Developer
                          last edited by Feb 24, 2014, 4:52 PM

                          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.

                          WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

                          1 Reply Last reply Reply Quote 0
                          • B
                            BigMan99211
                            last edited by Feb 24, 2014, 5:23 PM

                            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.

                            "Failure is not an option. It come pre-installed on Windows…" - Anonymous

                            "Life is hard; It's harder if you're stupid" - John Wayne

                            1 Reply Last reply Reply Quote 0
                            • T
                              Tom Elliott
                              last edited by Feb 24, 2014, 5:24 PM

                              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.

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                              1 Reply Last reply Reply Quote 0
                              • B
                                BigMan99211
                                last edited by Feb 24, 2014, 6:16 PM

                                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.

                                "Failure is not an option. It come pre-installed on Windows…" - Anonymous

                                "Life is hard; It's harder if you're stupid" - John Wayne

                                1 Reply Last reply Reply Quote 0
                                • T
                                  Tom Elliott
                                  last edited by Feb 24, 2014, 11:04 PM

                                  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.

                                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    Keith Gregory
                                    last edited by Aug 1, 2014, 4:39 PM

                                    I like your idea of booting into a pre-boot environment to do minor changes; however it seems like you are taking are hard approach at doing this when you could be creating your image with virtual box using snapshots at each major step so if you miss something or mess something up you can just revert the snapshot. Its still a timely and daunting process to create an image this way but it takes out the headaches of having to start from scratch each time. Then each time you think you have it right or after each modification you simply upload your new image over your old one.

                                    1 Reply Last reply Reply Quote 0
                                    • 1
                                    • 2
                                    • 1 / 2
                                    • First post
                                      Last post

                                    215

                                    Online

                                    12.0k

                                    Users

                                    17.3k

                                    Topics

                                    155.2k

                                    Posts
                                    Copyright © 2012-2024 FOG Project