我的 Ubuntu 详细信息:
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
当我尝试 lsmod | grep 6lowpan 时,我可以看到内核模块可用。
# lsmod | grep 6low
bluetooth_6lowpan 28672 0
6lowpan 40960 8 nhc_fragment,nhc_dest,nhc_ipv6,bluetooth_6lowpan,n hc_hop,nhc_udp,nhc_mobility,nhc_routing
bluetooth 581632 32 btrtl,bluetooth_6lowpan,btintel,btbcm,bnep,btusb,r fcomm
但当我尝试启用蓝牙 6lowpan 模块时,出现错误“操作不允许”
# echo "1" > /sys/kernel/debug/bluetooth/6lowpan_enable
bash: /sys/kernel/debug/bluetooth/6lowpan_enable: Operation not permitted
使用 sudo 我获得了以下 root 权限:
# sudo su
# whoami
root
# modprobe bluetooth_6lowpan
# echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
bash: /sys/kernel/debug/bluetooth/6lowpan_enable: Operation not permitted
我甚至尝试使用其中一篇文章中给出的建议进行设置(https://ubuntuforums.org/showthread.php?t=2428547),还是没运气:
# sudo sh -c "/bin/echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable"
sh: /sys/kernel/debug/bluetooth/6lowpan_enable: Operation not permitted
dmesg 记录了以下错误:
201688.308845] audit: type=1400 audit(1617619807.993:78): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=1983 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[201688.329071] audit: type=1400 audit(1617619808.013:79): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=1983 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[201688.709403] audit: type=1326 audit(1617619808.393:80): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.snap-store.ubuntu-software pid=1983 comm="snap-store" exe="/snap/snap-store/518/usr/bin/snap-store" sig=0 arch=c000003e syscall=93 compat=0 ip=0x7fefe9a1c4e7 code=0x50000
[201744.641113] Lockdown: bash: debugfs access is restricted; see man kernel_lockdown.7
我已经用尽了谷歌搜索,但找不到任何可以解决我的问题的建议。请帮忙。
答案1
发生此问题是因为服务器在安全启动功能开启的情况下启动,而内核即将锁定。重新启动服务器并禁用安全启动即可解决问题