制作鏡像檔案(這個需要等幾分鐘)
[root@localhost ~]# dd if=/dev/cdrom of=/root/centos7.7.ios
9109504+0 records in
9109504+0 records out
4664066048 bytes (4.7 GB) copied, 260.3 s, 17.9 MB/s
建立挂載目錄
mkdir /dvd
挂載鏡像檔案
[root@localhost ~]# mount -o loop /root/centos7.7.ios /dvd/ mount: /dev/loop0 is write-protected, mounting read-only
檢視挂載
sdb 8:16 0 10G 0 disk
├─sdb1 8:17 0 1G 0 part /part-ext4
├─sdb2 8:18 0 2G 0 part /part-xfs
├─sdb3 8:19 0 2G 0 part [SWAP]
├─sdb4 8:20 0 512B 0 part
└─sdb5 8:21 0 2G 0 part
sr0 11:0 1 4.4G 0 rom /mnt/cdrom
loop0 7:0 0 4.4G 0 loop /dvd