Solved /proc/ is not mounted error when I try to chroot ubuntu 23.10 installed inside the Linuxulator...

Hello.

my Linuxulator is misconfigured and I don't understand why,because everything seems correctly configured to my eyes.

Code:
[mario@marietto /compat]==> ./start-ubuntu2310

access control disabled, clients can connect from any host
compat.linux.emul_path: /compat/ubuntu2310 -> /compat/ubuntu2310
compat.linux.emul_path: /compat/ubuntu2310 -> /compat/ubuntu2310
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]? y

but when I do :

Code:
marietto# systemctl

the error comes up :

Code:
⚠️ /proc/ is not mounted. This is not a supported mode of operation. Please fix your invocation environment to mount /proc/ and /sys/ properly. Proceeding anyway. Your mileage may vary.

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

I don't understand why the first error , "/proc/ is not mounted" ; because I mounted proc on my fstab file like this :

Code:
fdesc            /dev/fd                      fdescfs       rw                0    0
proc             /proc                        procfs        rw                0    0

linprocfs        /compat/ubuntu2310/proc      linprocfs     rw                0    0
linsysfs         /compat/ubuntu2310/sys       linsysfs      rw                0    0

that "proc" is correctly mounted can be seen even within the chrooted ubuntu 23.10 installed inside the linuxulator :

Code:
marietto# ls /proc

0    15  2976  3521  4805  4850  4858  4898  4928  4983  5011  5607  7304  7663  7817  8166  cmdline      mtab          uptime
1    16  2979  3522  4806  4851  4868  4899  4929  4992  52    5610  7339  7675  7819  8167  cpuinfo      net          version
10   17  3     3560  4834  4852  4880  4905  4931  4995  53    5612  7340  7678  7944  8168  devices      partitions
11   18  3057  3570  4837  4853  4881  4907  4932  4996  5323  5616  7648  7679  7945  8192  filesystems  scsi
12   19  3177  3589  4839  4854  4884  4909  4934  5     5327  6     7652  7811  7951  8243  loadavg      self
13   2     3190  3618  4842  4855  4888  4915  4940  5001  54    7     7653  7812  7952  8265  meminfo      stat
14   20  3403  4     4844  4856  4890  4919  4942  5007  5472  7298  7654  7813  8     9     modules      swaps
143  21  3425  4804  4845  4857  4895  4925  4959  5009  55    7303  7656  7816  8093  bus   mounts      sys
 
I know that systemd does not work. What I didn't know is if the first error (proc and sys not mounted) was connected to the second one ; if there was a link of cause and effect between the errors. From your sentence,it seems there is. Point is that I see the proc error even if I don't invoke "systemctl".
 
i get the /proc error as well
systemctl doesnt work in the linuxulator or a jail

systemd doesnt work on Freebsd (thank god) so it wont work in a jail or the linuxulator

because there is no systemd you cant install the gnome desktop or snaps
i also noticed flatpak doesnt work either but im not sure if that related to systemd or a seperate issue
 
I'm trying to install Ubuntu 24.04 inside the Linuxulator. Something is changed on the 24.04 because,I was able to install the 23.10 even if I got the systemd error,but now the installation stucks totally there. Someone has a trick to be able to complete the installation like happened until 23.04 ?

Code:
57 upgraded, 62 newly installed, 43 to remove and 756 not upgraded.
100 not fully installed or removed.
Need to get 0 B/51.8 MB of archives.
After this operation, 84.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_COLLATE = "C",
    LANG = "it_IT.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up systemd (255.4-1ubuntu8.4) ...
/proc/ is not mounted, but required for successful operation of systemd-tmpfiles. Please mount /proc/. Alternatively, consider using the --root= or --image= switches.
Failed to take /etc/passwd lock: Invalid argument
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 systemd
 
"Setting up systemd" sounds like a threat.

I don't think you should be seeing that.

Does this tree work in a chroot on a Linux machine?
 
Ubuntu 24.04 and later version dont work in a jail because of systemd issues
and so they dont work with the linuxulator either

i mentioned the problem on the forum

thats why you need to use rocky linux
especially if you want to use the propriety nvidia drivers so they match the version on the freebsd host


note you cant install the propriety nvidia drivers on debian
you can only install them with apt
 
I like these kind of challenges. I'm already at work for fixing the systemd error using some creative way.
 
I realized that ubuntu 23.10 does not have this kind of problem. I can install everything even if it complains that systemd is not installed. Starting with ubuntu 24.04 something is changed inside the code. Now if it is not able to install systemd,it will not continue letting you install anything else. I tried to fool Ubuntu using this tecnique :


