Solved Rocky Linux 9 minimal jail working, need to figure out the next steps

created a new rocky jail with the new settings in /etc/devfs.rules

didnt work

freebsd jail without the new devfs.rules

Code:
ls -l /dev/dri/

Code:
lrwxr-xr-x  1 root wheel  8 Sep 16 19:39 card0 -> ../drm/0
lrwxr-xr-x  1 root wheel  8 Sep 16 19:39 card1 -> ../drm/1
lrwxr-xr-x  1 root wheel 10 Sep 16 19:39 renderD128 -> ../drm/128
lrwxr-xr-x  1 root wheel 10 Sep 16 19:39 renderD129 -> ../drm/129

root wheel
 
i only have one graphics card

im using these devfs.rules

Code:
/etc/devfs.rules

Code:
[jail=7]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add path 'mixer*' unhide
add path 'dsp*' unhide
add path 'dri*' unhide
add path 'drm*' unhide
add path 'nvidia*' unhide
add path 'speaker*' unhide

the above settings worked with a ubuntu mantic jail a while a go
i had davinci resolve 18.6 and openai-whisper working with the gpu in the jail

i install the same version of the nvidia driver in the jail as on the host

but now ubuntu mantic doesnt work with the gpu anymore
and neither does rocky linux
 
i install the same version of the nvidia driver in the jail as on the host
Do you mean have the driver for bsd in both the host and the guest or are you using the driver for linux in the guest?
Well the second case does not make too much sense, but you may be able to run the Linux driver userspace part.
 
i have the exact same version of the Nvidia driver installed on both the host and the jail
and then unhide the path to /dev/dri and /dev/drm in the devfs.rules used by the jail

i use a dummy-uvm.so which lets the jail use the host gpu


and use export LD_PRELOAD in the jail ~/.zshenv

Code:
export LD_PRELOAD="$HOME/.config/gpu/dummy-uvm.so"

its uses the linux nvidia driver in the jail ( which must match the version on the freebsd host ) with the dummy-uvm.so
and the unhidden path to the dri and drm devices on the host

i also mount the XDG_RUNTIME_DIR from the host to the jail

once all thats done you can use use nvidia and cuda in the jail
just as though you where running it on the freebsd host

the issue is the file permissions on the dri and drm mounted from the host to the jail
have root root permissions

so a regular user in the jail cant access the dri and drm devices
 
im just creating the rocky jail

i think the issue with rocky may have been how i extracted the tar into the jail

Code:
doas tar xvfp Rocky-9-Container-Base.latest.x86_64.tar.xz -C /usr/local/jails/linux/rocky

added the p option for tar
 
no the p option for tar didnt help

still owned by root root

Code:
ls -l /dev/dri/

Code:
lrwxr-xr-x 1 root root  8 Sep 17 18:31 card0 -> ../drm/0
lrwxr-xr-x 1 root root  8 Sep 17 18:31 card1 -> ../drm/1
lrwxr-xr-x 1 root root 10 Sep 17 18:31 renderD128 -> ../drm/128
lrwxr-xr-x 1 root root 10 Sep 17 18:31 renderD129 -> ../drm/129
 
Just for test, did you try to chmod the underlying devices (i.e. not the symbolic links under /dev/dri) to see if DVR works at least this way?
 
its actually a chown issue rather than chmod

the permissions on the freebsd host are root:wheel
but in the jail are root:root

there is a wheel group on rocky linux but not ubuntu

freebsd /etc/group

Code:
wheel:*:0:root,djwilcox

ubuntu /etc/group

Code:
root:x:0:

you can see on freebsd
wheel is 0

where as on ubuntu root is 0
 
Ubuntu Noble wont install using debootstrap

so i tried installing ubuntu-base by extracting the tar file into the jail

soon as i tried to install pulseaudio i got these errors

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.
/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

/proc is mounted

Code:
mount

Code:
zroot/jails/linux/ubuntu on / type zfs (rw,noatime)
devfs on /dev type devfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
fdescfs on /dev/fd type fdescfs (rw)
proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
/tmp on /tmp type nullfs (rw,nosuid,noatime)
/home on /home type nullfs (rw,noatime)

Code:
/proc/ is not mounted, but required for successful operation of systemd-tmpfiles. Please mount /proc/. Alternatively, consider using the --root= or --image= switches.

so the issue is systemd-tmpfiles

looks like systemd is now buried so deep into the latest version of Ubuntu
that its now impossible to run Ubuntu Noble 24.04 in a Freebsd jail

