How do I replace a file in an ISO file without needing root from the command line

martinhans

I have an ISO file and I want to change the contents of one of the files in it from the command line. I know that I can use

sudo mount -o loop <etc...>
rsync -ra a b
edit b/file
mkisofs <options>

but I need a solution that does not require root permissions.

martinhans

I finally managed to find an answer myself. I can use fuse to mount the ISO file, there is even a tool for this in the Ubuntu repositories:

sudo apt-get install fuseiso

Then I can do:

fuseiso -p file.iso mounted_iso/
rsync -ra mounted_iso/ copy/
fusermount -u mounted_iso

chmod -R +w copy/
edit copy/file

mkisofs <many options> -o remastered.iso copy/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to replace an email in a (PHP) file from the command line without sed?

From Dev

How to replace an email in a (PHP) file from the command line without sed?

From Dev

How do I open a file with Chrome from the command line?

From Dev

How do I search a PDF file from command line?

From Dev

How do I send a file with FileZilla from the command line?

From Dev

How do I run .c file from the command line

From Dev

How do I change file headers from the command line?

From Dev

How do I split up a large .iso file across multiple DVDs via command line tools?

From Dev

VirtualBox: How can I add (mount) a ISO image file from command-line?

From Dev

How do I search a txt file for names from command line or interactive command line

From Dev

Say I have a file's path, how do I reference that file's directory from the command line?

From Dev

How do I replace the '&#x5c' with '/' in file using the command line?

From Dev

How to replace fread() from file, with command line argument?

From Dev

How can I do a recursive find and replace from the command line?

From Dev

How can I view the contents of tar.gz file without extracting from the command-line?

From Dev

How can I view the contents of tar.gz file without extracting from the command-line?

From Dev

How can I write to the second line of a file from the command line?

From Dev

How do I boot from ISO file stored on hard disk?

From Dev

How do I replace a part of a line in a text file with user input?

From Dev

How do I replace a certain line in /etc/passwd file?

From Dev

How to replace a file in jar with command line in linux?

From Dev

How do I hold a file open (locked) from a Windows command-line shell script?

From Dev

How do I move window buttons from left to right using command line or by editing a specific file?

From Dev

Running PHP file from command line, how do I hide the prompt?

From Dev

How do I generate the serial version UID of a Java file from command line?

From Dev

How do I move window buttons from left to right using command line or by editing a specific file?

From Dev

How do I move all files from one folder to a subfolder except .html file using the command line?

From Dev

How do I export the history from the Windows command line to a text file?

From Dev

How do I use mpack to send an HTML file as an attachment to an email from the command line?

Related Related

  1. 1

    How to replace an email in a (PHP) file from the command line without sed?

  2. 2

    How to replace an email in a (PHP) file from the command line without sed?

  3. 3

    How do I open a file with Chrome from the command line?

  4. 4

    How do I search a PDF file from command line?

  5. 5

    How do I send a file with FileZilla from the command line?

  6. 6

    How do I run .c file from the command line

  7. 7

    How do I change file headers from the command line?

  8. 8

    How do I split up a large .iso file across multiple DVDs via command line tools?

  9. 9

    VirtualBox: How can I add (mount) a ISO image file from command-line?

  10. 10

    How do I search a txt file for names from command line or interactive command line

  11. 11

    Say I have a file's path, how do I reference that file's directory from the command line?

  12. 12

    How do I replace the '&#x5c' with '/' in file using the command line?

  13. 13

    How to replace fread() from file, with command line argument?

  14. 14

    How can I do a recursive find and replace from the command line?

  15. 15

    How can I view the contents of tar.gz file without extracting from the command-line?

  16. 16

    How can I view the contents of tar.gz file without extracting from the command-line?

  17. 17

    How can I write to the second line of a file from the command line?

  18. 18

    How do I boot from ISO file stored on hard disk?

  19. 19

    How do I replace a part of a line in a text file with user input?

  20. 20

    How do I replace a certain line in /etc/passwd file?

  21. 21

    How to replace a file in jar with command line in linux?

  22. 22

    How do I hold a file open (locked) from a Windows command-line shell script?

  23. 23

    How do I move window buttons from left to right using command line or by editing a specific file?

  24. 24

    Running PHP file from command line, how do I hide the prompt?

  25. 25

    How do I generate the serial version UID of a Java file from command line?

  26. 26

    How do I move window buttons from left to right using command line or by editing a specific file?

  27. 27

    How do I move all files from one folder to a subfolder except .html file using the command line?

  28. 28

    How do I export the history from the Windows command line to a text file?

  29. 29

    How do I use mpack to send an HTML file as an attachment to an email from the command line?

HotTag

Archive