Kernel-Modules

黑名單不適用於核心模組“radeon”

  • April 16, 2017

我試圖將核心模組“radeon”列入黑名單,因為它與我的專有驅動程序分類。我試過用兩種方式來做,但沒有一個起作用,而且每次都命令

mkinitcpio -M 

將列出“radeon”模組。


我試圖 /etc/modprobe.d/radeon.config用線條創建文件

blacklist radeon
fglrx

重新啟動後這不起作用,所以我刪除了這個文件並嘗試在我的引導載入程序(我正在使用syslinux)核心行中做同樣的事情。我將文件編輯/boot/syslinux/syslinux.cfg為如下所示:

DEFAULT arch
PROMPT 0  
TIMEOUT 10
UI menu.c32

MENU TITLE Arch Linux
#MENU BACKGROUND splash.png
MENU COLOR border       30;44   #40ffffff #a0000000 std
MENU COLOR title        1;36;44 #9033ccff #a0000000 std
MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel        37;44   #50ffffff #a0000000 std
MENU COLOR help         37;40   #c0ffffff #a0000000 std
MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std
MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07        37;40   #90ffffff #a0000000 std
MENU COLOR tabmsg       31;40   #30ffffff #00000000 std

LABEL archstudio
   MENU LABEL Linux (Arch) - recording studio
   LINUX ../vmlinuz-linux-rt
   APPEND root=/dev/sda1 rw threadirqs nomodeset modprobe.blacklist=radeon fglrx
   INITRD ../initramfs-linux-rt.img

我正在使用 RT 核心“ linux-rt ”,所以我確實使用重建了引導載入程序

mkinitcpio -p linux-rt

重新啟動後,我注意到這也不起作用。


命令mkinitcpio -v顯示一些鉤子載入了“radeon”模組:

