For the complete documentation index, see llms.txt. This page is also available as Markdown.

18.3 Ubuntu/Debian/Kali Linux Compatibility Layer

This section covers building Ubuntu 22.04/26.04 LTS compatibility layers on FreeBSD using debootstrap and WSL, along with Debian 13/Kali Linux build scripts.

Ubuntu Compatibility Layer

Ubuntu Compatibility Layer

Additionally, a Debian compatibility layer can be built using a similar method. For support status of other systems, see the /usr/local/share/debootstrap/scripts/ directory.

Start Building the Ubuntu Compatibility Layer (Based on Ubuntu 22.04 LTS)

Before building, you need to enable the relevant daemons and services:

Build the Ubuntu 22.04 LTS base system:

Specifying the Compatibility Layer Path

After building, you must mount the necessary file systems. Point the Linux compatibility layer default path to /compat/ubuntu to enable automatic mounting of the relevant file systems.

Take effect immediately:

Permanent setting:

Setting the Linux Kernel Version

You may need to set an appropriate Linux kernel version; otherwise, chroot will prompt FATAL: kernel too old.

7.0.11 is only an example; it is recommended to refer to the version numbers published on The Linux Kernel Archives.

Restart the Linux compatibility layer service:

Entering the Ubuntu Compatibility Layer

After completing file system mounting and kernel version settings, enter the Ubuntu compatibility layer to continue configuration.

chroot into the Ubuntu compatibility environment and remove software that may cause errors:

Switching Ubuntu Software Sources

Changing the software sources of the Ubuntu compatibility layer can improve download speeds.

After uninstalling rsyslog, you must change the software sources; since SSL certificates have not been updated yet, HTTPS sources cannot be used temporarily.

Use a text editor to edit the APT software source configuration file /compat/ubuntu/etc/apt/sources.list in the Ubuntu compatibility environment, and write the software sources:

Enter the Ubuntu compatibility layer, start updating the system, and install commonly used software:

Appendix: Ubuntu Compatibility Layer Script (Based on Ubuntu 26.04 LTS)

Ubuntu 26.04 LTS compatibility layer:

Ubuntu 26.04 LTS Compatibility Layer

The script content is as follows:

Appendix: Debian 13 / Kali Linux Compatibility Layer

Debian 13 compatibility layer:

Debian 13 Compatibility Layer

Kali Linux compatibility layer:

Kali Linux Compatibility Layer

The script content is as follows:

Appendix: Running X11 Software

Allow all local users to access the current X Server instance:

Troubleshooting and Unfinished Items

What is the Command-line Launch Command for a Program?

Search in the following order (using gedit as an example):

  • Execute the package name directly: # gedit;

  • Use whereis package_name to locate it, then execute. whereis gedit;

  • Locate through the software icon: navigate to the /usr/share/applications directory, find the corresponding file by package name, and open it with a text editor (such as ee, nano) (the .desktop file is a text file, not a symlink or image), find the program launch command within it and copy it to the terminal to run.

  • Search globally using the find command (e.g., # find / -name gedit).

How to search for software?

Replace XXX with the name of the software you want to search for.

Missing .so Files

  • First check which .so files are missing; usually more than one is absent.

Based on the output libffmpeg.so => not found, determine that "libffmpeg.so" is missing.

  • Install the tool

  • Check which package the libffmpeg.so file belongs to:

Multiple packages provide this file; install any one of them.

  • Copy the file according to the above path and refresh the ldd cache:

  • Check the dynamic library dependencies of the executable /usr/bin/qq again:

References

Last updated