Pishrink fails with read only files?
-
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 systemDoes 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.
-
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.
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.