unRAID kernel with 32bit support


p0fi

Recommended Posts

The docker container which should run the 32bit binary is part of a rather complex setup of docker containers responsible for cross compiling some embedded linux software. Its required that it runs in this container side by side of some other containers. Due to this fact a VM is rather hard to use.

Link to comment

Due to this fact a VM is rather hard to use.

It would be easier for you to set up a multiple docker cluster in a VM than it would be for Limetech to setup and support a 32bit V6 unraid.

 

VM's are what you do when your native environment doesn't provide the tools you need. The clean break from 32bit support was one of the major reasons V6 is where it is now, so I don't see a case to force 32bit back into unraid. A VM is a clean, supportable, portable environment well suited for complex interactions like you are describing. Set it up properly once, and you don't have to worry about a change in unraid breaking your complex toolchain.

Link to comment
  • 4 months later...

Hypothetically, if 32 bit support was enabled in the unRaid kernel, would that let the docker use its own internal 32 bit libraries to run the 32 bit program?  

 

We are not wanting unRaid to support a 32 bit platform, jwe are just wanting to be able run a docker that requires 32 bit support.  My problem is Valve and there refusal to release a 64 bit version of steamcmd.  Based on what I have read, the kernel needs 32 bit support enabled for the docker to be able run the 32 bit executable's.

Link to comment

Could it be as trivial as enabling it in the kernel?  The docker contains the 32 bit libraries, and we are not trying to support 32 bit hardware.  I just want to run a 32 bit binary in the docker.  From what I understand, the docker uses the system kernel so the way I see it, the kernel is blocking the docker from letting its internal 32 bit libraries to work, because from the dockers perspective, the kernel does not have 32 bit support enabled.

 

I would be willing to test a kernel if someone could set one up with 32 bit support enabled.  Hell it will either work or it will not work, if it works, you just found a way to allow your user base to run dockers with 32 bit programs without having to compromise unRaid.  The goal would be to download a test kernel with on 1 change, 32 bit support enabled, install it on my system and see what happens.

Link to comment
1 hour ago, CHBMB said:

What change does the make menuconfig need?

Sent from my LG-H815 using Tapatalk
 

Under Executable file formats / Emulations, IA32 Emulation would have to be enabled.  I am not sure about the a.out option.  Let me do this, I am going to build a slackware64 vm and do some testing.  I will post back to this thread the results of my testing.

Link to comment
1 minute ago, CHBMB said:

Just read the link from@saarg, sounds an awful lot of effort. Can't see LT going for this as it looks like it needs packages from a non-official source. I'm at work right now, so need to have a more detailed read.

Sent from my LG-H815 using Tapatalk
 

What I am going to attempt to do is recreate a Slackware64 environment similar to unRaid.  Then try to run my docker that contains the 32 bit executable and see if it runs.  It should fail which will mean I have simulated the issue I am having in unRaid at the moment.  Then I am going to build a new kernel and enable only IA32 emulation.  I am not going to install the libraries on the VM.  Then I am going to try and run the docker again to see if just enabling IA32 in the kernel allow the 32 bit executable to run inside the docker.  My goal is not to allow the unraid os to run a 32 bit executable, it is to allow a docker that has the 32 bit libraries installed to run the 32 bit executable.  I have nothing to loose at this point.  If it works, the power that be can then decide what to do with this new information.  

 

I do not mind spending the time on this, but I have never installed Slackware64 so if someone could point me to an install guide it would be much appreciated.  I would also really like to build the kernel the same way unRaid is built.  This would be an even better test.  This way i am not wasting everyone's time on a theory, just my own.

  • Upvote 1
Link to comment
1 hour ago, BRiT said:

 

I have a few threads already in the unRAID forums that discusses how to do this from back in the 5.0 days.

 

Can't find them now though.

 

This one? I only had to go through a couple of thousand of your posts xD

 

  • Upvote 1
Link to comment

Is it possible to get a copy of unRaid 6.3 .config file?  Based on my initial findings, more to come later, it would appear that by simply enabling IA32 will allow a docker with the 32 bit libraries installed to run a 32 bit binary.  This would mean that the powers that be would only have to enable IA32 in the kernel and would not have to install additional libraries and pollute the unRaid OS with additional 32 bit garbage.

 

