You are not logged in.

#1 2020-05-07 20:17:07

Registered: 2009-07-26
Posts: 18

VFIO @boot -> sh permission denied

Hello there,

I have been following the Archwiki page for PCIe passthrough. IOMMU works fine, but my machine has two Nvidia GPUs that are the same. Since I already know which one I want to passthrough, I use the script listed here: … lected_GPU

I changed it to of course point at the proper GPU device in the DEV variable and have also made the recommended changes to /etc/mkinitcpio.conf and /etc/modprobe.d/vfio.conf and generated a new initramfs. However, after reboot, just before it goes to the login screen, I see this error briefly:

sh permission denied

I checked the script several times and it runs fine if I execute it by hand at the commandline, but that is too late, since the drivers on both cards are already "locked" to nvidia by that point. I made the script executable by all, but that did not help.

VFIO is getting loaded though, as shown by dmesg:

[   36.845122] VFIO - User Level meta-driver version: 0.3

I am not sure what to do here, as I tried searching for variations of this error (both in general and for VFIO), but it seems no one has reported something like this before, and kernels/initramfs are not unfortunately my speciality.

(The whole system is up-to-date as of about 30 mins ago.)

Best wishes and thanks,


Oh, and the owner and group for are root and it is located in /usr/local/bin as recommended by the wiki. The devices that I want to run with vfio are also listed in /sys/bus/pci/devices and they both have a driver_override file in their directories.

Last edited by rennis250 (2020-05-07 20:22:30)


#2 2020-05-08 14:16:05

From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,887

Re: VFIO @boot -> sh permission denied

Sounds like this could be a timing issue where vfio-pci is installed to late.

post your /etc/mkinitcpio.conf please, also full dmesg and / or journalctl -b .

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)


#3 2020-05-21 06:23:26

Registered: 2020-05-21
Posts: 1

Re: VFIO @boot -> sh permission denied

Hi, I met the same problem and the reason was lack of excution permission for the file ''. Try the following command which worked for me.
$ sudo chmod 755 /usr/local/bin/
Then reboot and you may find the error gone.

Last edited by Yorn (2020-05-21 06:27:02)


#4 2020-08-17 23:46:07

Registered: 2018-09-29
Posts: 33

Re: VFIO @boot -> sh permission denied

I have the same exact issue .... I applied 755 and still have the message on boot that permission is denied...

Top message on Boot says:

:: running early hook [ndev]
sh: /usr/local/bin/ Permission denied

The following are the permissions set..

-rwxr-xr-x 1 root root 218 Aug 17 19:10 /usr/local/bin/

The contents of the script is the ( Passthrough all GPUs but the boot GPU ) : … _host_GPUs

I am a wee bit stumped atm..... :-(


#5 2020-08-18 11:56:59

Registered: 2018-09-29
Posts: 33

Re: VFIO @boot -> sh permission denied

I found the issue for me.... I had to move the order of my HOOKS in /etc/mkinitcpio.conf... move modconf after block and filesystems... for example, this my HOOKS order now which works

HOOKS(base udev autodetect block filesystems modconf keyboard fsck)


Board footer

Powered by FluxBB