Enable etcrc.local with systemd on Ubuntu 20.04
在Ubuntu20.04上实现可systemd管理的/etc/rc.local
Certain Linux distributions that use SystemDsuch as Ubuntu 20.04 may not allow you to run /etc/rc.local when the system is booting. In this tutorial we will go through how to enable /etc/rc.local with systemd during system boot on Ubuntu 20.04.
Procedure to setup /etc/rc.local with systemd on Ubuntu 20.04Check the current status of rc-local service
1sudo systemctl status rc-local
Enable rc.local serviceEnable ...
KVM虚拟机启动报错“unable to set AppArmor profile 'libvirt-' for 'usrbinqemu-system-x86_64' No such file or directory”
我的虚拟机稳定的运行了一段时间,由于参加WAIC展会,期间晚上断电关机,所以宿主机需要较为频繁的重启。
这事在展会的第四天终于出问题了。我一共是5个虚拟机,早上开机,稳稳的起来了三个,但是有两个挺重要的虚机没有起来,报错如下:
internal error: Process exited prior to exec: libvirt: error : unable to set AppArmor profile ‘libvirt-91916cbc-63e6-437c-9932-4ce813b079d2’ for ‘/usr/bin/qemu-system-x86_64’: No such file or directory
解决办法:
1sudo rm /etc/apparmor.d/libvirt/libvirt*
Ubuntu18.04安装Nvidia显卡驱动
下载显卡驱动lspci | grep -i nvidia 查看显卡型号。
从Nvidia官网下载相应驱动:https://www.nvidia.com/Download/index.aspx
关闭图形界面Ubuntu18.04已经与之前的版本不一样了,比较麻烦。
1234567891011# Ubuntu18.04 #关闭图形界面$ sudo systemctl set-default multi-user.target$ sudo reboot #开启图形界面$ sudo systemctl set-default graphical.target$ sudo reboot# Ubuntu16.04sudo service lightdm stopsudo service lightdm start
禁用nouveauUbuntu 系统默认安装好是使用的一个开源的驱动: nouveau,我们要安装官方的驱动需要先禁用这个开源驱动,方法如下,依次执行:
12sudo bash -c "echo blacklist nouveau > /etc/modpro ...