본문 바로가기

LINUX

[리눅스] ISO 마운트 및 자동 마운트(fstab)


리눅스 ISO 마운트 방법




1. 수동 마운트


 '/iso/CentOS74.iso' 파일을 /mountdir 디렉토리로 마운트

   [root@localhost ~]# mount -o loop /iso/CentOS74.iso /mount

    mount: /dev/loop0 is write-protected, mounting read-only



 마운트 확인

   [root@localhost ~]# mount

    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
    tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=99864k,mode=700)
    /iso/CentOS74.iso on /iso/mountdir type iso9660 (ro,relatime)



 마운트 해제

   [root@localhost ~]# umount /iso/mountdir




2. 자동 마운트 (fstab)


 '/etc/fstab' 파일 수정

   [root@localhost ~]# vi /etc/fstab

   # 제일 하단에 추가

   /iso/CentOS74.iso       /iso/mountdir           iso9660  loop    0 0  


 자동 마운트 확인

   [root@localhost ~]# mount -a

   mount: /dev/loop0 is write-protected, mounting read-only