I would like to try to configure my test slackware64 kernel as close to unRaid 6.3 as possible.  Once I am done testing, I will post a compete step by step on what I did.

Edited by csmccarron
Link to comment

Here are the steps taken and the results of my testing.  If the unRaid 6.3 kernel has IA32 enabled and no 32 bit libraries are added to the unRaid 6.3 operating system, it should allow a docker running a 32 bit binary and 32 bit libraries installed to run.


1.  Created a unRaid 6.3 slackware VM that was install from slackware64-14.2-install-dvd.iso.

 

2.  Installed docker (17.03.1) and its dependents from https://slackbuilds.org/repository/14.2/system/docker/

 

3.  The default slackware64 huge kernel build has IA32 and X32 enabled by default.
      #
      # Executable file formats / Emulations
      #
      CONFIG_BINFMT_ELF=y
      CONFIG_COMPAT_BINFMT_ELF=y
      # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
      CONFIG_BINFMT_SCRIPT=y
      # CONFIG_HAVE_AOUT is not set
      CONFIG_BINFMT_MISC=m
      CONFIG_COREDUMP=y
      CONFIG_IA32_EMULATION=y
      # CONFIG_IA32_AOUT is not set
      CONFIG_X86_X32=y
      CONFIG_COMPAT=y
      CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
      CONFIG_SYSVIPC_COMPAT=y
      CONFIG_KEYS_COMPAT=y
      CONFIG_X86_DEV_DMA_OPS=y
      CONFIG_PMC_ATOM=y
      CONFIG_NET=y
      CONFIG_COMPAT_NETLINK_MESSAGES=y
      CONFIG_NET_INGRESS=y

 

3.  Downloaded the steamcmd into the root folder.
      root@slackware64:~# curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
      root@slackware64:~# ls
      ark/  linux32/  steam.sh*  steamcmd.sh
      root@slackware64:~# ls /root/linux32/steamcmd
      /root/linux32/steamcmd

 

4.  When I attempted to executed steamcmd.sh I received a weird error.  I am going to assume that this is because there are no 32 bit libraries installed

     on slackware64 server.
       root@slackware64:~# ./steamcmd.sh
       ./steamcmd.sh: line 29: /root/linux32/steamcmd: No such file or directory

 

5.  Installed Ark-docker using the following command and the Ark server started up and was visible on my LAN.
      docker run -it -p 7778:7778 -p 7778:7778/udp -p 27015:27015 -p 27015:27015/udp -p 32330:32330 -e SESSIONNAME=myserver -e ADMINPASSWORD="mypasswordadmin" -e AUTOUPDATE=120 -e AUTOBACKUP=60 -e WARNMINUTE=30 -v /root/ark:/ark --name ark bigdaddymccarron/ark-docker:beta
      Changing steam uid to 1007.
      Changing steam gid to 281.
      ###########################################################################
      # Ark Server -  Sun Jun 18 02:51:51 UTC 2017 
      # UID 1007 - GID 281
      ###########################################################################
      No game files found. Installing...
      Running command 'install' for instance 'main'
        ... No crontab set.
       Running command 'start' for instance 'main'
       Updating server
       Downloading mod 111111111 ... Mod 111111111 was not successfully downloaded
       Your server is already up to date! The most recent version is 1894445.
       The server is starting...
       The server is now running, and should be up within 10 minutes
       Waiting...

6.  Recompiled the kernel using the .config file from unRaid 6.3.
      #
      # Executable file formats / Emulations
      #
      CONFIG_BINFMT_ELF=y
      CONFIG_COMPAT_BINFMT_ELF=y
      # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
      CONFIG_BINFMT_SCRIPT=y
      # CONFIG_HAVE_AOUT is not set
      # CONFIG_BINFMT_MISC is not set
      CONFIG_COREDUMP=y
      # CONFIG_IA32_EMULATION is not set
      # CONFIG_IA32_AOUT is not set
      # CONFIG_X86_X32 is not set
      CONFIG_COMPAT=y
      CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
      CONFIG_SYSVIPC_COMPAT=y
      CONFIG_KEYS_COMPAT=y
      CONFIG_X86_DEV_DMA_OPS=y
      CONFIG_PMC_ATOM=y
      CONFIG_NET=y
      CONFIG_NET_INGRESS=y

 

