LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I am trying to extract image file in redhat enterprise linux server 6 (https://www.linuxquestions.org/questions/linux-newbie-8/i-am-trying-to-extract-image-file-in-redhat-enterprise-linux-server-6-a-4175497558/)

parvathi reddy 03-09-2014 12:21 AM

I am trying to extract image file in redhat enterprise linux server 6
 
How to extract an image file inredhat enterprise linux server 6,we tried with different ways available on the net.But are not working fine.please help me out,i am newbie.which command we have to use for mounting an image file and i am thankful to you if you help me how to do it in the terminal. Can we do anything with package installer.
Thanks in advance

Sydney 03-09-2014 01:43 AM

I am assuming that you are using an ISO image.
1. Make a mount point.
Code:

mkdir ~/target
2. Mount the image to that mount point.
Code:

mount -o loop /path/to/iso ~/target
3. You can then view the files on that ISO image.
Code:

ls ~/target/

parvathi reddy 03-09-2014 03:34 AM

correct me - .img file extraction
 
Thank you sydney for replying

Yes, it is an disc image file of 30 kb.

I tried with that method but it is not working in my terminal,correct me if i am wrong
mkdir ~/target
mount -o loop /path/to/iso ~/target

In path should i give my file path like home/desktop/new.img like that

ls ~/target/

Is there any package installer for that?

can we convert that img file to tar file, so that it would be easy to extract.

Thanks in advance

Sydney 03-09-2014 03:41 AM

In the terminal
mkdir makes a directory in windows directories are called folders.
~ is a shortcut for your home directory.
Each directory is separated by /
mount is a command to attach parts of the file system
So I am saying make a folder and attache the iso to the system at that folder.
Code:

mkdir /home/sydney/targetfolder
mount -o loop journey.iso /home/sydney/targetfolder

then click into the folder and you will see what is in the disk image or you can list the contents in terminal using the ls command
Code:

cd /home/sydney/targetfolder
ls


parvathi reddy 03-09-2014 06:31 AM

thank you
 
Hello


sydney, it was very helpful


thank you

John VV 03-09-2014 01:43 PM

Quote:

Yes, it is an disc image file of 30 kb.
30 k is very small
are you sure it is a real disk image made of a hard drive ?

those tend to be hundreds of meg to hundreds of Gig in size

parvathi reddy 03-10-2014 12:50 AM

reply
 
sorry it was 46.8 MB (49066824 bytes)....


my last doubt
are there any other possible ways to do this apart from this.
Are .img and iso files both are same / can i convert .img file to iso file .



thanks in advance .

John VV 03-10-2014 01:11 AM

what software did you use to make it ?

a "img" can well be anything
for example :
The ones I work with are NOT disk images but photographs from NASA spacecraft

so what was used to make this img file ?

the
Code:

mount -o loop ?????????????
should do it for most hard disk images

but even 46 meg is very small


All times are GMT -5. The time now is 01:06 AM.