Solved Possible values of compat.linux.osrelease?

  • Thread starter Deleted member 63539
  • Start date
D

Deleted member 63539

Guest
Mine is:
Code:
$ sysctl compat.linux.osrelease
compat.linux.osrelease: 2.6.32

When login to a Sparky Linux Jail (Debian Stretch), it said: FATAL: kernel too old
 
Let me describe the problem more clearly:

I attempted to create a Sparky Linux Jail (Debian Stretch) this way:

Download Sparky Linux Stable XFCE from there: https://sparkylinux.org/download/stable/

Extract the iso.

Use unsquashfs to extract the live file system into /LINUX (it's a ZFS file system).

Setup a /etc/jail.conf (same as here: https://forums.freebsd.org/threads/how-to-create-a-linux-jail.76439/#post-471997)

When I run jexec LINUX /bin/bash, it said my kernel is too old.

The kernel used in Sparky Linux Stable XFCE (Debian Stretch) is 4.19. I tried to change compat.linux.osrelease to 4.19 but it's an invalid value.

Chroot into it have the same error.

Without chroot into it, just run /LINUX/usr/bin/uname and many other small applications in /LINUX/usr/bin is fine.

I found I could run Linux binary build with Linux 2.6.x ABI without problems (e.g: Zulu's JDK for Linux):

Code:
$ file zulu8/bin/java
zulu8/bin/java: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=28776999226f5f7862f83a2196a525868ad8a008, not stripped

And the troubled /LINUX/bin/bash is build with Linux 3.2.0 ABI.

I tried to set compat.linux.osrelease to 3.2.0. It's an valid value so it's accepted. Now compat.linux.osrelease is 3.2.0. jexec LINUX /bin/bash now fine. But the trouble just beginning!

When I attempt to run any binary (e.g: ls), it's just segmentation fault!

So binary target Linux 2.6.x is fine. But where on earth I could find a Linux distro that still target 2.6.x ABI? There used to be Debian Jessie, but that's EOL-ed!

Because of this problem, I have the idea to reuse /compat/linux as a base for my Linux jail here: https://forums.freebsd.org/threads/how-to-create-a-linux-jail.76439/#post-471997 But unfortunately, the jail is too bare metal and it doesn't have network connection.
 
Not sure which ABI version is used for the compatibility. But whichever version that's used as the basis you can be sure it's not entirely feature complete. It's not a "full" compatibility. It works for most things, not for everything.
 
Sorry everyone. I forgot the current Debian Stable is Buster. Sparky Stable XFCE (5.12) is Buster, not Stretch. Stretch is still target 2.6.x ABI and my previous statement about a Linux distro still target 2.6.x is plain wrong. I downloaded Sparky Stable LXDE (4.12) and have a working jail now, except network connection. But that's for another thread, I will mark this thread as SOLVED.

p/s: You could get Sparky Stable LXDE (4.12) here: https://sparkylinux.org/download/oldstable/
 
Do I get it right: you're trying to replace the CentOS (RedHat) /compat/linux shim stuff by some Debian-based installation in your jail? If that works, great! Didn't FreeBSD have some Debian/GNU Linux ports before switching to CentOS?
 
Do I get it right: you're trying to replace the CentOS (RedHat) /compat/linux shim stuff by some Debian-based installation in your jail? If that works, great! Didn't FreeBSD have some Debian/GNU Linux ports before switching to CentOS?
No. I'm only want a Linux jail. I don't want to replace the CentOS shim. The Linux distro I choose is the one I previously used before switch to FreeBSD. All of this just to have a Linux build environment to build software for Linux. Previously I did try to build a cross compiler to Linux with GCC, but failed. I want to evaluate the jail solution before going with bhyve (the Linux VM route). Just that.
 
Back
Top