7.  Installed the updated kernel an tried to execute ./steamcmd.sh again and got a different error.
      root@slackware64:~# ./steamcmd.sh
      ./steamcmd.sh: line 29: /root/linux32/steamcmd: cannot execute binary file: Exec format error

 

8.  I delete the Ark docker container and image and the files it downloaded to the /root/ark folder the repeated step 5 with the following results.  This

     means the kernel does not have IA32 enabled.
      docker run -it -p 7778:7778 -p 7778:7778/udp -p 27015:27015 -p 27015:27015/udp -p 32330:32330 -e SESSIONNAME=myserver -e ADMINPASSWORD="mypasswordadmin" -e AUTOUPDATE=120 -e AUTOBACKUP=60 -e WARNMINUTE=30 -v /root/ark:/ark --name ark bigdaddymccarron/ark-docker:beta
      Changing steam uid to 1007.
      Changing steam gid to 281.
      ###########################################################################
      # Ark Server -  Sun Jun 18 13:03:37 UTC 2017
      # UID 1007 - GID 281
      ###########################################################################
      No game files found. Installing...
      Running command 'install' for instance 'main'
      ... No crontab set.
      Running command 'start' for instance 'main'
      Updating server
      /home/steam/steamcmd/steamcmd.sh: line 29: /home/steam/steamcmd/linux32/steamcmd: cannot execute binary file: Exec format error
      Your server is already up to date! The most recent version is Unknown.
      The server is starting...
      The server is now running, and should be up within 10 minutes
      Waiting...

 

9.  I reconfigured the kernel based on unRaid 6.3 .config only enabling IS32 Emulation and recompiled it.
      #
      # Executable file formats / Emulations
      #
      CONFIG_BINFMT_ELF=y
      CONFIG_COMPAT_BINFMT_ELF=y
      # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
      CONFIG_BINFMT_SCRIPT=y
      # CONFIG_HAVE_AOUT is not set
      # CONFIG_BINFMT_MISC is not set
      CONFIG_COREDUMP=y
      CONFIG_IA32_EMULATION=y
      # CONFIG_IA32_AOUT is not set
      # CONFIG_X86_X32 is not set
      CONFIG_COMPAT=y
      CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
      CONFIG_SYSVIPC_COMPAT=y
      CONFIG_KEYS_COMPAT=y
      CONFIG_X86_DEV_DMA_OPS=y
      CONFIG_PMC_ATOM=y
      CONFIG_NET=y
      CONFIG_NET_INGRESS=y

 

10.  I delete the Ark docker container and image and the files it downloaded to the /root/ark folder the repeated step 5 with the following results.

       SUCCESS!  The server started and was available on my local LAN.
       docker run -it -p 7778:7778 -p 7778:7778/udp -p 27015:27015 -p 27015:27015/udp -p 32330:32330 -e SESSIONNAME=myserver -e ADMINPASSWORD="mypasswordadmin" -e AUTOUPDATE=120 -e AUTOBACKUP=60 -e WARNMINUTE=30 -v /root/ark:/ark --name ark bigdaddymccarron/ark-docker:beta
       Changing steam uid to 1007.
       Changing steam gid to 281.
       ###########################################################################
       # Ark Server -  Sun Jun 18 16:58:04 UTC 2017
       # UID 1007 - GID 281
       ###########################################################################
       No game files found. Installing...
       Running command 'install' for instance 'main'
        ... No crontab set.
       Running command 'start' for instance 'main'
       Updating server
       Downloading mod 111111111 ... Mod 111111111 was not successfully downloaded
       Your server is already up to date! The most recent version is 1894445.
       The server is starting...
       The server is now running, and should be up within 10 minutes
       Waiting...
 

 

Does this make it possible to enable IA32 on future kernels to allow dockers requiring 32 bit kernel support to work?

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.