• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. sgennadi
    3. Posts
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 36
    • Posts 102
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Feature Request: Check minimum required PHP version before FOG dev-branch upgrades

      @Tom-Elliott
      Subject: PHP Compatibility — Minimum Version, Latest Tested Version, and PHP 8.6 Feedback

      Hi Tom,

      Thank you for implementing the PHP pre-installation checks in PR #2154 and addressing the issue discussed in forum topic #18333.

      I have one additional suggestion regarding PHP compatibility, especially with newly released PHP versions.

      1. Our experience with PHP 8.6

      We are currently running FOG with PHP 8.6, and so far the main FOG functions appear to be working correctly.

      We have not encountered any obvious compatibility problems during normal use.

      However, I would not consider this a complete compatibility test, since we have not systematically verified every FOG feature, plugin, and background operation.

      1. Minimum supported vs. latest tested PHP version

      I noticed that FOG currently requires PHP 7.4 or newer.

      The new installer checks the minimum version and ensures that matching PHP CLI and PHP-FPM versions are available.

      However, there is currently no upper compatibility boundary.

      For example, PHP 8.6 passes the minimum-version check even though it may not yet have been fully tested with FOG.

      I also checked the current GitHub Actions configuration and noticed that automated PHP tests run on PHP 7.4 and 8.3, while PHPStan currently analyzes the PHP 7.4–8.3 range.

      This raises a question:

      How can administrators determine which is the latest PHP version officially tested and verified with FOG?

      1. Suggested improvement: PHP compatibility matrix

      Would it be possible to maintain a small PHP compatibility matrix for the current FOG release and development branch?

      For example:

      PHP Version Compatibility
      PHP 7.4 Minimum required
      PHP 8.3 Tested in CI
      PHP 8.4 Verification needed
      PHP 8.5 Verification needed
      PHP 8.6 Basic functionality working in our environment; full verification pending

      Ideally, the status should be generated from actual automated test results rather than maintained manually.

      1. Extend GitHub Actions testing

      Could the existing CI workflow be extended to test newer PHP versions?

      For example:

      • PHP 7.4 — minimum compatibility.
      • PHP 8.3 — existing test coverage.
      • PHP 8.4 — compatibility testing.
      • PHP 8.5 — compatibility testing.
      • PHP 8.6 — latest stable release testing.

      It would also be useful to test PHP-FPM and the extensions required by FOG, not only PHP CLI.

      This would help identify compatibility issues early when a new PHP release becomes available.

      1. Show the latest verified PHP version during installation

      Another useful improvement would be for the installer to display:

      FOG PHP Compatibility Check
      Installed PHP: 8.6.0
      Minimum required PHP: 7.4
      Latest verified PHP: 8.x
      PHP version check: PASSED
      Compatibility status: Not yet fully verified

      The Latest verified PHP value should come from maintained compatibility information backed by successful tests.

      If the installed PHP version is newer than the latest verified version, I would suggest displaying a warning rather than blocking the installation.

      This would be particularly useful on distributions that ship newer PHP versions before FOG’s CI matrix has been updated.

      1. Possible future enhancement

      Perhaps FOG could maintain a machine-readable compatibility file containing:

      • Minimum required PHP version.
      • PHP versions covered by automated tests.
      • Latest successfully verified PHP version.
      • Known incompatibilities or limitations.
      • Compatibility information for the current FOG release and dev-branch.

      The installer could use this information to provide accurate guidance without requiring administrators to search GitHub issues or forum posts.

      1. Main goal

      My goal is not to introduce an arbitrary maximum PHP version or prevent users from running newer versions.

      Instead, I would like FOG to distinguish between:

      1. Minimum required PHP version.
      2. Latest PHP version tested successfully.
      3. Newer PHP versions that may work but have not yet been fully verified.

      Since PHP 8.6 is already working for our main FOG operations, it would be useful to include it in the official compatibility testing matrix.

      Would you consider adding newer PHP releases to CI and providing administrators with an indication of the latest verified version?

      Thank you again for your work on FOG and the recent improvements!

      posted in Feature Request
      S
      sgennadi
    • Feature Request — Automatic Root SSH Authentication for FOS Debug Tasks

      Hi Tom,

      I would like to suggest an improvement to the existing SSH functionality in FOS Debug Mode.

      While working on IPv6 PXE, NFS, and multicast troubleshooting, I frequently need remote SSH access to physical computers running FOS Debug tasks.

      1. Current behavior

      I checked the FOS source code and confirmed that OpenSSH Server is already included.

      The current sshd_config contains:

      PermitRootLogin yes
      PasswordAuthentication yes

      Therefore, there is no need to install or implement another SSH server.

      The actual problem is that the root account does not have a known, usable password for remote login.

      Currently, after starting a Debug Deploy or Debug Capture task, I have to physically visit the computer, set a password using passwd, and only then connect remotely.

      This becomes especially inconvenient when troubleshooting multiple computers.

      1. Proposed functionality

      Could FOG automatically configure root SSH authentication when a FOS Debug task starts?

      For example, in my isolated FOG Mobile testing environment, I would like to connect using:

      • Username: root
      • Password: password (example for a controlled lab)
      • SSH port: 22

      Immediately after the computer enters Debug Mode, I should be able to connect using:

      ssh root@192.168.0.100

      Or over IPv6:

      ssh root@fd71:6a85:f038:1::100

      Without needing physical access to the computer.

      1. Suggested FOG settings

      My suggestion is to introduce a small section under:

      FOG Configuration → FOG Settings → Debug Settings

      For example:

      Setting Description
      FOG_DEBUG_SSH_ENABLED Enable SSH access for Debug tasks
      FOG_DEBUG_SSH_PASSWORD_ENABLED Allow password authentication for root during Debug tasks
      FOG_DEBUG_SSH_PASSWORD Administrator-configured Debug password
      FOG_DEBUG_SSH_AUTHORIZED_KEYS Optional SSH public keys for key-based authentication

      I would suggest keeping password authentication disabled by default and allowing administrators to enable it explicitly.

      It would also be useful to allow a per-task override when launching Debug Deploy or Debug Capture.

      1. Automatic configuration

      When a computer starts a Debug task, FOS could:

      1. Detect that the current task is running in Debug Mode.
      2. Ensure that the existing OpenSSH service is running.
      3. Enable the requested root authentication method.
      4. Set the configured root password, if password authentication is enabled.
      5. Install the configured SSH public keys, if applicable.
      6. Display the available IPv4 and IPv6 addresses on the Debug console.
      7. Keep SSH access available throughout the Debug session.

      The administrator would not need to run passwd manually or modify the FOS init image.

      1. Security considerations

      I understand that automatically enabling root SSH access requires appropriate security controls.

      My suggestions are:

      • Keep the feature disabled unless explicitly configured.
      • Enable the configured authentication only for Debug tasks.
      • Never hardcode a universal root password into the FOS image.
      • Never expose the password in plaintext in PXE URLs, kernel parameters, HTTP logs, or diagnostic output.
      • Use a protected credential-delivery mechanism rather than sending the password directly through iPXE.
      • Support SSH public-key authentication as the preferred option.
      • Optionally support a randomly generated password for each Debug task, visible only to authorized FOG administrators.
      • Ensure that Debug SSH credentials do not persist into normal Deploy or Capture environments.

      For my isolated laboratory, a configurable shared password would be convenient, but a per-task password or an SSH key would be preferable for production environments.

      1. Expected workflow

      The ideal administrator workflow would be:

      1. Configure Debug SSH authentication once in FOG Settings.
      2. Select a computer and launch Debug Deploy or Debug Capture.
      3. Boot the client through PXE.
      4. FOS automatically enables the configured root SSH authentication.
      5. See the client’s IPv4 and IPv6 addresses on the console.
      6. Connect remotely immediately and begin troubleshooting.

      No physical visit and no manual password configuration would be required.

      1. Why this would be useful

      This would be particularly helpful for investigating:

      • IPv4/IPv6 network configuration.
      • DHCPv6 and DNS resolution.
      • PXE, HTTP, and TFTP behavior.
      • NFS mounts and storage connectivity.
      • Disk detection and RAID controllers.
      • UDPcast and multicast sessions.
      • Kernel messages and FOS debugging.

      It would significantly simplify troubleshooting when testing many physical computers simultaneously.

      Final suggestion

      My preferred implementation would be:

      Reuse the existing OpenSSH server, enable root SSH authentication automatically for Debug tasks, and make the authentication method configurable through FOG Settings.

      For an initial implementation, even a simple opt-in setting such as FOG_DEBUG_SSH_PASSWORD_ENABLED, combined with a configurable password delivered securely to FOS, would already be extremely useful.

      SSH public keys and automatically generated per-task credentials could provide additional flexibility.

      Would you consider adding this feature to FOS and FOG Server?

      Thank you again for your continued work on FOG and IPv6 support!

      posted in Feature Request
      S
      sgennadi
    • Feature Request: Check minimum required PHP version before FOG dev-branch upgrades

      Hello,

      I would like to suggest improving PHP version compatibility checks during FOG installation and upgrades, especially when updating to the latest dev-branch.

      On several occasions after upgrading FOG development versions, I experienced issues such as:

      • The Management Portal login stopped working.
      • Newly introduced features produced PHP runtime errors.
      • The installer completed successfully without warning that the installed PHP version might not meet the requirements of the updated FOG code.

      Not all of these errors were necessarily caused by an outdated PHP version, but better compatibility checks would help prevent and diagnose them.

      Suggested improvements:

      1. Check the installed PHP version before upgrading FOG.
      2. Define the minimum required PHP version for each FOG release or development build.
      3. Verify both PHP CLI and PHP-FPM versions.
      4. Check required PHP extensions and their availability.
      5. Warn if PHP is too old or if the installed PHP version is not yet supported.
      6. Perform these checks BEFORE replacing application files or modifying the database.
      7. Stop the upgrade if a required PHP dependency is missing, unless an explicit override is provided.
      8. After upgrading, check the Management Portal, login page, HTTP 500 errors and PHP fatal errors.
      9. Provide a pre-upgrade compatibility check, for example:
        ./installfog.sh --check-requirements

      Example warning:

      FOG PHP Compatibility Check
      Installed PHP: 8.x
      Minimum PHP required: X.Y
      Status: Upgrade blocked
      Please upgrade PHP before continuing.

      It would also be useful to display the required PHP version in the installer summary and documentation.

      The goal is to prevent situations where FOG reports “Setup complete” but the Management Portal or newly introduced functionality fails afterward.

      Could this improvement be considered for a future FOG 1.6 dev-branch update?

      Thank you for your continued work on FOG Project!

      posted in Feature Request
      S
      sgennadi
    • RE: Kea DHCPv6 / IPv6 PXE

      @Tom-Elliott
      https://github.com/FOGProject/fogproject/issues/2152

      posted in Feature Request
      S
      sgennadi
    • Kea DHCPv6 / IPv6 PXE

      Is full IPv6 PXE boot and imaging support planned for FOG 1.6, including automatic Kea DHCPv6 configuration, or is DHCPv6 currently outside the supported FOG networking model?

      posted in Feature Request
      S
      sgennadi
    • Feature Request: Add Storage Node IP setting to .fogsettings

      Hi,

      I would like to suggest an improvement to FOG 1.6 regarding Storage Node IP address management.

      Currently, when the IP address of a FOG server changes, the new server IP can be detected by the installer, but the existing Storage Node IP address in the FOG database may still need to be updated manually through Storage Management.

      Could you please add an optional setting to /opt/fog/.fogsettings, for example:

      STORAGE_node_ip=‘192.0.2.10’

      The name above is only a proposal, not an existing configuration option.

      Suggested behavior:

      1. Allow the administrator to specify the Storage Node IP address in .fogsettings or through an installer argument such as --storage-node-ip.
      2. During installation or upgrade, detect whether the specified IP differs from the existing registered Storage Node address.
      3. Update the matching existing Storage Node record in the FOG database, rather than creating a duplicate.
      4. Preserve the Storage Node ID, storage group, image assignments, master status, credentials and other existing settings.
      5. Never modify unrelated Storage Nodes.
      6. Display the old and new addresses and request confirmation before updating the database.
      7. Support unattended installations with an explicit opt-in flag.
      8. Validate the new address and report whether the database update succeeded.

      For a Normal FOG Server, it would also be useful to offer an option to synchronize the primary Storage Node address with NET_fog_server_ip.

      This would simplify IP changes, server migrations, and reinstallations, especially when the web interface is not yet accessible.

      Could this feature be considered for a future FOG 1.6 dev-branch update?

      posted in Feature Request
      S
      sgennadi
    • Subject: FOG dev-branch - lsb_release: command not found on Oracle Linux 10.3

      Hi,

      During a fresh installation of the latest FOG dev-branch on Oracle Linux 10.3 (x86_64), I encountered the following error:

      ./installfog.sh: line 801: lsb_release: command not found

      The installer attempts to execute lsb_release, but the utility is not installed by default.

      The installation continues and eventually reports “Setup complete”.

      Workaround:

      The required package is lsb_release, available through EPEL 10.

      sudo dnf install -y oracle-epel-release-el10
      sudo dnf makecache
      sudo dnf install -y lsb_release

      Verify:

      command -v lsb_release
      lsb_release -a

      Suggested improvements:

      1. Check whether lsb_release is installed before executing it.
      2. Automatically install the required package when available.
      3. Use /etc/os-release as a fallback.
      4. Avoid displaying a “command not found” error during installation.

      Could you please update the FOG installer to handle this automatically on Oracle Linux 10 and other RHEL-compatible distributions?

      posted in Bug Reports
      S
      sgennadi
    • RE: FOG 1.6.0.127 — efitools unavailable on Oracle Linux 8 and Secure Boot signing failures

      [SOLVED] FOG 1.6.0.127 — Fix Secure Boot Signing on Oracle Linux 8 (efitools + sbsigntools)

      I encountered Secure Boot signing failures when installing/upgrading FOG 1.6.0.127 (dev-branch) on Oracle Linux 8 x86_64.

      I was able to resolve the installer signing failures using compatible RPM packages from AlmaLinux 8 and Rocky Linux 8.

      Below is the step-by-step solution, including the verified results.

      Step 1 — Enable the Oracle Linux 8 CodeReady Builder repository

      sudo dnf config-manager --set-enabled ol8_codeready_builder
      sudo dnf makecache
      

      This repository provides additional development dependencies.

      Step 2 — Install efitools 1.9.2

      The default Oracle Linux 8 repositories did not provide efitools.

      The FOG installer originally reported:

      Building efitools (no package for this distro)........Failed
      Publishing Secure Boot variable updates..............Skipped
      

      I used the compatible AlmaLinux 8.10 RPM:

      Package: efitools-1.9.2-9.el8.x86_64

      Package information:

      https://almalinux.pkgs.org/8/almalinux-devel-x86_64/efitools-1.9.2-9.el8.x86_64.rpm.html

      Download:

      curl -fL -o efitools-1.9.2-9.el8.x86_64.rpm \
        https://ftp.ucsb.edu/almalinux/8.10/devel/x86_64/os/Packages/efitools-1.9.2-9.el8.x86_64.rpm
      

      Verify the RPM’s provenance, signature and dependencies using the trusted AlmaLinux signing key before installing. Do not disable signature verification.

      Install:

      sudo dnf install ./efitools-1.9.2-9.el8.x86_64.rpm
      

      Verify:

      rpm -q efitools
      command -v cert-to-efi-sig-list
      command -v sign-efi-sig-list
      command -v efi-readvar
      

      Confirmed installed version:

      efitools-1.9.2-9.el8.x86_64
      

      After installation, the FOG installer recognized the package and successfully generated Secure Boot variable updates.

      Step 3 — Resolve the incompatible sbsigntools version

      Oracle Linux 8 / EPEL initially provided:

      sbsigntools-0.9.2-1.el8.x86_64
      

      This version does not support the --addcert option required by the current FOG Secure Boot signing implementation.

      The installer repeatedly failed with:

      sbsign: unrecognized option '--addcert'
      

      This caused failures signing FOS kernels, Memtest86+, rEFInd and iPXE binaries.

      Step 4 — Install compatible sbsigntools 0.9.5

      I used the Rocky Linux 8 Core SIG RPM:

      Package: sbsigntools-0.9.5-2.el8.core.x86_64

      Download:

      curl -fL -o sbsigntools-0.9.5-2.el8.core.x86_64.rpm \
        https://dl.rockylinux.org/pub/sig/8/core/x86_64/core-infra/Packages/s/sbsigntools-0.9.5-2.el8.core.x86_64.rpm
      

      Verify the package signature and trust the appropriate Rocky Linux signing key through an independently verified source. Review the DNF transaction before installation.

      Install:

      sudo dnf install ./sbsigntools-0.9.5-2.el8.core.x86_64.rpm
      

      Verify:

      rpm -q sbsigntools
      command -v sbsign
      sbsign --help 2>&1 | grep -- '--addcert'
      

      Confirmed result:

      sbsigntools-0.9.5-2.el8.core.x86_64
      
      /usr/bin/sbsign
      
      --addcert <addcertfile> additional intermediate certificates in a file
      

      The --addcert option is important because FOG uses it to include an intermediate signing certificate in the EFI signature.

      Simply removing this argument from the FOG source would not be an equivalent fix.

      Step 5 — Rerun the FOG installer

      With both compatible packages installed:

      cd /root/fogproject-dev-branch/bin
      sudo ./installfog.sh -y
      

      The installer updates services and configuration, so this should be performed during a maintenance window, without active imaging tasks.

      Step 6 — Confirm successful signing

      After upgrading both packages, the installer reported:

      Signing FOS kernels and Memtest86+ for Secure Boot..........Done
      Publishing Secure Boot variable updates.....................Done
      Signing rEFInd for Secure Boot..............................Done
      Signing iPXE binaries for Secure Boot.......................Done (18)
      Setup complete
      

      All previously failing signing stages completed successfully.

      Step 7 — Verify the signed binaries

      Check the installed package versions:

      rpm -q efitools sbsigntools
      

      Confirmed:

      efitools-1.9.2-9.el8.x86_64
      sbsigntools-0.9.5-2.el8.core.x86_64
      

      Inspect EFI signatures:

      sbverify --list /var/www/html/fog/service/ipxe/bzImage
      sbverify --list /tftpboot/snponly.efi
      

      Both commands identified signatures containing the FOG Project Secure Boot Signing certificate.

      Note that sbverify --list confirms the presence of signatures, not firmware trust. A certificate-specific verification and a real Secure Boot client boot test are still required for complete end-to-end validation.

      Recommendations for FOG developers

      1. Check whether efitools is available in the distribution’s repositories before attempting a source build.
      2. Document an appropriate EL8-compatible efitools package or provide a reliable source-build fallback.
      3. Check whether sbsign supports --addcert before starting Secure Boot signing.
      4. Report an explicit compatibility error when the installed sbsigntools version lacks the required option.
      5. Document the minimum supported sbsigntools version for RHEL-compatible distributions.
      6. Preserve the certificate-chain behavior when handling older signing tools.
      7. Consider improving the installer’s final summary so that a completed installation does not obscure Secure Boot signing failures.

      Final Result

      Resolved at the installer/signing stage on Oracle Linux 8 with FOG 1.6.0.127.

      The complete Secure Boot signing process now reports success, and the inspected binaries contain signatures.

      Actual client boot testing with Secure Boot enabled remains pending.

      I hope this helps other Oracle Linux 8, RHEL 8, AlmaLinux 8 and Rocky Linux 8 users encountering similar issues.

      Thank you to the FOG Project developers!

      posted in Bug Reports
      S
      sgennadi
    • RE: FOG 1.6.0.127 — efitools unavailable on Oracle Linux 8 and Secure Boot signing failures

      FOG 1.6.0.127 — Secure Boot signing fails on Oracle Linux 8 due to unsupported sbsign --addcert

      FOG version: 1.6.0.127 (dev-branch)
      OS: Oracle Linux 8 x86_64
      Installed sbsigntools: 0.9.2-1.el8
      Component: Installer / Secure Boot signing

      I have identified the specific reason for the Secure Boot signing failures on Oracle Linux 8.

      The distribution provides sbsigntools-0.9.2-1.el8.x86_64 from EPEL.

      This version does not support sbsign --addcert.

      During the installation, FOG repeatedly reports:

      sbsign: unrecognized option '--addcert'
      

      As a result, three signing stages fail:

      Signing FOS kernels and Memtest86+ for Secure Boot...Failed
      Signing rEFInd for Secure Boot...Failed
      Signing iPXE binaries for Secure Boot...Failed
      

      I found that FOG uses --addcert in lib/common/functions.sh and packages/secureboot/fog-sign-kernel.

      I understand that the option is used to embed the intermediate signing certificate, so simply removing it may break certificate-chain verification.

      The installed Secure Boot key directory contains MOK, PK and KEK key/certificate files. However, I have not yet verified the complete signing-certificate chain.

      Related efitools issue — resolved with workaround

      Oracle Linux 8 repositories did not provide efitools.

      I manually installed the compatible AlmaLinux 8 RPM:

      efitools-1.9.2-9.el8.x86_64

      After that, FOG successfully completed:

      Checking package: efitools...OK
      Publishing Secure Boot variable updates...Done
      

      Suggested improvements

      1. Detect sbsign --addcert support before attempting Secure Boot signing.
      2. Report a clear compatibility error when the installed sbsigntools lacks the required functionality.
      3. Document or provide a compatible signing-tool version for Oracle Linux 8.
      4. Preserve the intended intermediate-certificate trust chain.
      5. Improve the handling of distributions where efitools is not available through native repositories.

      Could you clarify the minimum supported sbsigntools version and the recommended installation method for Oracle Linux 8?

      Thank you.

      posted in Bug Reports
      S
      sgennadi
    • FOG 1.6.0.127 — efitools unavailable on Oracle Linux 8 and Secure Boot signing failures

      FOG 1.6.0.127 — efitools unavailable on Oracle Linux 8 and Secure Boot signing failures

      FOG version: 1.6.0.127 (dev-branch)
      Operating system: Oracle Linux 8 x86_64
      Component: Installer / Secure Boot

      Hello FOG developers,

      I encountered several Secure Boot installation issues while upgrading FOG on Oracle Linux 8.

      1. efitools package unavailable

      The installer initially reported:

      Skipping package: efitools (Does not exist)
      Building efitools (no package for this distro)...Failed
      efitools 1.9.2 did not build
      Publishing Secure Boot variable updates...Skipped
      

      The Oracle Linux 8 CodeReady Builder repository was enabled, but dnf install efitools and dnf repoquery --available '*efitools*' returned no matching package.

      Working workaround

      I found the following EL8-compatible RPM:

      efitools-1.9.2-9.el8.x86_64

      Source: AlmaLinux 8.10 Devel repository.

      https://almalinux.pkgs.org/8/almalinux-devel-x86_64/efitools-1.9.2-9.el8.x86_64.rpm.html

      After manually installing this RPM, the next FOG installation completed the previously failing step:

      Skipping package: efitools (Already Installed)
      Checking package: efitools...OK
      Publishing Secure Boot variable updates...Done
      

      This confirms that FOG recognizes the manually installed package.

      Suggested improvement

      Could the installer improve its handling of efitools on Oracle Linux 8, including checking for an existing compatible installation and providing more useful diagnostics when building from source fails?

      2. Remaining Secure Boot signing failures

      Even after resolving the efitools issue, the installer continues to report:

      Signing FOS kernels and Memtest86+ for Secure Boot...Failed
      Signing rEFInd for Secure Boot...Failed
      Signing iPXE binaries for Secure Boot...Failed
      

      The installer also reports that no Secure Boot CA is available on the server.

      The overall installation finishes with Setup complete, but the Secure Boot signing stages remain unsuccessful.

      Questions

      1. Are these signing failures expected when no Secure Boot CA has been configured?
      2. Should the installer skip signing with a clear warning instead of reporting a generic failure?
      3. Is there a recommended procedure for initializing Secure Boot signing on an existing Oracle Linux 8 installation?
      4. Can the installer provide more specific diagnostics when kernel, rEFInd or iPXE signing fails?

      The exact compiler and signing error output has not yet been analyzed, so I cannot confirm whether these failures share a common root cause.

      Thank you for your work on FOG Project.

      posted in Bug Reports
      S
      sgennadi
    • After updating FOG to version 1.6.0.117, the Management Portal returns HTTP 500 Internal Server

      Project: FOG Project
      Affected version: 1.6.0.117
      Branch: dev-branch
      Commit: 8b579c5cb
      OS: Oracle Linux Server
      PHP: 8.3.36
      Web server: Apache 2.4.37 / PHP-FPM
      Database: MariaDB 10.3
      Severity: High

      Problem Description

      After updating FOG to version 1.6.0.117, the Management Portal returns HTTP 500 Internal Server Error for some browser sessions.

      Apache, PHP-FPM and MariaDB are running correctly.

      Requests without the affected session return HTTP 200, indicating that the problem is associated with session handling rather than general web server availability.

      PHP Fatal Error

      PHP Fatal error:
      Uncaught Error: [] operator not supported for strings
      in FOGBase.php on line 1515

      Call sequence:

      FOGBase::setMessage()
      User::_isLoggedIn()
      User::isLoggedIn()
      Page::_isContentOnly()
      Page::__construct()
      management/index.php

      The error occurs when FOG attempts to queue a session-expiration notification.

      Root Cause

      File: packages/web/src/Base/FOGBase.php
      Method: FOGBase::setMessage()
      Line: 1515

      Current implementation:

      $_SESSION[‘FOG_MESSAGES’][] = [
      ‘title’ => (string)$title,
      ‘body’ => (string)$body,
      ‘type’ => (string)$type
      ];

      The implementation assumes that $_SESSION[‘FOG_MESSAGES’] is always an array.

      However, if the session variable contains a string, PHP throws a fatal error when the array append operator [] is used.

      The origin of the invalid string value has not yet been established.

      This is an application-level type-handling defect, not evidence that the installed PHP version is too old.

      Proposed Fix

      Validate and initialize the session message queue before appending new messages.

      public static function setMessage($body, $title = ‘’, $type = ‘info’)
      {
      if (session_status() !== PHP_SESSION_ACTIVE) {
      return;
      }

      if (!isset($_SESSION['FOG_MESSAGES'])
          || !is_array($_SESSION['FOG_MESSAGES'])
      ) {
          $_SESSION['FOG_MESSAGES'] = [];
      }
      
      $_SESSION['FOG_MESSAGES'][] = [
          'title' => (string)$title,
          'body' => (string)$body,
          'type' => (string)$type
      ];
      

      }

      This defensive check prevents fatal errors when the session message queue contains an unexpected type.

      Recommended Tests

      Missing FOG_MESSAGES session variable.

      FOG_MESSAGES contains a string.

      FOG_MESSAGES contains an empty array.

      FOG_MESSAGES contains previously queued messages.

      Multiple calls to setMessage().

      Expired sessions and login redirects.

      Compatibility with FOGBase::getMessage().

      PHP Version Considerations

      The issue was reproduced with PHP 8.3.36.

      Upgrading PHP is not expected to fix this defect because the application attempts to append an array element to a string.

      The proposed fix is compatible with PHP 8.3 and does not require a newer PHP release.

      Verification

      The installed FOGBase.php was compared with the corresponding file in the dev-branch repository. No differences were found.

      The PHP-FPM error log repeatedly recorded the fatal error during session expiration.

      Unauthenticated requests without the affected session returned HTTP 200.

      The proposed patch still requires regression testing.

      Expected Behavior

      FOG should handle invalid or expired sessions gracefully, without generating HTTP 500 errors.

      The message queue should be initialized safely, and the user should be redirected to the login screen or shown an appropriate session-expiration notification.

      Suggested Resolution

      Apply defensive session-type validation in FOGBase::setMessage() and review FOGBase::getMessage() for similar assumptions.

      Consider investigating where FOG_MESSAGES receives a string value to prevent the underlying state corruption.

      Suggested fix version: Next development build after 1.6.0.117, subject to maintainer approval.

      posted in Bug Reports
      S
      sgennadi
    • Scope preserved NFS no_root_squash warning to image staging export

      Summary
      When STORAGE_rebuild_nfs_exports != yes, configureNFS() currently warns if no_root_squash appears anywhere in /etc/exports.

      That produces a false warning when /images/dev is already configured correctly with all_squash,anonuid=…,anongid=…, but an unrelated read-only export (for example a mounted Linux ISO tree) intentionally uses no_root_squash.
      Change
      Add nfsDevExportHasNoRootSquash() and scope the check to exactly:

      ${STORAGE_image_share_path}/dev

      The warning still appears when the image staging export itself uses no_root_squash, but unrelated exports no longer trigger it.
      Regression coverage
      tests/nfs-preserved-exports-warning.test.sh covers:

      • safe /images/dev plus an ISO export using no_root_squash -> no warning condition
      • /images/dev using no_root_squash -> warning condition
      • similarly named paths and commented lines -> ignored
      • configureNFS() actually uses the scoped helper
        Reproduction
        Example preserved exports:
      /images *(ro,sync,no_wdelay,subtree_check,insecure_locks,all_squash,anonuid=1002,anongid=1002,fsid=0)
      /images/dev *(rw,async,no_wdelay,subtree_check,all_squash,anonuid=1002,anongid=1002,fsid=1)
      /var/www/html/ISO/Ubuntu/26.04X64/ *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
      

      The existing global grep -q “no_root_squash” “$nfsconfig” reports that captures land as root even though the /images/dev export is already ownership-safe.

      diff --git a/lib/common/functions.sh b/lib/common/functions.sh
      --- a/lib/common/functions.sh
      +++ b/lib/common/functions.sh
      @@ -1,3 +1,14 @@
      +nfsDevExportHasNoRootSquash() {
      +    local config="$1"
      +    local devpath="${STORAGE_image_share_path%/}/dev"
      +    [[ -f "$config" ]] || return 1
      +    awk -v path="$devpath" '
      +        $1 == path && /(^|[,(])no_root_squash([,)]|$)/ {
      +            found=1
      +        }
      +        END { exit !found }
      +    ' "$config"
      +}
       configureNFS() {
           dots "Setting up NFS configuration file"
           if [[ -f "/etc/nfs.conf" ]]; then
      @@ -25,7 +36,7 @@
           dots "Setting up exports file"
           if [[ ${STORAGE_rebuild_nfs_exports} != yes ]]; then
               echo "Skipped"
      -        if [[ -f "$nfsconfig" ]] && grep -q "no_root_squash" "$nfsconfig"; then
      +        if nfsDevExportHasNoRootSquash "$nfsconfig"; then
                   echo
                   echo "  ** WARNING: ${nfsconfig} still exports with no_root_squash."
                   echo "  ** Captures land as root, so moving the image out of"
      diff --git a/tests/nfs-preserved-exports-warning.test.sh b/tests/nfs-preserved-exports-warning.test.sh
      new file mode 100755
      --- /dev/null
      +++ b/tests/nfs-preserved-exports-warning.test.sh
      @@ -0,0 +1,89 @@
      +#!/bin/bash
      +#
      +# The preserved-exports warning must only inspect the image staging export.
      +# An unrelated read-only ISO export may intentionally use no_root_squash and
      +# must not make FOG claim that /images/dev will capture files as root.
      +#
      +# Usage: bash tests/nfs-preserved-exports-warning.test.sh
      +
      +root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
      +functions="$root/lib/common/functions.sh"
      +
      +pass=0
      +fail=0
      +
      +pass_case() {
      +    pass=$((pass + 1))
      +}
      +
      +fail_case() {
      +    fail=$((fail + 1))
      +    printf '  FAIL  %s\n' "$1"
      +}
      +
      +if [[ ! -r $functions ]]; then
      +    echo "FAIL: cannot read $functions" >&2
      +    exit 1
      +fi
      +
      +# Load only the helper under test. Sourcing all of functions.sh would make
      +# this small unit test depend on the installer's global setup.
      +helper=$(
      +    awk '
      +        /^nfsDevExportHasNoRootSquash\(\) \{/ { emit=1 }
      +        emit { print }
      +        emit && /^}/ { exit }
      +    ' "$functions"
      +)
      +if [[ -z $helper ]]; then
      +    echo "FAIL: nfsDevExportHasNoRootSquash() not found" >&2
      +    exit 1
      +fi
      +eval "$helper"
      +
      +tmp=$(mktemp)
      +trap 'rm -f "$tmp"' EXIT
      +STORAGE_image_share_path=/images
      +
      +cat > "$tmp" <<'EOF_CASE'
      +/images *(ro,sync,all_squash,anonuid=1002,anongid=1002,fsid=0)
      +/images/dev *(rw,async,all_squash,anonuid=1002,anongid=1002,fsid=1)
      +/var/www/html/ISO/Ubuntu/26.04X64/ *(ro,sync,no_root_squash,insecure)
      +EOF_CASE
      +if nfsDevExportHasNoRootSquash "$tmp"; then
      +    fail_case "unrelated ISO no_root_squash does not trigger warning"
      +else
      +    pass_case
      +fi
      +
      +cat > "$tmp" <<'EOF_CASE'
      +/images *(ro,sync,all_squash,anonuid=1002,anongid=1002,fsid=0)
      +/images/dev *(rw,async,no_root_squash,fsid=1)
      +EOF_CASE
      +if nfsDevExportHasNoRootSquash "$tmp"; then
      +    pass_case
      +else
      +    fail_case "/images/dev no_root_squash triggers warning"
      +fi
      +
      +cat > "$tmp" <<'EOF_CASE'
      +/images/dev *(rw,async,all_squash,anonuid=1002,anongid=1002,fsid=1)
      +/images-old/dev *(rw,async,no_root_squash,fsid=2)
      +# /images/dev *(rw,no_root_squash)
      +EOF_CASE
      +if nfsDevExportHasNoRootSquash "$tmp"; then
      +    fail_case "prefix paths and comments do not trigger warning"
      +else
      +    pass_case
      +fi
      +
      +if ! grep -q 'if nfsDevExportHasNoRootSquash "$nfsconfig"; then' "$functions"; then
      +    echo "  FAIL  configureNFS does not use nfsDevExportHasNoRootSquash" >&2
      +    fail=$((fail + 1))
      +else
      +    pass=$((pass + 1))
      +fi
      +
      +echo "ok $pass"
      +[[ $fail -eq 0 ]] || { echo "FAIL ($fail of $((pass + fail)))" >&2; exit 1; }
      +exit 0
      
      posted in Bug Reports
      S
      sgennadi
    • RE: Version 1.6.0-beta.3187 ipxe 2.0.0.x problems

      Working 👍

      posted in Bug Reports
      S
      sgennadi
    • RE: Version 1.6.0-beta.3187 ipxe 2.0.0.x problems

      Are you plan secure boot fog kernel ?

      posted in Bug Reports
      S
      sgennadi
    • RE: Fog 1.6.0-beta.2141 remove folder with image

      ** WARNING: /etc/exports still exports with no_root_squash.
      ** Captures land as root, so moving the image out of
      ** /images/dev fails with ‘550 Rename failed’.
      ** Replace the /images/dev export options with:
      ** all_squash,anonuid=1002,anongid=1002

      Fixed problem

      posted in Bug Reports
      S
      sgennadi
    • RE: Version 1.6.0-beta.3187 ipxe 2.0.0.x problems

      @Tom-Elliott
      Fixed keyboard and kernel panic 🙂

      posted in Bug Reports
      S
      sgennadi
    • Version 1.6.0-beta.3187 ipxe 2.0.0.x problems

      Then I use latest ipxe 2.0.0.x on Lenovo M80t / M70t Gen3 keyboard not worked ,
      if i change ipxe.efi to snponly.efi

      sudo cp -a /tftpboot/ipxe.efi /tftpboot/ipxe.efi.backup
      sudo cp -f /tftpboot/snponly.efi /tftpboot/ipxe.efi

      keyboard worked but receive kernel panic:

      Kernel panic - not syncing:
      VFS: Unable to mount root fs on “/dev/ram0”
      or unknown-block(1,0)
      2eb438c5-1849-4fca-b922-b4e3a2c38097-image.png

      if I use old snponly.efi 2.0.0.0 all work

      posted in Bug Reports
      S
      sgennadi
    • RE: Windows 11 | 65x HP Z2 Tower G1i | UPDATE -

      Please check memory of computer with memtest86+ 8.0

      https://www.memtest.org/

      posted in FOG Problems
      S
      sgennadi
    • IPXE 2.0 Secure Boot Working

      Hi, i try IPXE 2.0 and Secure Boot worked… Please add support of IPXE 2.0 to fog devel branch
      → shimx64.efi
      → ipxe.efi /snponly.ipxe
      → autoexec.ipxe
      → FOG menu

      https://github.com/ipxe/ipxe/releases/tag/v2.0.0

      posted in General
      S
      sgennadi
    • RE: Fog 1.6.0-beta.2141 remove folder with image

      Every time after updating to a new build, the first image works, but the next one doesn’t.

      posted in Bug Reports
      S
      sgennadi
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 1 / 6