• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. mwarner
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 40
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by mwarner

    • Multiple Partition Image to Blank Hard Drive

      Greetings,

      The issue I’m having is as the title suggests; I have a Mac OSX image that has one disk with three partitions on it and I’d like to upload this image to a brand new hard drive to test a major operating system upgrade in a test environment. The error that I get says:


      No image file(s) found that would match the partition(s) to be restored (performRestore)
      Args Passed: /dev/sda /images/IMAGE-NAME all

      Normal variables and settings:
      BOOT_IMAGE=/boot/bzImage loglevel=4 initrd=init.xz root=/dev/ram0 rw ramdisk_size=12700 keymap= web=10.1.10.32


      I presumed that this means the blank hard drive literally had no partition table on it so I took it into GParted (and eventually straight up fdisk) on a Ubuntu live disk and added 1 partition to see if the error would change. Unfortunately, it doesn’t look like it changed anything. I went back into the Ubuntu live disk and it apparently didn’t write correctly because it was still “unallocated”. At this point, I’m not sure if it’s an issue with FOG reading partitions or my partitioning software but I still have on main question:

      How do I even know what to set the partition sizes to? I know that there are three partitions for the full image but I’m not sure what size they are uncompressed.

      Thanks in advance!

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @Tom-Elliott Yes it is safe to solve now, sorry for the delay. Thanks again!

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @Tom-Elliott I take that back, it returns a 403 in the browser but when I use CURL it returns 0 bytes of data unless I use /api in the URL

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @tom-elliott it still returns a 404 without /api in the URL

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @tom-elliott

      NameVirtualHost *:80
      <VirtualHost *:80>
          KeepAlive Off
          ServerName 10.1.10.254
          ServerAlias fog.emg-usa.com
          DocumentRoot /var/www/
          <Directory /var/www/fog/>
              DirectoryIndex index.php index.html index.htm
          </Directory>
          RewriteEngine On
          RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
          RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d
          # RewriteRule ^\/(.*)$ /fog/api/index.php [QSA,L]
      </VirtualHost>
      

      Just realized that I tried to comment out the RewriteRule in an attempt to get it working earlier. I just uncommented it and it works fine. So it definitely was the missing ServerAlias that was causing the issue.

      fog.emg-usa.com/fog/api/task/current
      

      and

      10.1.10.254/fog/api/task/current
      

      are both returning 403 errors now. I’ll add an API key in a moment to see if we can get some actual data back along with a 200 code!

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @Tom-Elliott Right, but if I attach a proper endpoint (say /api/task/current) I get a 404. As far as I’m aware, /api by itself is useless and that seems to be the only endpoint sending a meaningful response (one that isn’t “not found”).

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      No dice. I disabled the default Apache configuration (000-default) and even set a ServerAlias for fog.emg-usa.com (where I, as you correctly guessed, typically visit the site from) in the 001-fog configuration file.

      I did try replacing the DNS name with an IP and still no luck. My IP for the main FOG server is, let’s call it, 10.1.10.254 and I tried the following endpoints:

      10.1.10.254/fog/task/current
      10.1.10.254/fog/api/task/current
      10.1.10.254/task/current
      

      all of which received a 404 error. Same thing with the new ServerAlias added. I made sure to restart the apache2 service after each edit to the config files.

      Interestingly enough, 10.1.10.254/fog/api returns a 403 Forbidden, but after investigating the api/index.php file it doesn’t seem to shed any light into the issue (at least from what I saw).

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @Wayne-Workman this endpoint does not work either. I tried every single endpoint in the example you showed and none of them seem to return anything but a 404, whether I’m using CURL, Postman, or a Node.js application.

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      Any thoughts on why this is 404ing?

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: Building USB Booting FOS Image

      @george1421 we are using FOG in a business environment (~120 employees), and a few of our users have Mac Pro’s. That’s why we were looking for this USB stick as a solution. But instead of having those two people relying on a USB stick, I was wondering if we could simply mount this .img as a partition on their device’s hard drive so it would be easier for them when they want to backup their device.

      posted in Tutorials
      mwarnerM
      mwarner
    • RE: Building USB Booting FOS Image

      @george1421 the .img file that your script generates (found in /tmp/fos-usb.img according to your script)

      posted in Tutorials
      mwarnerM
      mwarner
    • RE: Building USB Booting FOS Image

      I just performed a capture and deploy and it worked flawlessly. Again, thank you so much.

      I do have one question: would it be possible to mount this on the partition of a hard drive? Or would that likely mess something up?

      posted in Tutorials
      mwarnerM
      mwarner
    • RE: Building USB Booting FOS Image

      @george1421 Yep, that’s exactly what was happening. I changed it and ran a full host registration successfully. I will try an image capture next.

      posted in Tutorials
      mwarnerM
      mwarner
    • RE: Building USB Booting FOS Image

      @george1421 I did not change the $myfogip variable in the script, so I will snap a picture if changing that does not work.

      posted in Tutorials
      mwarnerM
      mwarner
    • RE: Building USB Booting FOS Image

      Thank you for this guide! Your script works very well - a lot better than cloning the (much older and more obscure) mac-boot Github repo. We ran into an issue with DHCP leasing but it’s certainly a lot farther than we got with previous attempts on our test Mac.

      posted in Tutorials
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @Tom-Elliott Yes, it is enabled for both user and overall

      posted in FOG Problems
      mwarnerM
      mwarner
    • RE: API System giving 404 errors

      @george1421 Yes, it is enabled in the configure settings

      posted in FOG Problems
      mwarnerM
      mwarner
    • API System giving 404 errors
      Server
      • FOG Version: 1.4.4
      • OS:
        • Ubuntu 16.04
        • PHP 7.1
      Client
      • Service Version:
      • OS:
      Description

      I have decided to attempt to learn the API system, with the overall goal in mind to use the API system to create a script that creates and rename images based on our hosts. I enabled the API System in the FOG Configure settings and tried experimenting with the API by running: “curl -H ‘fog-api-token: token’ -H ‘fog-user-token: token’ -X GET http://fogserver/fog/task/current” to list our current/active task. However, I keep getting 404 errors returned as shown in the following image. 0_1499713793316_404_error.png

      If anyone could help me understand why I keep getting these errors and/or help me better understand the API it would be much appreciated.

      posted in FOG Problems api custom script program 404
      mwarnerM
      mwarner
    • RE: LDAP Plugin on FOG 1.3.3

      Thanks for the quick response! The reply with the proper field data helped tremendously, at least after I updated to 1.3.5.

      I had a few issues, particularly with the Group Search DN and the Search Scope option, but I got it to work by using my Base DN (dc=company,dc=local) and the Subtree and Below option. Not sure why it wouldn’t work when I narrowed the scope and chose Base and Subtree, but long story short it’s working now after upgrading to 1.3.5.

      I also had a few binding issues but found that instead of using the full DN for the bind user I just used the username and it worked fine.

      posted in FOG Problems
      mwarnerM
      mwarner
    • LDAP Plugin on FOG 1.3.3

      Server

      • FOG Version: 1.3.3
      • OS: Ubuntu 16.04
      • PHP Version: 7.1

      Client

      • Service Version: Not sure
      • OS: Windows 7
      • Browser: Google Chrome

      Description

      I’m encountering some confusion when setting up my LDAP connection. I think I have it set up correctly as I am getting an error that’s been discussed before in this post. The resolution was that the moderator PM’d the OP a file that apparently fixed everything - but that doesn’t help me out any! Could we make this fix public? And what are the chances of posting a tutorial on this LDAP feature? Maybe even a “Test Connection” button with some descriptive error messages so that users aren’t left in the dark while configuring their connection?

      To reiterate, here’s the exact error that I’m getting:


      [Tue May 09 15:34:37.803674 2017] [php7:warn] [pid 20908] [client 10.1.255.255:64736] PHP Warning: ldap_unbind() expects parameter 1 to be resource, null given in /var/www/fog/lib/plugins/ldap/class/ldap.class.php on line 118, referer: http://fog.foobar.qux/management/index.php


      Futhermore, I was sure to install the php7.1-ldap package and restart apache.

      posted in FOG Problems
      mwarnerM
      mwarner
    • 1 / 1