but it failed because the code of genie contains a check that detect if we are using WSL or not and since it can't find it,it won't run. Its code is encrypted so we can't put our hands on it. It's a shame. But I want to find if there are some other tecniques like that with an open code that can be modified for our needs.
 
Code:
linux_base-rl9-9.4             Base set of packages needed in Linux mode (Rocky Linux 9.4)

 
I found this interesting hack :


the code is easy to understand /for users who have some knowledge of shell scripting/ ; not me. At least mine is low,but not null. The script try to "demonize" systemd and it worked when I played with WSL a lot of years ago. I've thought,why not try it with Ubuntu installed within the Linuxulator ? with some little modifications it could work. I've analyzed the source code,I tried to study it and I found the point where it produces an error,that unfortunately I'm not able to fix...this is the line :

Code:
root@marietto:/# SYSTEMD_PID="$(ps -eo pid=,args= | awk '$2" "$3=="'"$SYSTEMD_EXE"'" {print $1}')"
fatal library error, reap

I know for sure that the variable $SYSTEMD_EXE is set :

Code:
root@marietto:/# echo $SYSTEMD_EXE
/lib/systemd/systemd --unit=basic.target

I suspect the error is produced by the ps or awk command. You can find the full code here :

 
you can enable systemd in recent versions of wsl

systemd doesnt work on freebsd at all
so i doubt a script written for wsl from several years ago will magically make it work

id forget about using Ubuntu it use systemd for literally everything now
and is impossible to removed it

just use Rocky Linux
Freebsd even has a package for rocky linux for the linuxulator

or you can download the rocky linux tar.gz and manually install it
 
you can enable systemd in recent versions of wsl

systemd doesnt work on freebsd at all
so i doubt a script written for wsl from several years ago will magically make it work

id forget about using Ubuntu it use systemd for literally everything now
and is impossible to removed it

just use Rocky Linux
Freebsd even has a package for rocky linux for the linuxulator

or you can download the rocky linux tar.gz and manually install it

I don't want to enable systemd in WSL. I'm not interested in WSL.

-> systemd doesnt work on freebsd at all. so i doubt a script written for wsl from several years ago will magically make it work

Leave alone the magic. There is a scientific tecnique behind the script. And don't be so skeptical, believe more in what you do, even when it seems impossible. Believe it.

-> just use Rocky Linux,Freebsd even has a package for rocky linux for the linuxulator or you can download the rocky linux tar.gz and manually install it

I don't like to win easy. I like the challenges. By now you should have already gotten to know me.
 
im just trying to save you some time

i spent several weeks trying to get the latest version of Ubuntu to work
both in a Jail and with the Linuxulator

i created custom debootstrap script to install the latest Ubuntu
that didnt work systemd errors

i also used a Ubuntu base image and extracted the contents into a Jail and a Linuxulator chroot
also doesnt work systemd errors

you get systemd errors straight away
 
the latest version of Ubuntu wont install because everything requires systemd, it just fails

there isnt a way to trick systemd to running on freebsd

if there was a way dont you think some of the devs or mods on the forum would have mentioned it years ago
 
the latest version of Ubuntu wont install because everything requires systemd, it just fails

there isnt a way to trick systemd to running on freebsd

if there was a way dont you think some of the devs or mods on the forum would have mentioned it years ago

I think that there could be some tricks that only few number of users know. Usually these tricks are hidden and are hard to find. They don't solve the problems at the root,but they help a lot. What I say is that finding them we can attenuate the errors. So no surrender means to continue to look and try,with the hope to find them.
 
echo "exit 0" > /compat/ubuntu/var/lib/dpkg/info/systemd.postinst

Take in consideration also this trick :

Code:
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_silent
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get -f install
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_silent
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info_silent /var/lib/dpkg/info
sudo apt-get update
sudo apt-get full-upgrade
 
Regading Rocky Linux....What is this ?

Download linux-rl9-systemd-libs linux packages for FreeBSD :

https://pkgs.org/download/linux-rl9-systemd-libs

Does this package enable systemd inside Rocky Linux installed with the FreeBSD linuxulator ? What that package intend to do ? Maybe it can be adapted to be used also with Ubuntu ? Yes,the official distro supported by FreeBSD is Rocky,but right now we have also used different distros. i don't like Systemd,but IF its installation and presence give to Linux more stability,it is welcome,on the end...What it counts for me is that SystemD is not added to FreeBSD natively.
 
We could use Devuan which is a fork of Debian without systemd: debootstrap --verbose --no-check-gpg --no-merged-usr --components="main,contrib,non-free,non-free-firmware" --include="build-essential" --arch amd64 ceres /compat/devuan http://deb.devuan.org/merged/
 
Back
Top