mounting iso image: message "block device is write protected, mounting read-only"!

22,031

Solution 1

ISO9660 is a read-only filesystem. It can't be mounted in rw mode because there is no support for that in the filesystem itself. If you want to make a new ISO with a different set of files, you need to make an entirely new ISO with mkisofs or similar utilities.

Solution 2

From Wikipedia's article on ISO 9660:

The ISO 13490 standard is an extension to the ISO 9660 format that adds support for multiple sessions on a disc. Since ISO 9660 is by design a read-only, pre-mastered file system, all the data has to be written in one go or "session" to the medium. Once written, there is no provision for altering the stored content. ISO 13490 was created to allow adding more files to a writeable disc such as CD-R in multiple sessions.

Share:
22,031

Related videos on Youtube

Godson
Author by

Godson

Updated on September 18, 2022

Comments

  • Godson
    Godson over 1 year

    I want to delete a few files from my iso image on hard disk. So, I did:

    ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ sudo mount -o loop check_bholua99.iso /media/iso2
    mount: block device /media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00/check_bholua99.iso is write-protected, mounting read-only
    
    ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ cd /media/iso2
    ravbholua@ravbholua-Aspire-5315:/media/iso2$ ls | tail
    DSC00966.JPG
    DSC00969.JPG
    DSC00970.JPG
    DSC00972.JPG
    DSC00973.JPG
    DSC00974.JPG
    DSC00975.JPG
    DSC00977.JPG
    DSC00980.JPG
    DSC00982.JPG
    ravbholua@ravbholua-Aspire-5315:/media/iso2$ sudo rm DSC00982.JPG
    rm: cannot remove ‘DSC00982.JPG’: Read-only file system
    

    As it failed to delete for the said reason, I tried to remount with the option of rw

    ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ sudo umount /media/iso2
    ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ sudo mount -o loop,rw check_bholua99.iso /media/iso2
    mount: block device /media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00/check_bholua99.iso is write-protected, mounting read-only
    

    Why it messages that the block device is write-protected?

    Please suggest how to mount it rw so that I can edit it. ( I know one way is to copy the files of the iso onto a diff. directory and edit/delete it; then make a new iso image. But this is not what I prefer. )

    • slm
      slm over 10 years
      This is one of the annoyances with .iso files. They can't be modified directly.
  • Godson
    Godson over 10 years
    Thank you for sharing knowledge of ISO 13490 & multiple sessions. It helps a lot.
  • slm
    slm over 10 years
    @Ravi - you're welcome. I noticed that wasn't mentioned anywhere that I could find within U&L so I figured I'd add it here so that it was more obvious for you and anyone else down the road.