I am mounting an iso file downloaded from CentOS website using below command as root
mount -t iso9660 -o loop /root/Centos7ISO/CentOS-7-x86_64-Everything-1511.iso /mnt/CentOS7/
But it throws this warning about a read-only device
mount: /dev/loop2 is write-protected, mounting read-only
I searched a lot and found several similar issues but none of the solutions worked in my case.
total 1490
-r--r--r--. 1 root root 14 Dec 10 06:35 CentOS_BuildTag
dr-xr-xr-x. 3 root root 2048 Dec 10 06:33 EFI
-r--r--r--. 1 root root 215 Dec 10 06:35 EULA
-r--r--r--. 1 root root 18009 Dec 10 06:35 GPL
dr-xr-xr-x. 3 root root 2048 Dec 10 06:33 images
dr-xr-xr-x. 2 root root 2048 Dec 10 06:33 isolinux
dr-xr-xr-x. 2 root root 2048 Dec 10 06:33 LiveOS
dr-xr-xr-x. 2 root root 1486848 Dec 10 06:34 Packages
dr-xr-xr-x. 2 root root 4096 Dec 10 06:35 repodata
-r--r--r--. 1 root root 1690 Dec 10 06:35 RPM-GPG-KEY-CentOS-7
-r--r--r--. 1 root root 1690 Dec 10 06:35 RPM-GPG-KEY-CentOS-Testing-7
I even tried to use chmod
to grant full rw permission to files, but Chmod +777 also does not work since it is a read-only mount.
sudo mount -o rw,remount /mnt/CentOS7
or if you weren't using sudo in your commands that may be why. try running them as root and it may mount properly. – John Orion May 23 '16 at 11:49