![USB 安裝和低圖形模式錯誤的 Udev 規則](https://rvso.com/image/1127601/USB%20%E5%AE%89%E8%A3%9D%E5%92%8C%E4%BD%8E%E5%9C%96%E5%BD%A2%E6%A8%A1%E5%BC%8F%E9%8C%AF%E8%AA%A4%E7%9A%84%20Udev%20%E8%A6%8F%E5%89%87.png)
我有一個包含以下內容的文件
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /home/my_dir_name", RUN+="/bin/mount -o $env{mount_options} /dev/%k /home/my_dir_name"
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /home/my_dir_name", RUN+="/bin/rmdir /home/my_dir_name"
# Exit
LABEL="media_by_label_auto_mount_end"
當我將其放入/etc/udev/rules.d/file.rules
並重新啟動電腦時,出現以下錯誤訊息:
The system is running in low-graphics mode.
刪除這個檔案後我就可以正常啟動了。有誰知道如何保留此文件以安裝每個連接的 USB 並能夠登入而不會出現此錯誤?