basename command not found when ujust regenerate-grub run

Screenshot attached, seems like a PATH issue? But genuinely completely lost on this. basename exists in bin so not really sure what is happening here, I'm a little out of my depth
No description
9 Replies
wolfyreload
wolfyreload2mo ago
I suspect that the /usr/sbin/grub2-mkconfig script is broken in your specific image. Could you please run rpm-ostree status so I can see exactly what image you are running. Maybe I can reproduce it
GrimGrum
GrimGrumOP2mo ago
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite:stable
Digest: sha256:43b0a405fb12476ed3486cfe9f005b412bceea00fad9978e9f95496e30677ec8
Version: 42.20251011 (2025-10-11T17:38:14Z)
LayeredPackages: librealsense libuvc onnxruntime opencv opencv-video openhmd openvr-api
Initramfs: regenerate
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite:stable
Digest: sha256:43b0a405fb12476ed3486cfe9f005b412bceea00fad9978e9f95496e30677ec8
Version: 42.20251011 (2025-10-11T17:38:14Z)
LayeredPackages: librealsense libuvc onnxruntime opencv opencv-video openhmd openvr-api
Initramfs: regenerate
wolfyreload
wolfyreload2mo ago
Ok so it's not a Bazzite image problem. I installed the same image and the same packages and I'm not getting the error
No description
wolfyreload
wolfyreload2mo ago
If you run from the super user does it resolve then or not.
sudo su
which basename
sudo su
which basename
Does it return "/usr/sbin/basename"? Also did you make any changes to your /etc/sudoers file?
GrimGrum
GrimGrumOP2mo ago
bazzite@bazzite:~$ sudo su
[sudo] password for bazzite:
bash-5.2# which basename
bash: which: command not found
bazzite@bazzite:~$ sudo su
[sudo] password for bazzite:
bash-5.2# which basename
bash: which: command not found
uhhhh, well that's not right. Regarding /etc/sudoers I have no memory of making any changes. So I guess a problem with PATH in elevation? "which" works unelevated. and looking in /etc/sudoers as a layman nothing sticks out as clearly wrong.
wolfyreload
wolfyreload2mo ago
Do you have anything custom in in your /etc/sudoers.d folder? You can run sudo ls /etc/sudoers.d to find out
GrimGrum
GrimGrumOP2mo ago
efibootmgr-config and enable-pwfeedback are the only things in sudoers.d
wolfyreload
wolfyreload2mo ago
If I run sudo env | grep PATH I get "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/snapd/snap/bin:/home/linuxbrew/.linuxbrew/bin " That's set by the /etc/sudoers in this line
Defaults secure_path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/snapd/snap/bin:/home/linuxbrew/.linuxbrew/bin
Defaults secure_path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/snapd/snap/bin:/home/linuxbrew/.linuxbrew/bin
GrimGrum
GrimGrumOP5w ago
interesting i get
10: PATH=/usr/local/bin:$PATH
10: PATH=/usr/local/bin:$PATH
what's odd is i have the defaults line you mentioned in sudoers
Defaults secure_path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/snapd/snap/bin:/home/linuxbrew/.linuxbrew/bin
Defaults secure_path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/snapd/snap/bin:/home/linuxbrew/.linuxbrew/bin
Trying to figure out where this PATH i have is defined

Did you find this page helpful?