i installed Debian but thats useless because you cant install the Nvidia Drivers
from the Nvidia site using a run file, which is needed so you can match the driver version in the jail to the driver on the freebsd host

Rocky Linux cant access the gpu
its also a pain with all the repos you have to add,
and dnf is probably the worst package manager i have ever used

Arch is just a nightmare to install in a jail
have to edit the pacman.conf and change siglevel to never
but then when you download the packages it wont install them

and Davinci Resolve 19 doesnt work with Ubuntu Mantic
 
the issue is finding linux distros with a tar file you can extract into a jail
a lot of linux distros only have iso downloads

the window subsystem for linux actually has an option to use systemd
so plus 1 for microsoft

i almost made an unconscious typo and typed microshit
 
the issue is finding linux distros with a tar file you can extract into a jail
a lot of linux distros only have iso downloads

the window subsystem for linux actually has an option to use systemd
so plus 1 for microsoft

i almost made an unconscious typo and typed microshit
It is not possible to use the OCI images used for distrobox?
Or install the ISO image in a virtual machine and then copy the files to a jail?
 
i changed the group id's in the jail to match those on freebsd
and that fixed the permissions

however davinci resolve still crashes on the start up screen
when it gets to loading fusion, sods law

freebsd group

Code:
/etc/group

Code:
wheel:*:0:root,djwilcox
video:*:44:djwilcox

rocky linux jail group

Code:
/etc/group

Code:
wheel:*:0:root,djwilcox
video:x:44:djwilcox

commented out

Code:
#root:x:0:
#wheel:x:10:
#video:x:39:

freebsd

list /dev/dri

Code:
ls -l /dev/dri

Code:
lrwxr-xr-x 1 root wheel  8 Sep 20 16:49 card0 -> ../drm/0
lrwxr-xr-x 1 root wheel  8 Sep 20 16:49 card1 -> ../drm/1
lrwxr-xr-x 1 root wheel 10 Sep 20 16:49 renderD128 -> ../drm/128
lrwxr-xr-x 1 root wheel 10 Sep 20 16:49 renderD129 -> ../drm/129

Code:
ls -l /dev/drm/0

Code:
crw-rw---- 1 root video 226, 0 Sep 20 11:58 /dev/drm/0

Code:
ls -l /dev/nvidia*

Code:
crw-rw-rw-  1 root wheel 0xa9 20 Sep 12:58 /dev/nvidia-modeset
crw-rw-rw-  1 root wheel 0xa7 20 Sep 12:58 /dev/nvidia0
crw-rw-rw-  1 root wheel 0xa8 20 Sep 12:58 /dev/nvidiactl

rocky linux jail

list /dev/dri

Code:
ls -l /dev/dri

Code:
lrwxr-xr-x 1 root wheel  8 Sep 20 16:49 card0 -> ../drm/0
lrwxr-xr-x 1 root wheel  8 Sep 20 16:49 card1 -> ../drm/1
lrwxr-xr-x 1 root wheel 10 Sep 20 16:49 renderD128 -> ../drm/128
lrwxr-xr-x 1 root wheel 10 Sep 20 16:49 renderD129 -> ../drm/129

Code:
ls -l /dev/drm/0

Code:
crw-rw---- 1 root video 226, 0 Sep 20 11:58 /dev/drm/0

Code:
ls -l /dev/nvidia*

Code:
crw-rw-rw- 1 root wheel 195, 254 Sep 20 11:58 /dev/nvidia-modeset
crw-rw-rw- 1 root wheel 195,   0 Sep 20 11:58 /dev/nvidia0
crw-rw-rw- 1 root wheel 195, 255 Sep 20 11:58 /dev/nvidiactl
 
i installed mpv on rocky linux
and played a video

and got errors about missing the i915 driver
so vaapi fails

rocky linux 9 doesnt have an i915 driver
apparently its a kernel module, but its not loaded
 
Are you loading Linux Kernel Modules inside the FreeBSD kernel?
the issue is there isnt a i915 driver present on rocky linux
as its supposed to be a kernel module

but the directory where it should be is empty
and lsmod doesnt show any kernel modules loaded

taking another look at ubuntu mantic
and going to see if changing editing the group file makes any difference

ubuntu group file

Code:
vi /etc/group

i comment out the root entry
and add a new entry for the wheel group which doesnt exist on ubuntu

Code:
wheel:*:0:root,username
#root:x:0:

that fixes the permissions on the dri, drm and nvidia devices

the issue i was having on ubuntu is not beening able to render ( export ) the footage
 
Back
Top