Solved

how to edit a file in a mounted file system in LINUX

Posted on 2011-03-03
8
502 Views
Last Modified: 2012-06-27
I have a iso image in /exports/ under linux.
I mounted it to /exports/softImage/ using mount  -o loop  <iso file>   <target directory>.
Now in a subfolder under that target-directory i want to edit a file. When i try to save the file after editing it i get the error E212: Cant open file for writing
when i press df -ah to see how th efile system is configured:
/exports/myiso file        148M 148M    0 100%    /exports/softImage
0
Comment
Question by:pvinodp
8 Comments
 

Author Comment

by:pvinodp
ID: 35026989
If I try to change the permission of the file system [/exports/softimage] or the particular file i get this error Read only file system
0
 
LVL 3

Expert Comment

by:mwiercin
ID: 35027025
Remount the filesystem as read-write (it will affect your ISO though).

mount -o remount,rw /exports/softImage

Open in new window


Then back read-only

mount -o remount,ro /exports/softImage

Open in new window

0
 
LVL 16

Accepted Solution

by:
medvedd earned 350 total points
ID: 35027892
The iso9660 filesystem is read-only. You will need to copy the files to another directory tree, make your changes and then burn a new image.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35027916
I tried the same thing a few months back.

You have to copy all the contents, edit the file you want and recreate the ISO again.

I didn't like this solution, but apparently this is the only way it can be done-- as I found after a lot of research.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 31

Expert Comment

by:farzanj
ID: 35027951
Please checkout my question a few months ago
http://www.experts-exchange.com/OS/Linux/Q_26685553.html
0
 
LVL 12

Assisted Solution

by:mccracky
mccracky earned 150 total points
ID: 35037300
You are wanting to edit an image of a CD.  If you edit it, the image will change.  So, you need to copy the contents, edit the file, and then use mkisofs to create the new ISO image.
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 35047662
You need to make a copy of the entire iso file system. Then make your changes. Then create a new iso image using mkisofs.
The following commands will make a copy of softimage in your home directory (you may want to put it elsewhere - adjust the below commands to suit)
mkdir ~/softimage_copy
cd /exports/softimage
tar -cf - . | tar -C ~/softimage_copy -xpUf -

Open in new window

0
 

Author Closing Comment

by:pvinodp
ID: 35053580
Thanks for the solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now