LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2004, 09:52 AM   #1
SlipAway172
Member
 
Registered: Jun 2004
Location: GA
Distribution: Latest ubuntu
Posts: 172

Rep: Reputation: 30
how to extract a .img?


i need to install DSL onto a usb pen drive but cant figure out how to extract a .img file. How do i extract it?
 
Old 12-31-2004, 10:03 AM   #2
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
an img file is a straight image (bits and bytes) of a device, most often

to get it onto your usb pen drive, you will need to determine the hardware path to your usb pen drive, not the mounted location

i think if you run mount and look for your usb device, it should say "/dev/____" mounted on "/mnt/_____"

you want the /dev/ one

then run the following

cat image.img > /dev/_____

this will wipe out everything on your pen drive, wait till the command is completely done
 
Old 12-31-2004, 11:06 AM   #3
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
You usually don't "install" or "extract" an .img file, you mount it.

Exactly what sort of image file are you working with?

Generally, to see what's in an .img you do something like this:

mount -o loop image.img /mnt/<mountpoint>

but some image files (initrd.img for example) are gzipped and you have to gunzip them first. Never heard of catting an image to a dev file. Maybe you can (there are a lot of things I haven't heard of ) but I would think you would run into trouble if the image wasn't of the same size and type of device.
 
Old 12-31-2004, 12:16 PM   #4
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
yes, you would run into size issues if they werent the same size, but the proper way to put an image file onto a disk is to cat it

for instance, when your making boot floppies, cat bootdisk.img > /dev/fd0 will copy the boot disk image to the floppy device

--adam
 
Old 12-31-2004, 12:29 PM   #5
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
That's what I like about these linux boards, I always seem to learn something new. But what I'm wondering is for what sort of .img file would it be appropriate to write an .img to a usb pen drive in order to install DSL? Seems like a very odd (and probably wrong) thing to do. Unless one were storing a .img file on the drive to transfer to somewhere else. In which case catting would be wrong. And would blow the format of the pendrive???

Regards,
Kevin
 
Old 12-31-2004, 12:42 PM   #6
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
yea, i was wondering the same thing, if your worried about screwing up the formatting of your pen drive, before catting the image to the pendrive, you can cat the pendrive to an image file, therefore backing up the formatting of it

cat /dev/____ > pendrive.img

then your pendrive is stored in the .img file, then you can go through the instructions i told you before, then when your done, get the original pendrive format back by cat pendrive.img > /dev/____

but just to install dsl? that seems a little extreme, to install dsl, it depends on what your doing, but most dsl modems hooked up with a network cable are automatic

also, check to see the size of the image file, if its somewhere around or below 1.4mb, its probably meant to go on a floppy, in which case catting that image to a floppy is more acceptable

cat image.img > /dev/fd0

but whatever

--adam

Last edited by adamwenner; 12-31-2004 at 12:43 PM.
 
Old 07-04-2005, 03:45 PM   #7
elsmack
Member
 
Registered: Mar 2005
Posts: 32

Rep: Reputation: 15
ok, so what would the mount point be? friend of mine sent me an img he created on his mac. I'm hung up on how do burn it to a DVD we can play on the TV.
 
  


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
Extract *.img file? teodavinci Linux - Newbie 1 08-24-2004 03:47 PM
[php]Reading url [img] and [/img] hylke Programming 13 08-23-2004 01:58 PM
.img? dwessell Linux - Software 3 05-21-2004 09:06 AM
.img burner or way to boot from a .img American Psycho Linux - Software 4 03-24-2004 06:40 AM
img onetimewhiner Linux - Software 1 09-07-2001 03:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:41 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