LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-30-2004, 10:49 AM   #1
Q-Fireball
LQ Newbie
 
Registered: Mar 2004
Distribution: Gentoo
Posts: 13

Rep: Reputation: 0
How to add files to ISOImage?


Hi folks

how can I add a file to an existing ISO image file? I made an image file from a CD with dd, but know I want to add a file to this Image.
 
Old 09-30-2004, 10:59 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Let's say your image file is called image.iso.
Now create a directory called isodir in your current directory. Mount image.iso in isodir like this (as root):
Code:
mount image.iso isodir -o loop,rw
The loop option means to mount a regular file not a device (you must have loopback device support for this to work), and rw means to mount it in read/write mode.

The contents of the ISO now appear under isodir, and you can edit, remove and add files as you please, provided there's enough space in image.iso's filesystem. Before you burn the CD, remember to unmount the directory with:
Code:
umount isodir
from the same directory you mounted it in. (You won't be able to unmount it if you have any terminals, file browsers, etc. pointing at anywhere under the isodir directory).
 
Old 09-30-2004, 11:17 AM   #3
Q-Fireball
LQ Newbie
 
Registered: Mar 2004
Distribution: Gentoo
Posts: 13

Original Poster
Rep: Reputation: 0
Thanx rjlee

Oh thanx, that's so easy? I knew how to mount an ISO image, but I thought you can only mount it as read only file system.
 
Old 09-30-2004, 11:24 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
No; you can mount them read-write. The only major problem with this is that ISOs tend not to have much space for new files in them, and you can't grow them like this.

Alternatively, there are several GUI tools like K3B that will let you manipulate an ISO filesystem.
 
Old 09-30-2004, 11:30 AM   #5
Q-Fireball
LQ Newbie
 
Registered: Mar 2004
Distribution: Gentoo
Posts: 13

Original Poster
Rep: Reputation: 0
Oh, ok is their also a shell program for this or can you only manipulate an ISO filesystem with K3B?
 
Old 10-11-2004, 02:53 PM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
There's a shell utility called growisofs that will resize an ISO filesystem so you can squeeze more free space into it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add text to many files Kanon Linux - General 4 08-28-2005 03:27 AM
What do I add to compile/make files? vinoloco Ubuntu 5 04-12-2005 11:21 PM
What do I add to compile/make files? vinoloco Linux - Newbie 1 04-08-2005 04:30 PM
Can not add/remove files from Fedora. TechHawk Fedora 1 05-12-2004 10:53 PM
How can i add files 2 an iso image? Braveheart1980 Linux - Software 4 02-29-2004 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration