From c3b789dff168187209b525bffb61f50f05735ea8 Mon Sep 17 00:00:00 2001 From: Ing Date: Fri, 25 Apr 2025 22:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20v1000nk=20=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E7=9A=84=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/initrd/opt/rr/boot.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index a0cece1f..aa456a5d 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -179,6 +179,8 @@ if [ "$(echo "${KVER:-4}" | cut -d'.' -f1)" -lt 5 ]; then CMDLINE["elevator"]="elevator" else CMDLINE["split_lock_detect"]="off" + # CMDLINE['module.sig_enforce']="0" + # CMDLINE['loadpin.enforce']="0" fi if [ "${DT}" = "true" ]; then @@ -247,6 +249,27 @@ if [ "${DT}" = "true" ] && ! echo "v1000nk epyc7002 purley broadwellnkv2" | grep # CMDLINE['scsi_mod.scan']="sync" # TODO: redpill panic of vmware scsi? (add to cmdline) fi +########### V1000NK DEBUG ########### +if echo "v1000nk" | grep -wq "${PLATFORM}"; then + if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "virtio"; then + [ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+="," + CMDLINE['modprobe.blacklist']+="virtio,virtio_blk,virtio_console,virtio_input,virtio_mmio,virtio_net,virtio_pci,virtio_ring,virtio_scsi" + fi + if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "e1000"; then + [ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+="," + CMDLINE['modprobe.blacklist']+="e1000,e1000e" + fi + if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "mpt3sas"; then + [ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+="," + CMDLINE['modprobe.blacklist']+="mpt3sas" + fi + if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "megaraid_sas"; then + [ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+="," + CMDLINE['modprobe.blacklist']+="megaraid_sas" + fi +fi +########### V1000NK DEBUG ########### + # CMDLINE['kvm.ignore_msrs']="1" # CMDLINE['kvm.report_ignored_msrs']="0" @@ -437,7 +460,10 @@ else done # Disconnect wireless - lsmod | grep -q iwlwifi && for F in /sys/class/net/wlan*; do [ ! -e "${F}" ] && continue; connectwlanif "$(basename "${F}")" 0 2>/dev/null; done + lsmod | grep -q iwlwifi && for F in /sys/class/net/wlan*; do + [ ! -e "${F}" ] && continue + connectwlanif "$(basename "${F}")" 0 2>/dev/null + done # Unload all network drivers # for F in $(realpath /sys/class/net/*/device/driver); do [ ! -e "${F}" ] && continue; rmmod -f "$(basename ${F})" 2>/dev/null || true; done