Learn about Centmin Mod LEMP Stack today
Register Now

[Solved] Bug SELinux detection failing on AlmaLinux 8 LXC

Discussion in 'AlmaLinux 8 & Rocky Linux 8 Beta Testing' started by atomi, Dec 27, 2023.

  1. atomi

    atomi New Member

    21
    8
    3
    Jul 14, 2018
    Ratings:
    +17
    Local Time:
    7:21 AM
    1.25.x
    10
    I've been running AlmaLinux 8 with CMM in production couple months and now wanted to spin another similar box but installer is failing in SELinux detection. Installer worked without any issues last time in similar LXC server.

    Using following command in clean almalinux 8
    Code:
    # curl -4sL https://centminmod.com/installer-el8x-74.sh -o installer-el8x-74.sh; bash installer-el8x-74.sh
    After it installs glibc, it gives following error in SELinux detection
    Code:
    Detected SELinux NOT disabled for EL8
    Adding selinux=0 to Kernel GRUB_CMDLINE_LINUX line in /etc/default/grub
    Regenerating GRUB2 configuration
    GRUB2 configuration file not found for your distribution. Please check the file paths and update the  script accordingly.
    Deleting lines 307-398 from installer-el8x-74.sh will give me nicely working CMM in AlmaLinux 8


    Used same almalinux-8-default_20210928_amd64.tar.xz LXC template in Proxmox as I did last time so something has been changed in that installer which is now giving error if there are not grub2 config files

    Some info about virtual server
    Code:
    # uname -a
    Linux al8cmm 5.15.107-2-pve #1 SMP PVE 5.15.107-2 (2023-05-10T09:10Z) x86_64 x86_64 x86_64 GNU/Linux
    # virt-what
    lxc
    
    
     
    Last edited: Dec 27, 2023
  2. eva2000

    eva2000 Administrator Staff Member

    51,981
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:21 PM
    Nginx 1.25.x
    MariaDB 10.x
    LXC container support isn't really tested/supported so nothing has changed. But when was last time you tested EL8 installer on Almalinux 8 LXC?

    The lines you deleted are routines ran if non-docker container is detected
    Code (Text):
    if [ ! -f /.dockerenv ]; then
    ...
    fi
    

    I guess I could also add non-LXC/LXD detection too. Though I haven't tested it at all with LXC/LXD containers so no idea of potential issues with EL7/EL8/EL9
     
  3. atomi

    atomi New Member

    21
    8
    3
    Jul 14, 2018
    Ratings:
    +17
    Local Time:
    7:21 AM
    1.25.x
    10
    yes that working AlmaLinux 8 CMM is running in LXC. I've been running EL7 CMM in production with LXC few years so I would say its working smoothly. The only thing which is currently not working EL8 with LXC is the installer which I think could occur even with KVM if its not having grub2
     
  4. eva2000

    eva2000 Administrator Staff Member

    51,981
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    2:21 PM
    Nginx 1.25.x
    MariaDB 10.x
    I just committed an update in 130.00beta01 so LXC is accounted for too. So you can at least run the installer. But I haven't tested with LXD/LXC containers so no idea of if everything is working.
     
  5. atomi

    atomi New Member

    21
    8
    3
    Jul 14, 2018
    Ratings:
    +17
    Local Time:
    7:21 AM
    1.25.x
    10
    Tested the latest 130.00beta01 with my AlmaLinux 8 LXC and now its working without needing any modifications to installer. I think everything else will be working as before

    Code:
    # nginx -V
    nginx version: nginx/1.25.3 (271223-192813-almalinux8-lxc-5b95db8-br-a71f931)