• Active Directory OU aliases

    5
    0 Votes
    5 Posts
    3k Views
    george1421G

    @moses If you look at this post: https://forums.fogproject.org/topic/7740/the-magical-mystical-fog-post-download-script/6

    You’ll see how to identify the location by it IP address of where the FOS image is running.

    myip=`ip route get 8.8.8.8 | awk 'NR==1 {print $NF}' | cut -d "." -f1-2`; case "${myip}" in 10.1) sitecode="NYC"; timezone="Eastern Standard Time"; oupath="ou=computers,ou=nyc,dc=domain,dc=com"; ;; 10.2) sitecode="LA"; timezone="Western Standard Time"; oupath="ou=computers,ou=la,dc=domain,dc=com"; ;; *) # Default code for the unknowns sitecode="CORP"; timezone="Eastern Standard Time"; oupath="ou=computers,ou=corp,dc=domain,dc=com"; ;; esac

    If you couple that with this post:
    https://forums.fogproject.org/topic/7740/the-magical-mystical-fog-post-download-script/7 you can see how I use sed to modify the unattend.xml script

    # Unattend.xml path (note the case specifics in the file name and path) unattendfile="/ntfs/Windows/Panther/unattend.xml"; sed -i -e "s#<MachineObjectOU>\([^<][^<]*\)</MachineObjectOU>#<MachineObjectOU>${oupath}</MachineObjectOU>#gi" $unattendfile

    If someone wanted to merge all of the bits together from that tutorial into a script it might look like this.

    #!/bin/bash . /usr/share/fog/lib/funcs.sh # windows 7 osdiskpart="/dev/sda2"; # create a directory to hang the Windows C: drive partition on in FOS # the 2>/dev/null below just redirects any errors from the mkdir command to null. i.e. # if the directory already exists, I don't want to know about it, just hide the error. Understand # that I could have tested if the directory already existed, but that takes more programming steps # I'm just going to try to create it and ignore the error if it already exists. mkdir /ntfs 2>/dev/null # This next command connects the hard drive partition to the directory we just created. You will see the # 2>/tmp/mntfail at the end of the mount command. In this case if the connection fails we want to write # the output to a text file we can review and test to see if it exists. If the file exists then something went # wrong with the connection to the hard disk partition. mount.ntfs-3g "${osdiskpart}" /ntfs 2>/tmp/mntfail # this last bit of magic checks to see if the mntfail file exists and if it does then it means the mount # failed so there is no need to continue on with the script. mntRet="$?"; if [ ! "$mntRet" = "0" ]; then echo "Failed to mount C:"; # display what happened cat /tmp/mntfail; # give the reader a chance to see what the error was sleep 12; # terminate the post install script exit 1; fi # Unattend.xml path (note the case specifics in the file name and path) unattendfile="/ntfs/Windows/Panther/unattend.xml"; chassis=`dmidecode -s chassis-type`; chassis="${chassis%"${chassis##*[![:space:]]}"}"; #Remove training space chassis="${chassis,,}"; # Convert string to lower if [ "$chassis" = "laptop" ]; then chtype="Portable"; elif [ "$chassis" = "tablet" ]; then chtype="Tablet"; else # We'll default every other chassis type to desktop chtype="Desktop"; fi # you may need to replace the host 8.8.8.8 with a valid target address if you have a closed network myip=`ip route get 8.8.8.8 | awk 'NR==1 {print $NF}' | cut -d "." -f1-2`; case "${myip}" in 10.1) sitecode="NYC"; timezone="Eastern Standard Time"; oupath="ou=computers,ou=nyc,dc=domain,dc=com"; ;; 10.2) sitecode="LA"; timezone="Western Standard Time"; oupath="ou=computers,ou=la,dc=domain,dc=com"; ;; *) # Default code for the unknowns sitecode="CORP"; timezone="Eastern Standard Time"; oupath="ou=computers,ou=corp,dc=domain,dc=com"; ;; esac sed -i -e "s#<ComputerName>\([^<][^<]*\)</ComputerName>#<ComputerName>$hostname</ComputerName>#gi" $unatendfile sed -i -e "s#<TimeZone>\([^<][^<]*\)</TimeZone>#<TimeZone>$timezone</TimeZone>#gi" $unattendfile sed -i -e "s#<MachineObjectOU>\([^<][^<]*\)</MachineObjectOU>#<MachineObjectOU>${oupath}</MachineObjectOU>#gi" $unattendfile

    Understand these are just snippets of code that are stuck together in some kind of logical order. The above hasn’t been tested. There are also some assumptions in this script as to the partition layout for win7. There are other scripts in other of my tutorials that does a better job of actually finding the ‘C:’ drive on the target computer. In the snippet above the fog client isn’t used to name the computer or connect it to the domain. The unattend.xml file is use for that. So you need to have the other bits in the unattend.xml file so the target is capable of doing what it needs. Like having a user account defined that is allowed to add computers to the domain and such.

  • Help with translation messages.po

    Moved Unsolved
    2
    1 Votes
    2 Posts
    978 Views
    Wayne WorkmanW

    Moved this to feature requests and marked as unsolved.

  • Set Primary Storage Group Globally

    2
    0 Votes
    2 Posts
    971 Views
    Wayne WorkmanW

    This sort of exists already, but in reverse. you can set the primary groups of images individually, and select many groups.

  • Delete Image - Migrate Hosts

    5
    0 Votes
    5 Posts
    2k Views
    AvaryanA

    @Tom-Elliott said in Delete Image - Migrate Hosts:

    If you know you’re going to be deleting an image, why would changing the associated host’s image matter? What if you wanted to use different images on different “currently associated” hosts?

    This, I would think, should be thought of before removing the image. Just thinking out loud. I’m not saying this isn’t a good feature request, just thinking about the logistics of such a thing.

    Fair enough.

    Idea. On the ‘Membership’ page for an image. You already have all the associated hosts there, as well as the checkboxes and the option to delete hosts from that image.

    How about, under that, add the option to choose a different image? This way a user could quickly select new images for whichever hosts he/she wants.

  • Wake on Lan, create automatique task for wake the park everydays

    10
    0 Votes
    10 Posts
    4k Views
    Wayne WorkmanW

    Power management has all the functionality required. Plus, it lets the user override if they want.
    0_1496503226126_Power Management.png

  • Change default storage image location.

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    Tom ElliottT

    This is already possible in more way’s than one.

    You define the storage location in the GUI, but to have it “maintain” this availability you need to update your /opt/fog/.fogsettings storageLocation= line. This will allow updates to update the exports file for the new location as well.

  • 1 Votes
    4 Posts
    2k Views
    Wayne WorkmanW

    @bmercer Awesome suggestion - and I agree this is needed.

  • Mount and Extract files from images

    47
    1 Votes
    47 Posts
    33k Views
    B

    @george1421 @Wayne-Workman

    I have tested using the Partclone Zstd image compression method on an image under Centos 7 and was able to get it working with one small thing. I had to download ZSTD as it wasn’t native to the base OS.

    yum install zstd -y

    I was then able to extract and mount the image using the commands

    touch /tmp/d1p2_extracted.img cat d1p2.img | zstd -dcf | partclone.restore -C -s - -O /tmp/d1p2_extracted.img mount -t ntfs-3g /tmp/d1p2_extracted.img /mnt/

    I also added the -f flag to zstd to force it. I don’t think this is necessary, but as a testing scenario it worked.

  • New PXE menu entry: Deploy Image & Shutdown

    27
    0 Votes
    27 Posts
    14k Views
    P

    @Tom-Elliott Thank you for trying. That field per each menu option would be great. As for now, we are setting Fog kernel with shutdown=1 when we need to mass deploy machines before sending them out to the sites and then remove the shutdown setting. Its a little hassle, but hey, it works. I’ll keep an eye out on newer releases to see if you manage to get the shutdown field put in.

  • Multicast task cancelled when you erase one task from WEBUI

    Moved Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    F

    Thank you 🙂

  • Extra options for Fog main menu

    2
    0 Votes
    2 Posts
    869 Views
    AvaryanA

    Some of those features are under the compatibility test option. There is the advanced menu, I’m not sure what’s in it, but you can have it show up for all hosts by toggling that option in the settings.

  • FOG Snapin Log Updates

    Solved
    14
    1 Votes
    14 Posts
    4k Views
    Tom ElliottT

    @utopia Woops, sorry, can you tell what I modeled if off of?

  • add boot menu to deploy associated image

    Moved Solved
    21
    0 Votes
    21 Posts
    10k Views
    L

    @Tom-Elliott
    Trying to found the source of the problem, I’ve just created a new image, capture it from win10-3.

    After reboot, I have always the same error.
    In log I have the no error at capture
    alt text

    Where should I have a look ?

  • Checkin Date/Time and host name in Snapin Log

    Locked Solved
    8
    0 Votes
    8 Posts
    3k Views
    Tom ElliottT

    Just updating to let people know this feature is now added and will be available for the next release.

  • Send Message to Discord

    3
    0 Votes
    3 Posts
    2k Views
    D

    @Tom-Elliott Awesome. thanks for the info. I may try it.

  • Use github assets for releasing binary files

    3
    0 Votes
    3 Posts
    2k Views
    Wayne WorkmanW

    @Gilou said in Use github assets for releasing binary files:

    As I couldn’t identify an obvious build script or Makefile for the binaries, I was stuck with https://wiki.fogproject.org/wiki/index.php?title=Building_a_Custom_Kernel and https://wiki.fogproject.org/wiki/index.php/Build_FOG_file_system_with_BuildRoot to rebuild the kernel & the init.xz, are there more precise pointers to do that?

    Yes - Tom would need to share the scripts he’s wrote for doing these things.

    Not sure about the client part, but I haven’t even looked at that part.

    There is a powershell script in the repo that builds the client - there is also a text file explaining what is needed.

  • Add hot keys to IPXE menu

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    D

    Thanks for the quick work.

  • Do windows update on uploded image stored on fog server

    10
    0 Votes
    10 Posts
    7k Views
    Lee RowlettL

    why would you want to blindly apply windows updates post image anyway? surely you should be going through some form of testing at least…?

    maybe that varies in different environments and we have to air on the side of caution because if our systems go down/stop working people start dying… lol

    @rmurra81 said in Do windows update on uploded image stored on fog server:

    It would be very difficult to inject Windows updates into an image, but what this thread should be talking about is to spin up a VM with those image files. This would allow you to run updates, install programs, maintenance, etc. It seems stupid to me that the conversation didn’t go there. Why would you spend all your resources updating this FOG server software for it only to do windows update? Tom Elliott, that is a waste of time. Deploying an image to a PC and then running updates just to capture it. Just setup WDS and run a VM. This feature already exists and it seems like it wouldn’t be that difficult. Maybe some button to deploy to a VM within the FOG Server.

    that’s how you should be building your images… build on VM, snapshot/create checkpoint before sysprep/capture… when you need to apply windows updates to your “image”, revert vm to snapshot/checkpoint - apply windows updates, snapshot again before sysprep/capture etc etc etc…

    you’ll have a cleaner image building on VM and you avoid rearm restriction as theoretically your image only ever gets sysprepped once (as you revert to unsysprepped state before applying changes/update)

    so that’s not a feature needed in FOG that’s a learning curve or a “suggestion” if you’d like that we need to teach FOG administrators…

    “Maybe some button to deploy to a VM within the FOG Server”… that’s what the deploy task button is for 🙂 unless i’ve been up far too long and i’m reading that wrong, you clearly don’t understand the architecture behind virtualisation if you think that could be implemented so easily. it would kill most environments just trying to implement that and most FOG Servers are being hosted on a VM already so then you’re talking about nested VMs and that’s just the tip of the iceburg on that head ache… can of worms springs to mind just to do something you can already easily and quickly do a thousand different ways as wayne and tom pointed out a few below

    Edit: Just read the other thread you’re discussing this - if you mean deploy the image to a vm, you can do that like you would a physical machine, register the VM within FOG and deploy image, do your updates and maintenance etc etc and then capture, don’t think i fully understand your VM Feature request, maybe you could explain better?

  • Deploy Image to VM

    5
    0 Votes
    5 Posts
    2k Views
    ch3iC

    @Junkhacker said in Deploy Image to VM:

    something i’ve done is to just leave windows running on a vm, getting windows updates automatically, and having a scheduled upload task that runs every week. you’ll want to not install the vm tools for the machine, since they can seem to cause some odd behavior when the image gets deployed back to real hardware

    I’m using the same 😉 Plus I use chocolatey to update some critical programs (schedule taskl) : https://chocolatey.org/

  • Snapin Groups?

    3
    1 Votes
    3 Posts
    1k Views
    falkoF

    Thanks Wayne, I do have similar groups for my hosts.

    What i meant was a way to group snapins. (If you have used PDQ, where you can put packages into folders)

    Take one of my primary schools, it uses 16 or so apps that are all from 2simple. I was after a way to put them all under a group/heading on the snapins page called 2simple.

    I have them assigned to the Primary IT Suite Host Group. But i was think more of a way to have the snapins page cleaner instead of one big list.

104

Online

12.4k

Users

17.5k

Topics

156.0k

Posts