==> Starting dry run: 3.10.14-rt9-1-rt
     -> Running build hook: [/usr/lib/initcpio/install/base]
   adding file: /bin/busybox
   adding symlink: /usr/lib/libc.so.6 -> libc-2.18.so
   adding file: /usr/lib/libc-2.18.so
   adding symlink: /lib64/ld-linux-x86-64.so.2 -> ld-2.18.so
   adding file: /usr/lib/ld-2.18.so
   adding symlink: /usr/bin/[ -> busybox
   adding symlink: /usr/bin/[[ -> busybox
   adding symlink: /usr/bin/ash -> busybox
   adding symlink: /usr/bin/awk -> busybox
   adding symlink: /usr/bin/basename -> busybox
   adding symlink: /usr/bin/cat -> busybox
   adding symlink: /usr/bin/chgrp -> busybox
   adding symlink: /usr/bin/chmod -> busybox
   adding symlink: /usr/bin/chown -> busybox
   adding symlink: /usr/bin/chroot -> busybox
   adding symlink: /usr/bin/clear -> busybox
   adding symlink: /usr/bin/cp -> busybox
   adding symlink: /usr/bin/cttyhack -> busybox
   adding symlink: /usr/bin/cut -> busybox
   adding symlink: /usr/bin/dd -> busybox
   adding symlink: /usr/bin/df -> busybox
   adding symlink: /usr/bin/dirname -> busybox
   adding symlink: /usr/bin/dmesg -> busybox
   adding symlink: /usr/bin/du -> busybox
   adding symlink: /usr/bin/echo -> busybox
   adding symlink: /usr/bin/egrep -> busybox
   adding symlink: /usr/bin/env -> busybox
   adding symlink: /usr/bin/expr -> busybox
   adding symlink: /usr/bin/false -> busybox
   adding symlink: /usr/bin/free -> busybox
   adding symlink: /usr/bin/getopt -> busybox
   adding symlink: /usr/bin/grep -> busybox
   adding symlink: /usr/bin/halt -> busybox
   adding symlink: /usr/bin/head -> busybox
   adding symlink: /usr/bin/hexdump -> busybox
   adding symlink: /usr/bin/ifconfig -> busybox
   adding symlink: /usr/bin/init -> busybox
   adding symlink: /usr/bin/install -> busybox
   adding symlink: /usr/bin/ip -> busybox
   adding symlink: /usr/bin/ipaddr -> busybox
   adding symlink: /usr/bin/iplink -> busybox
   adding symlink: /usr/bin/iproute -> busybox
   adding symlink: /usr/bin/iprule -> busybox
   adding symlink: /usr/bin/iptunnel -> busybox
   adding symlink: /usr/bin/kbd_mode -> busybox
   adding symlink: /usr/bin/kill -> busybox
   adding symlink: /usr/bin/killall -> busybox
   adding symlink: /usr/bin/less -> busybox
   adding symlink: /usr/bin/ln -> busybox
   adding symlink: /usr/bin/loadfont -> busybox
   adding symlink: /usr/bin/loadkmap -> busybox
   adding symlink: /usr/bin/losetup -> busybox
   adding symlink: /usr/bin/ls -> busybox
   adding symlink: /usr/bin/md5sum -> busybox
   adding symlink: /usr/bin/mkdir -> busybox
   adding symlink: /usr/bin/mkfifo -> busybox
   adding symlink: /usr/bin/mknod -> busybox
   adding symlink: /usr/bin/mktemp -> busybox
   adding symlink: /usr/bin/mountpoint -> busybox
   adding symlink: /usr/bin/mv -> busybox
   adding symlink: /usr/bin/nc -> busybox
   adding symlink: /usr/bin/netstat -> busybox
   adding symlink: /usr/bin/nslookup -> busybox
   adding symlink: /usr/bin/openvt -> busybox
   adding symlink: /usr/bin/pgrep -> busybox
   adding symlink: /usr/bin/pidof -> busybox
   adding symlink: /usr/bin/ping -> busybox
   adding symlink: /usr/bin/ping6 -> busybox
   adding symlink: /usr/bin/poweroff -> busybox
   adding symlink: /usr/bin/printf -> busybox
   adding symlink: /usr/bin/ps -> busybox
   adding symlink: /usr/bin/pwd -> busybox
   adding symlink: /usr/bin/readlink -> busybox
   adding symlink: /usr/bin/reboot -> busybox
   adding symlink: /usr/bin/rm -> busybox
   adding symlink: /usr/bin/rmdir -> busybox
   adding symlink: /usr/bin/route -> busybox
   adding symlink: /usr/bin/sed -> busybox
   adding symlink: /usr/bin/seq -> busybox
   adding symlink: /usr/bin/setfont -> busybox
   adding symlink: /usr/bin/sh -> busybox
   adding symlink: /usr/bin/sha1sum -> busybox
   adding symlink: /usr/bin/sha256sum -> busybox
   adding symlink: /usr/bin/sha512sum -> busybox
   adding symlink: /usr/bin/sleep -> busybox
   adding symlink: /usr/bin/sort -> busybox
   adding symlink: /usr/bin/stat -> busybox
   adding symlink: /usr/bin/strings -> busybox
   adding symlink: /usr/bin/sync -> busybox
   adding symlink: /usr/bin/tac -> busybox
   adding symlink: /usr/bin/tail -> busybox
   adding symlink: /usr/bin/telnet -> busybox
   adding symlink: /usr/bin/test -> busybox
   adding symlink: /usr/bin/tftp -> busybox
   adding symlink: /usr/bin/touch -> busybox
   adding symlink: /usr/bin/true -> busybox
   adding symlink: /usr/bin/umount -> busybox
   adding symlink: /usr/bin/uname -> busybox
   adding symlink: /usr/bin/uniq -> busybox
   adding symlink: /usr/bin/uptime -> busybox
   adding symlink: /usr/bin/vi -> busybox
   adding symlink: /usr/bin/wc -> busybox
   adding symlink: /usr/bin/wget -> busybox
   adding symlink: /usr/bin/yes -> busybox
   adding file: /usr/sbin/kmod
   adding symlink: /usr/lib/libz.so.1 -> libz.so.1.2.8
   adding file: /usr/lib/libz.so.1.2.8
   adding symlink: /usr/bin/depmod -> kmod
   adding symlink: /usr/bin/insmod -> kmod
   adding symlink: /usr/bin/rmmod -> kmod
   adding symlink: /usr/bin/lsmod -> kmod
   adding symlink: /usr/bin/modprobe -> kmod
   adding symlink: /usr/bin/modinfo -> kmod
   adding file: /usr/sbin/blkid
   adding symlink: /usr/lib/libblkid.so.1 -> libblkid.so.1.1.0
   adding file: /usr/lib/libblkid.so.1.1.0
   adding symlink: /usr/lib/libuuid.so.1 -> libuuid.so.1.3.0
   adding file: /usr/lib/libuuid.so.1.3.0
   adding file: /usr/sbin/mount
   adding symlink: /usr/lib/libmount.so.1 -> libmount.so.1.1.0
   adding file: /usr/lib/libmount.so.1.1.0
   adding file: /usr/sbin/switch_root
   adding file: /init_functions
   adding file: /init
   adding file: /usr/lib/modprobe.d/usb-load-ehci-first.conf
 -> Running build hook: [/usr/lib/initcpio/install/udev]
   adding file: /etc/udev/udev.conf
   adding file: /usr/lib/systemd/systemd-udevd
   adding symlink: /usr/lib/librt.so.1 -> librt-2.18.so
   adding file: /usr/lib/librt-2.18.so
   adding symlink: /usr/lib/libkmod.so.2 -> libkmod.so.2.2.6
   adding file: /usr/lib/libkmod.so.2.2.6
   adding symlink: /usr/lib/libacl.so.1 -> libacl.so.1.1.0
   adding file: /usr/lib/libacl.so.1.1.0
   adding symlink: /usr/lib/libpthread.so.0 -> libpthread-2.18.so
   adding file: /usr/lib/libpthread-2.18.so
   adding symlink: /usr/lib/libattr.so.1 -> libattr.so.1.1.0
   adding file: /usr/lib/libattr.so.1.1.0
   adding file: /usr/bin/udevadm
   adding file: /usr/bin/systemd-tmpfiles
   adding symlink: /usr/lib/libcap.so.2 -> libcap.so.2.24
   adding file: /usr/lib/libcap.so.2.24
   adding file: /usr/lib/udev/rules.d/50-udev-default.rules
   adding file: /usr/lib/udev/rules.d/60-persistent-storage.rules
   adding file: /usr/lib/udev/rules.d/64-btrfs.rules
   adding file: /usr/lib/udev/rules.d/80-drivers.rules
   adding file: /usr/lib/udev/ata_id
   adding file: /usr/lib/udev/scsi_id
   adding file: /hooks/udev
 -> Running build hook: [/usr/lib/initcpio/install/autodetect]
libkmod: kmod_config_parse: /etc/modprobe.d/radeon.conf line 2: ignoring bad line starting with 'fglrx'
   caching 37 modules
 -> Running build hook: [/usr/lib/initcpio/install/modconf]
   adding dir: /etc/modprobe.d
   adding file: /etc/modprobe.d/radeon.conf
   adding file: /etc/modprobe.d/uvcvideo.conf
   overwriting file: /usr/lib/modprobe.d/usb-load-ehci-first.conf
 -> Running build hook: [/usr/lib/initcpio/install/block]
   adding module: scsi_mod
   adding module: sd_mod
   adding module: cdrom
   adding module: sr_mod
   adding module: libata
   adding module: pata_amd
   adding module: sata_nv
   adding module: pata_acpi
   adding module: ata_generic
   adding module: usb-common
   adding module: usbcore
   adding module: ohci_hcd
   adding module: ehci-hcd
   adding module: ehci_pci
   adding module: usb_storage
 -> Running build hook: [/usr/lib/initcpio/install/filesystems]
   adding module: mbcache
   adding module: jbd2
   adding module: crc16
   adding module: ext4
 -> Running build hook: [/usr/lib/initcpio/install/keyboard]
   adding module: hid
   adding module: hid_generic
   adding module: usbhid
 -> Running build hook: [/usr/lib/initcpio/install/fsck]
   adding file: /usr/sbin/fsck.ext4
   adding symlink: /usr/lib/libext2fs.so.2 -> libext2fs.so.2.4
   adding file: /usr/lib/libext2fs.so.2.4
   adding symlink: /usr/lib/libcom_err.so.2 -> libcom_err.so.2.1
   adding file: /usr/lib/libcom_err.so.2.1
   adding symlink: /usr/lib/libe2p.so.2 -> libe2p.so.2.3
   adding file: /usr/lib/libe2p.so.2.3
   adding symlink: /usr/bin/fsck.ext2 -> fsck.ext4
   adding symlink: /usr/bin/fsck.ext3 -> fsck.ext4
   adding file: /usr/sbin/fsck
   adding module: i2c-core
   adding module: drm
   adding module: drm_kms_helper
   adding module: ttm
   adding module: i2c-algo-bit
   adding file: /usr/lib/firmware/radeon/R520_cp.bin
   adding file: /usr/lib/firmware/radeon/RS600_cp.bin
   adding file: /usr/lib/firmware/radeon/RS690_cp.bin
   adding file: /usr/lib/firmware/radeon/R420_cp.bin
   adding file: /usr/lib/firmware/radeon/R300_cp.bin
   adding file: /usr/lib/firmware/radeon/R200_cp.bin
   adding file: /usr/lib/firmware/radeon/R100_cp.bin
   adding file: /usr/lib/firmware/radeon/SUMO2_me.bin
   adding file: /usr/lib/firmware/radeon/SUMO2_pfp.bin
   adding file: /usr/lib/firmware/radeon/SUMO_me.bin
   adding file: /usr/lib/firmware/radeon/SUMO_pfp.bin
   adding file: /usr/lib/firmware/radeon/SUMO_rlc.bin
   adding file: /usr/lib/firmware/radeon/PALM_me.bin
   adding file: /usr/lib/firmware/radeon/PALM_pfp.bin
   adding file: /usr/lib/firmware/radeon/CYPRESS_rlc.bin
   adding file: /usr/lib/firmware/radeon/CYPRESS_me.bin
   adding file: /usr/lib/firmware/radeon/CYPRESS_pfp.bin
   adding file: /usr/lib/firmware/radeon/JUNIPER_rlc.bin
   adding file: /usr/lib/firmware/radeon/JUNIPER_me.bin
   adding file: /usr/lib/firmware/radeon/JUNIPER_pfp.bin
   adding file: /usr/lib/firmware/radeon/REDWOOD_rlc.bin
   adding file: /usr/lib/firmware/radeon/REDWOOD_me.bin
   adding file: /usr/lib/firmware/radeon/REDWOOD_pfp.bin
   adding file: /usr/lib/firmware/radeon/CEDAR_rlc.bin
   adding file: /usr/lib/firmware/radeon/CEDAR_me.bin
   adding file: /usr/lib/firmware/radeon/CEDAR_pfp.bin
   adding file: /usr/lib/firmware/radeon/R700_rlc.bin
   adding file: /usr/lib/firmware/radeon/R600_rlc.bin
   adding file: /usr/lib/firmware/radeon/RV710_me.bin
   adding file: /usr/lib/firmware/radeon/RV710_pfp.bin
   adding file: /usr/lib/firmware/radeon/RV730_me.bin
   adding file: /usr/lib/firmware/radeon/RV730_pfp.bin
   adding file: /usr/lib/firmware/radeon/RV770_me.bin
   adding file: /usr/lib/firmware/radeon/RV770_pfp.bin
   adding file: /usr/lib/firmware/radeon/RS780_me.bin
   adding file: /usr/lib/firmware/radeon/RS780_pfp.bin
   adding file: /usr/lib/firmware/radeon/RV670_me.bin
   adding file: /usr/lib/firmware/radeon/RV670_pfp.bin
   adding file: /usr/lib/firmware/radeon/RV635_me.bin
   adding file: /usr/lib/firmware/radeon/RV635_pfp.bin
   adding file: /usr/lib/firmware/radeon/RV620_me.bin
   adding file: /usr/lib/firmware/radeon/RV620_pfp.bin
   adding file: /usr/lib/firmware/radeon/RV630_me.bin
   adding file: /usr/lib/firmware/radeon/RV630_pfp.bin
   adding file: /usr/lib/firmware/radeon/RV610_me.bin
   adding file: /usr/lib/firmware/radeon/RV610_pfp.bin
   adding file: /usr/lib/firmware/radeon/R600_me.bin
   adding file: /usr/lib/firmware/radeon/R600_pfp.bin
   adding file: /usr/lib/firmware/radeon/ARUBA_rlc.bin
   adding file: /usr/lib/firmware/radeon/ARUBA_me.bin
   adding file: /usr/lib/firmware/radeon/ARUBA_pfp.bin
   adding file: /usr/lib/firmware/radeon/CAYMAN_rlc.bin
   adding file: /usr/lib/firmware/radeon/CAYMAN_mc.bin
   adding file: /usr/lib/firmware/radeon/CAYMAN_me.bin
   adding file: /usr/lib/firmware/radeon/CAYMAN_pfp.bin
   adding file: /usr/lib/firmware/radeon/CAICOS_mc.bin
   adding file: /usr/lib/firmware/radeon/CAICOS_me.bin
   adding file: /usr/lib/firmware/radeon/CAICOS_pfp.bin
   adding file: /usr/lib/firmware/radeon/TURKS_mc.bin
   adding file: /usr/lib/firmware/radeon/TURKS_me.bin
   adding file: /usr/lib/firmware/radeon/TURKS_pfp.bin
   adding file: /usr/lib/firmware/radeon/BTC_rlc.bin
   adding file: /usr/lib/firmware/radeon/BARTS_mc.bin
   adding file: /usr/lib/firmware/radeon/BARTS_me.bin
   adding file: /usr/lib/firmware/radeon/BARTS_pfp.bin
   adding file: /usr/lib/firmware/radeon/HAINAN_rlc.bin
   adding file: /usr/lib/firmware/radeon/HAINAN_mc.bin
   adding file: /usr/lib/firmware/radeon/HAINAN_ce.bin
   adding file: /usr/lib/firmware/radeon/HAINAN_me.bin
   adding file: /usr/lib/firmware/radeon/HAINAN_pfp.bin
   adding file: /usr/lib/firmware/radeon/OLAND_rlc.bin
   adding file: /usr/lib/firmware/radeon/OLAND_mc.bin
   adding file: /usr/lib/firmware/radeon/OLAND_ce.bin
   adding file: /usr/lib/firmware/radeon/OLAND_me.bin
   adding file: /usr/lib/firmware/radeon/OLAND_pfp.bin
   adding file: /usr/lib/firmware/radeon/VERDE_rlc.bin
   adding file: /usr/lib/firmware/radeon/VERDE_mc.bin
   adding file: /usr/lib/firmware/radeon/VERDE_ce.bin
   adding file: /usr/lib/firmware/radeon/VERDE_me.bin
   adding file: /usr/lib/firmware/radeon/VERDE_pfp.bin
   adding file: /usr/lib/firmware/radeon/PITCAIRN_rlc.bin
   adding file: /usr/lib/firmware/radeon/PITCAIRN_mc.bin
   adding file: /usr/lib/firmware/radeon/PITCAIRN_ce.bin
   adding file: /usr/lib/firmware/radeon/PITCAIRN_me.bin
   adding file: /usr/lib/firmware/radeon/PITCAIRN_pfp.bin
   adding file: /usr/lib/firmware/radeon/TAHITI_rlc.bin
   adding file: /usr/lib/firmware/radeon/TAHITI_mc.bin
   adding file: /usr/lib/firmware/radeon/TAHITI_ce.bin
   adding file: /usr/lib/firmware/radeon/TAHITI_me.bin
   adding file: /usr/lib/firmware/radeon/TAHITI_pfp.bin
   adding file: /usr/lib/firmware/radeon/TAHITI_uvd.bin
   adding file: /usr/lib/firmware/radeon/SUMO_uvd.bin
   adding file: /usr/lib/firmware/radeon/CYPRESS_uvd.bin
   adding file: /usr/lib/firmware/radeon/RV710_uvd.bin
   adding module: radeon
==> Generating module dependencies
==> Dry run complete, use -g IMAGE to generate a real image

一些鉤子啟動了“radeon”模組,但我該如何阻止它們呢?這是我第一次處理鉤子。我檢查並沒有文件/etc/modprobe.d/也沒有/etc/modules-load.d/啟動“radeon”……

有幾件事要嘗試:

  1. modprobe.d/*.conf 文件(主要)用於黑名單,如果您只是添加一個像 fglrx 這樣的模組名稱,那麼該配置文件的其餘部分將被忽略(這是您的問題)。因此,從 modprobe.d/radeon.conf 文件中刪除 fglrx 並將其添加到 /etc/modules(第 2 點):
  2. 如果您想顯式載入模組 /etc/modules 就足夠了。
  3. 將 radeon.config (-> .config) 重命名為 00-radeon.conf (-> .conf) 或 00-blacklist-radeon.conf 以便首先解析
  4. 也可以嘗試將 FILES="/etc/modprobe.d/blacklist-radeon.conf" 添加到您的 mkinitcpio.conf
  5. 最後的手段將 MODULES=“fglrx” 添加到 mkinitcpio.conf 中(它先載入該模組)

引用自:https://unix.stackexchange.com/questions/117135