RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Pishrink fails with read only files?

    Scheduled Pinned Locked Moved Help and Support
    pi shrinkread only
    2 Posts 1 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      matalog
      last edited by matalog

      I have been using pishrink for a few days now, as I get my retropie image perfect, the last time I saved it, i have previously made all of the .nes games (maybe others) read only leaving them with 3 r's and no w's.

      I didn't think much of that, becasue I could actually still delete the .nes files afterwards, from retropie.

      When I then tried to shrink the .img file i made from the sd card, pishrink failed with:

      sudo ./pishrink.sh TAPpreret.img
      Warning: Unable to open /mnt/hgfs/Pishrink/TAPpreret.img read-write (Permission
      denied). /mnt/hgfs/Pishrink/TAPpreret.img has been opened read-only.
      Warning: Unable to open /mnt/hgfs/Pishrink/TAPpreret.img read-write (Permission
      denied). /mnt/hgfs/Pishrink/TAPpreret.img has been opened read-only.
      Warning: Unable to open /mnt/hgfs/Pishrink/TAPpreret.img read-write (Permission
      denied). /mnt/hgfs/Pishrink/TAPpreret.img has been opened read-only.
      Warning: Unable to open /mnt/hgfs/Pishrink/TAPpreret.img read-write (Permission
      denied). /mnt/hgfs/Pishrink/TAPpreret.img has been opened read-only.
      mount: /dev/loop0 is write-protected, mounting read-only
      Creating new /etc/rc.local
      mv: cannot move '/tmp/tmp.mtvGXM0Scj/etc/rc.local' to '/tmp/tmp.mtvGXM0Scj/etc/rc.local.bak': Read-only file system
      ./pishrink.sh: line 67: /tmp/tmp.mtvGXM0Scj/etc/rc.local: Read-only file system
      chmod: changing permissions of '/tmp/tmp.mtvGXM0Scj/etc/rc.local': Read-only file system
      e2fsck 1.43.4 (31-Jan-2017)
      e2fsck: Operation not permitted while trying to open /dev/loop0
      You must have r/w access to the filesystem or be root
      resize2fs 1.43.4 (31-Jan-2017)
      resize2fs: Operation not permitted while trying to open /dev/loop0
      ./pishrink.sh: line 84: [[: Couldn'tfindvalidfilesystemsuperblock.: syntax error: invalid arithmetic operator (error token is "'tfindvalidfilesystemsuperblock.")
      expr: non-integer argument
      expr: non-integer argument
      expr: non-integer argument
      resize2fs 1.43.4 (31-Jan-2017)
      resize2fs: Operation not permitted while trying to open /dev/loop0
      Couldn't find valid filesystem superblock.
      ERROR: resize2fs failed...
      mount: /dev/loop0 is write-protected, mounting read-only
      mv: cannot move '/tmp/tmp.mtvGXM0Scj/etc/rc.local.bak' to '/tmp/tmp.mtvGXM0Scj/etc/rc.local': Read-only file system

      Does anyone know the workings of pishrink? If it should fail for the possible reason I have given, or could it be something else?

      Thanks for any help,

      Matalog.

      1 Reply Last reply Reply Quote 0
      • M
        matalog
        last edited by

        I have no idea why it chose to become read only, but the fact that it was, was the problem.

        I endedup having to copy the image using a ubuntu VM and then unclicking 'readonly' in properties in windows (didn't show like that on the original) and then I could finally sudo chmod -R 777 TAPpreret2.img to make it not read only, and now pi shrink works on it.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.