River008

 

日常填“坑”汇总

 

1. centos8在GUI下配置IP,在/etc/sysconfig/network-scripts/下增加网口的配置文件,重启后进入safe模式只有命令行和有限的命令,无法进入GUI界面。

解决办法,输入命令 xfs_repair -v -L /dev/dm-0 然后 Ctrl-Alt-Delete

How to fix "Entering emergency mode. Exit the shell to continue." - CentOS

2. ubuntu22.04在/etc/netplan/00-installer-config.yaml增加完网卡配置后重启NetworkManageer无法生效

解决办法:sudo netplan apply ; 因为ubuntu22.04管理网络使用netplan,不再使用NM。

3. MobaXterm 终端ssh到Linux后,sudo启动GUI程序,提示“MoTTY X11 proxy: Unsupported authorisation protocol"

解决办法:sudo cp ~/.Xauthority /root/.Xauthority 

4. Rocky 9.1默认无法编译ndctl需要添加CRB repo 如下方法添加

dnf config-manager --enable crb

https://centlinux.com/enable-powertools-repository/

5. 无法对安装了ubuntu22.04的硬盘 /dev/sdb mount,提示" /dev/sdb mount already mounted or busy "

该硬盘含有lvm逻辑卷,需要lvmscan查看

linux - mount already mounted or busy - Stack Overflow

6. ubuntu22.04 kernel镜像vmlinux编译失败

去掉.config中certs相关的两项配置内容

debian - Attempting to compile kernel yields a certification error - Unix & Linux Stack Exchange

7. 单独编译内核模块插入失败,报错“Invalid module format”

产品需要编译自己的定制内核+内核模块,下载内核源码定制修改后rpmbuild方式(点击打开链接)编译升级内核,如下方式编译内核模块 make -C $(kernel_source) SUBDIRS=`pwd` modules;其中 kernel_source直向内核源码,但是insmod插入编译的ko时,提示 “insmod: ERROR: could not insert module xx.ko: Invalid module format”,dmesg查看disagree about version of symbol module_layout ,最终发现kernel_source指向的内核源码和运行版本虽然一致,但是配置文件不一样可能导致问题。于是在kernel_source下make oldconfig,再次编译插入OK!

方法二:make -C /lib/modules/`uname -r`/build M=`pwd` modules也可以


原文链接:https://blog.csdn.net/kklvsports/article/details/73658244

8. Linux 内核动态调试

sudo insmod MODULE_NAME +mpfl

 Linux 内核调试 ——dynamic_debug | Winddoing's Notes

9. ubuntu22.04 如何修改网口MAC地址?

    如同2, /etc/netplan/00-installer-config.yaml中增加macaddress: xx:xx:xx:xx:xx:xx,然后sudo netplan apply即可

10. ubuntu22.04 如何不进行某些内核模块的加载,或者说如何使内核黑名单生效?

     以禁用nvidia模块为例,除了在/etc/modprobe.d/blacklist.conf中加入如下

     

blacklist nvidia
blacklist nouveau
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm

还要 sudo update-initramfs -u 否则不生效,更新initramfs会更新文件/boot/initrd.img-5.15.0-131-generic

    参考:https://cn.linux-console.net/?p=10535

 

posted on   River008  阅读(21)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)

导航

统计

点击右上角即可分享
微信分享提示