Firstly, this is awesome - thank you so much to
ShelLuser for the initial tutorial and also to
zirias@ for some additional pointers. I've just finished setting up Devuan jail and am pleasantly surprised most things just seem to work.
However, I'm struggling with something regarding procfs:
Code:
root@mc:~# apt-get install openjdk-17-jre-headless
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openjdk-17-jre-headless is already the newest version (17.0.8+7-1~deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up openjdk-17-jre-headless:amd64 (17.0.8+7-1~deb12u1) ...
the java command requires a mounted proc fs (/proc).
dpkg: error processing package openjdk-17-jre-headless:amd64 (--configure):
installed openjdk-17-jre-headless:amd64 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
openjdk-17-jre-headless:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
My fstab for this jail looks like this:
Code:
#Dev Mountpoint FS Options Dump Check
linprocfs /iocage/jails/mc/root/proc linprocfs rw,late 0 0
linsysfs /iocage/jails/mc/root/sys linsysfs rw,late 0 0
tmpfs /iocage/jails/mc/root/tmp tmpfs rw,late,mode=1777 0 0
And inside the jail I can see that there is
stuff inside
/proc
:
Code:
root@mc:~# ls /proc
24553 24919 24927 cmdline devices loadavg modules mtab partitions self swaps uptime
24579 24924 bus cpuinfo filesystems meminfo mounts net scsi stat sys version
Doing some searches around the internet, I can't find anything related to running a Linux Jail on FreeBSD, but similar issues seem to have cropped up in the past in WSL and similar projects...
Not sure if I've done something wrong, or missed something - anybody come across this before?
SOLVED:
There is a script associated with installing openJDK (
/var/lib/dpkg/info/openjdk-17-jre-headless\:amd64.postinst
) which uses the
/bin/mountpoint
command - this seems to just check if the target file is a mount point and returns 0 if it is. Of course to my jail
/proc
isn't a mount point as far as the fail is concerned, so the
/bin/mountpoint
command returned a non-zero status and the script bailed.
So I removed
/bin/mountpoint
and symlinked it to
/bin/true
- this could come back to bite me in the future, but I'm happy enough for now!