sdr-enthusiasts/docker-install

depmod permissions error

benlk opened this issue · 1 comments

benlk commented

At this line:

which depmod >/dev/null 2>&1 && depmod -a || true

When running the script on Debian 11 Bullseye on a Pi 3B rev 1.2, I get the following message in the log:

[...]
Getting the latest RTL-SDR packages... Getting the latest UDEV rules... Excluding and unloading any competing RTL-SDR drivers... depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.dep.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.dep.bin.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.alias.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.alias.bin.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.softdep.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.symbols.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.symbols.bin.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.builtin.bin.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.builtin.alias.bin.960.852306.1680706690, 301, 644): Permission denied
depmod: ERROR: openat(/lib/modules/6.1.19-v8+, modules.devname.960.852306.1680706690, 301, 644): Permission denied
Making sure commands will persist when the terminal closes...

We've installed these packages, and we think they may be useful for you in the future. So we will leave them installed:
git, rtl-sdr
[...]

It looks like the modules were successfully written to /etc/modprobe.d/exclusions-rtl2832.conf:

blacklist rtl2832_sdr
blacklist dvb_usb_rtl2832u
blacklist dvb_usb_rtl28xxu
blacklist dvb_usb_v2
blacklist 8192cu
blacklist r820t
blacklist rtl2830
blacklist rtl2838
blacklist rtl8192cu
blacklist rtl8xxxu
blacklist dvb_core

If I rerun depmod -a outside the script as sudo depmod -a, no error is emitted.

kx1t commented

Thanks for your feedback!

Fixed this in this and this commit

The bug was that I was running depmod without sudo in the script, and in reality we don't need to print all the failures to the screen: if the depmod command fails for any reason, then a simple reboot (which we recommend anyways once the script finishes) will take care of not loading those driver at next boot.