We can't just overwrite info.txt on the mountpoint, it will complain that it's a read-only filesystem. After mounting it at /mnt, I found a suitable file at /mnt/info.txt. The size of the script is 202 bytes, so our first step is to find a file larger than 202 bytes, so we can overwrite it. The script is at script.py and my target (a USB stick) is at /dev/sdc. In my case, I wanted to store a script in a live boot so I don't have to retype it every time. This actually requires only two commands, but be careful: a typo can destroy the target filesystem completely, or even overwrite the source file. Our desired file must be smaller than the existing (target) file, and trailing whitespace (or garbage) must be acceptable. In summary, we will replace an existing file in the isofs filesystem with our desired file. if you think this unpacking/repacking thing is just not hacky enough.iso9660) without copying the whole device, or you want to modify a storage device that contains an isofs filesystem (a.k.a.you only want to make a surgical modification instead of rewriting the whole thing.It looks like "ISO Master", as mentioned in dv3500ea's answer, is a good front-end to do that. The common answer to this is to unpack the iso file, modify it, and pack it again.
0 Comments
Leave a Reply. |