After adding a device, incus shell no longer works

I have created a new image and have attached networking and added a local user via incus shell. When I try to map another disk device using incus config device add hyd2 /home/me/dev disk source=/srv/share/dev/me, it succeeds, but then when I try to incus shell hyd2 I get Error: command not found.

When I (successfully) remove the disk device, I still get the Error: command not found when I try to incus shell hyd2. I don’t know how to recover. Advice plase!

do the following command work for you?

incus exec hyd2 -- bash

Nope: “command not found”.

I checked the logs, and found this (but I don’t know what to do about it):

Log:

lxc hyd2 20231224234129.147 WARN     cgfsng - ../src/lxc/cgroups/cgfsng.c:fchowmodat:1611 - No such file or directory - Failed to fchownat(46, memory.oom.group, 65536, 0, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW )
lxc hyd2 20231224234129.147 WARN     cgfsng - ../src/lxc/cgroups/cgfsng.c:fchowmodat:1611 - No such file or directory - Failed to fchownat(46, memory.reclaim, 65536, 0, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW )
lxc hyd2 20231224234424.187 WARN     attach - ../src/lxc/attach.c:get_attach_context:477 - No security context received
lxc hyd2 20231224234454.221 WARN     attach - ../src/lxc/attach.c:get_attach_context:477 - No security context received
lxc hyd2 20231224234454.332 WARN     attach - ../src/lxc/attach.c:lxc_attach:1603 - Could not change directory to "/root"
lxc hyd2 20231224234454.345 ERROR    utils - ../src/lxc/utils.c:open_devnull:1232 - No such file or directory - Can't open /dev/null
lxc hyd2 20231224234454.358 ERROR    attach - ../src/lxc/attach.c:lxc_attach_run_command:1839 - No such file or directory - Failed to exec "su"
lxc hyd2 20231224234455.889 WARN     attach - ../src/lxc/attach.c:get_attach_context:477 - No security context received
lxc hyd2 20231224234455.902 WARN     attach - ../src/lxc/attach.c:lxc_attach:1603 - Could not change directory to "/root"
lxc hyd2 20231224234455.903 ERROR    utils - ../src/lxc/utils.c:open_devnull:1232 - No such file or directory - Can't open /dev/null
lxc hyd2 20231224234455.904 ERROR    attach - ../src/lxc/attach.c:lxc_attach_run_command:1839 - No such file or directory - Failed to exec "su"

If it matters, both the image and the host are void linux.

OK, I figured out what the problem is: I was missing the path= parameter. The /home/me/dev is the name of the device, not the actual path. The correct command is incus config device add hyd2 /home/me/dev source=/srv/share/dev/me path=/home/me/dev.