How to remount .img as rw and repack

view story

http://www.unix.com – Hi fellas! I make a sh script which the following: Code: sudo mkdir Temp sudo mount -o loop output.img Temp The command mounts the img.Thats fine.But it moun s it as read only.But I need to edit/delete some files inside it and repack it as ext4 using this command: Code: sudo ./mkuserimg.sh -s Temp factoryfs.img ext4 ./temp 893386752B The part I'm lacking is,How do I remount the .img as rw and edit the files inside that??? And yeah...I need to remount the partition again with the default permissions again after editing/deleting files.... Thanks for your help... (HowTos)