0

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.

Zanna
  • 70,465
Espanta
  • 129
  • 1
  • 1
  • 6
  • 1
    This is not about Ubuntu so it doesn't belong here but you can try 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
  • @JohnOrion remount throws error 'mount: can't find /mnt/CentOS7ISO in /etc/fstab'. I logged in as root. Any other hint is highly appreciated. – Espanta May 23 '16 at 11:55
  • So long as Ubuntu is being used to mount the ISO, this isn't off-topic by being about CentOS. It's not about using CentOS, it's about mounting an ISO image that happens to be of CentOS. (We can close it as a duplicate though.) – Eliah Kagan Jun 13 '20 at 03:34

1 Answers1

4

Iso's only do mount read-only. It's just the fact. I believe the reason is that ISO's have a specific structure that would have to be remade every time you unmounted the ISO which would take a ridiculous amount of processing power for limited functionality advantage.

anonymous2
  • 4,298