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

another init.xz issue

Scheduled Pinned Locked Moved Unsolved
FOG Problems
6
70
26.3k
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.
  • G
    george1421 Moderator @bmaster001
    last edited by george1421 Jun 21, 2016, 8:36 AM Jun 21, 2016, 2:35 PM

    @bmaster001 When you enter in debug mode none of the fog scripts have run. So the $web won’t be set until . /usr/share/fog/lib/funcs.sh has been called. I know it is confusing, but I ran into the same issue when developing the code snippet you posted.

    $web should point to your fog server when its set. Actually <fog_server_ip>/fog (this comes from the kernel parameter in the GRUB config file). The funcs.sh script extracts the kernel parameters and then sets the bash variables to match the kernel parameters. Then my code calls the fog server to pick up the other dynamic kernel parameters than can’t be supplied by the static grub.cfg file. That is where the hostinfo.php comes in. The type variable is set by the hostinfo.php script, fwiw.

    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!

    1 Reply Last reply Reply Quote 0
    • B
      bmaster001
      last edited by bmaster001 Jun 21, 2016, 8:44 AM Jun 21, 2016, 2:43 PM

      It’s a difficult mechanism to understand. A lot of unfamiliar technologies, scripts and boot-arguments working together. It’ll take a while for me to better understand it. But it’s a very interesting subject!

      The very first line in the fog script is the call to funcs.sh. when I run that on the command line, and do set, I see no web variable:

      _=/usr/share/fog/lib/funcs.sh
      acpi=off
      boottype=usb
      consoleblank=0
      has_usb_nic=1
      init=/sbin/init
      isdebug=yes
      ismajordebug=0
      loglevel=7
      name=has_usb_nic
      oIFS='
      '
      ramdisk_size=127000
      root=/dev/ram0
      rootfstype=ext4
      value=1
      var=has_usb_nic=1
      
      G 2 Replies Last reply Jun 21, 2016, 2:44 PM Reply Quote 0
      • G
        george1421 Moderator @bmaster001
        last edited by george1421 Jun 21, 2016, 8:47 AM Jun 21, 2016, 2:44 PM

        @bmaster001 hey that’s cool (not).

        Lets confirm that your grub.cfg has this line.

        menuentry "1. FOG Image Deploy/Capture" {
         echo loading the kernel
         linux  $myimage loglevel=$myloglevel initrd=init.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ boottype=usb consoleblank=0 rootfstype=ext4 isdebug=yes
         echo loading the virtual hard drive
         initrd $myinits
         echo booting kernel...
        }
        

        Note the kerenel parameter web=$myfogip/fog/

        [edit] note web will only be there when you are in capture/deploy menu mode not in the debug mode from the menu entry.

        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!

        B 1 Reply Last reply Jun 22, 2016, 5:48 AM Reply Quote 0
        • G
          george1421 Moderator @bmaster001
          last edited by Jun 21, 2016, 2:50 PM

          @bmaster001 said in another init.xz issue:

          It’s a difficult mechanism to understand. A lot of unfamiliar technologies, scripts and boot-arguments working together. It’ll take a while for me to better understand it. But it’s a very interesting subject!

          I understand this (linux) is a alien world to most windows folks. But you see there IS a lot of magic that goes into make FOG functional and universal.

          You have the unfortunate situation of having very strange hardware (maybe one of a kind) that make imaging difficult to manage. FOG has a lot of instruments in the band, its takes a bit of cohering to get them to all play the same tune.

          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!

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth Jun 21, 2016, 11:54 AM Jun 21, 2016, 5:53 PM

            @bmaster001 said:

            In that source you can see that the driver tries to get a MAC address from the EEPROM but if that fails, it generates a random one. I thought that it might help to know that it’s the driver who does this, and not some weird config option somewhere…

            Great find! This is really unusual. Have never seen this before! Why would if not be able to read the MAC I wonder?!? Random MAC is kind of breaking the whole FOG logic of identifying hosts via MAC address.

            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

            B 1 Reply Last reply Jun 22, 2016, 5:56 AM Reply Quote 0
            • B
              bmaster001 @george1421
              last edited by Jun 22, 2016, 5:48 AM

              @george1421 said in another init.xz issue:

              [edit] note web will only be there when you are in capture/deploy menu mode not in the debug mode from the menu entry.

              Ok, that explains why the $web variable doesn’t exist in debug-mode, and why the fog script doesn’t work then.

              I understand this (linux) is a alien world to most windows folks. But you see there IS a lot of magic that goes into make FOG functional and universal.

              You have the unfortunate situation of having very strange hardware (maybe one of a kind) that make imaging difficult to manage. FOG has a lot of instruments in the band, its takes a bit of cohering to get them to all play the same tune.

              I do have some linux knowledge, and understanding some scripts would not cause too many problems. But it’s the (network)boot-process that I don’t know anything about. Like you say, trying to understand that, together with the fog scripts, and some weird hardware, makes the step too big. If I really want to learn how fog works, I’d better start with some normal hardware 🙂

              1 Reply Last reply Reply Quote 0
              • B
                bmaster001 @Sebastian Roth
                last edited by Jun 22, 2016, 5:56 AM

                @Sebastian-Roth said in another init.xz issue:

                @bmaster001 said:

                In that source you can see that the driver tries to get a MAC address from the EEPROM but if that fails, it generates a random one. I thought that it might help to know that it’s the driver who does this, and not some weird config option somewhere…

                Great find! This is really unusual. Have never seen this before! Why would if not be able to read the MAC I wonder?!? Random MAC is kind of breaking the whole FOG logic of identifying hosts via MAC address.

                Exactly. And I’m pretty sure there IS a mac address in the nic: when I enable uefi and let it network boot, I see always the same mac address. Would it be possible that it uses a different nic with uefi disabled?

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Jun 22, 2016, 1:50 PM

                  @bmaster001 said:

                  Would it be possible that it uses a different nic with uefi disabled?

                  Can’t imagine that being the case. Well on the other hand I’ve never seen a driver generating a random MAC for a real hardware NIC… 😄 So what do I know!

                  lol, just found this. Seems like the driver used to generate a new random MAC even on ifup/ifdown. Along that I found something interesting in the kernel code. See here (line 771):

                  /* maybe the boot loader passed the MAC address in devicetree */

                  Here you find a description of what that of_get_mac_address function does. I wasn’t able to find out if you can actually set this via iPXE or as a kernel parameter. Anyone an idea?

                  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
                    bmaster001
                    last edited by Jun 23, 2016, 6:13 AM

                    We’ve decided for now to just boot to Windows, and set the thing up so that we can test it “on the floor”. If it behaves like it should, we’re gonna buy some other ones to replace older devices currently in use. When we do that, I’ll have more time to play with capturing/deploying it so make our life easier 🙂 So you guys have plenty of time to think about this weird piece of hardware, and I’ll get back to this thread when we have more devices to play with!

                    Thanks all for the help so far!!

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Jun 24, 2016, 10:37 AM

                      @bmaster001 said:

                      So you guys have plenty of time to think about this weird piece of hardware, and I’ll get back to this thread when we have more devices to play with!

                      I don’t think we are able to push this anywhere without having the hardware around or someone like you who are willing to test things out.

                      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
                      • 1
                      • 2
                      • 3
                      • 4
                      • 4 / 4
                      4 / 4
                      • First post
                        66/70
                        Last post

                      187

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project