Solved

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

Posted on 2011-03-03
8
504 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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
 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

776 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