openEuler Linux 光驱开启自动挂载
创建光驱挂载目录
mkdir -p /mnt/cdrom
手动挂载光驱
但是系统重启后挂载失效
mount /dev/cdrom /mnt/cdrom
取消光驱挂载
umount /mnt/cdrom
光驱开机自动挂载
临时挂载光驱
mount /dev/cdrom /mnt/cdrom
编写配置文件/etc/fstab
vi /etc/fstab
追加以下内容:
/dev/cdrom /mnt/cdrom iso9660 defaults 0 0
完整内容如下:
#
# /etc/fstab
# Created by anaconda on Wed Jul 5 01:41:57 2023
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/openeuler_oracle-root / xfs defaults 0 0
UUID=90a8aff4-68c0-4f98-a253-2cf90b0c5d6a /boot ext4 defaults 1 2
UUID=A62B-A60E /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/openeuler_oracle-swap none swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 defaults 0 0