LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-17-2008, 03:47 AM   #1
chris6686
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
Exclamation convert an ISO file into an IMG file


hi, i want to burn an iso file on a memory stick.
 
Old 04-17-2008, 07:20 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
Do what now?
 
Old 04-17-2008, 08:24 PM   #3
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Have you tried the dd command?
 
Old 04-17-2008, 08:26 PM   #4
DeeCodeUh
LQ Newbie
 
Registered: Jan 2008
Distribution: Arch
Posts: 16

Rep: Reputation: 0
Personally...no.
 
Old 04-17-2008, 09:07 PM   #5
ewolf
LQ Newbie
 
Registered: Dec 2007
Location: Chicago, USA
Distribution: Debian, NetBSD
Posts: 25

Rep: Reputation: 15
I'm just making an assumption, but are you trying to make a bootable USB drive with the contents of a bootable .ISO file? It's a little more involved than converting the file format. Also, afaik, there's no difference between an .img and an .iso file, except that an .img could contain any filesystem (or no filesystem), whereas an .iso image specifically contains an ISO9660 filesystem. So if you are indeed trying to take a bootable .iso and create a bootable USB drive from it, its not an issue of converting between file formats, its an issue of getting the files off of the ISO9660 filesystem, and onto some other filesystem on your USB drive. Then, you would have to make the USB drive bootable, and configure it to boot the kernel-image in the filesystem. There are a few different options. One of them is outlined here:
http://www.damnsmalllinux.org/wiki/i...B_installation

Is that what you were looking for?

Cheers,
Elijah
http://elijahr.blogspot.com/
 
Old 04-21-2008, 02:06 AM   #6
chris6686
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Original Poster
Rep: Reputation: 0
thank u very much.

thanks for your help. i have try it before but i was forget some details.. thanks again.
 
Old 12-04-2011, 09:11 PM   #7
Linux_420
LQ Newbie
 
Registered: Dec 2011
Distribution: Fedora
Posts: 27

Rep: Reputation: Disabled
to make an oversized bootable floppy image out of a .iso image here are some tips:

make an image with the msdos/vfat filesystem on it (in this case it would be 1.44 MB)

user@host# mkfs.msdos /tmp/file.img -C 1440

mount the image file as a loopback device:

user@host# mkdir /tmp/img/
user@host# sudo mount -t vfat -o loop /tmp/file.img /tmp/img

install a MBR (master boot record):

user@host# sudo syslinux -m /dev/loop0

install syslinux to the image file:

user@host# sudo syslinux -i /dev/loop0

copy the contents of the iso image to the image file:

user@host# mkdir /tmp/iso/
user@host# sudo mount -t iso9660 /path/to/iso/file.iso /tmp/iso/
user@host# sudo cp -vr /tmp/iso/* /tmp/img/

make sure all of the "isolinux" names have been changed to "syslinux"

you can now use syslinux to boot this .img file using memdisk .. your syslinux.cfg entry will look something similar to this:

LABEL distro
KERNEL memdisk
APPEND initrd=/path/to/img/file.img

this should get your kernel & initial ramdisk to load up but it doesn't quite get you to the finish line. i'm not even sure if this is the best way to do this but it would be nice to have a very neat usb stick full of bootable images so files don't get rearranged or deleted or whatever. also if i get this working i won't have to fck around with paths in syslinux.cfg files. for example, getting DSL (Damn Small Linux) to find that KNOPPIX filesystem can be frustrating if you implement it with a custom file tree. maybe you could append an option to mount the .img file while booting up so that your kernel can find the filesystem and other files it needs?

any help would be appreciated on finishing the last leg of this ..

MAKE SURE SYSLINUX IS UP TO DATE AND THAT YOU DON'T OVERWRITE YOUR MBR OR BOOTLOADER WHILE YOU ARE DOING THIS. GO AHEAD AND BACK THEM UP BEFORE DOING THIS!

======================================================================

EDIT: if you take the filesystem out of the iso and put it on the usb drive where it usually goes (i.e. for geexbox 2.0 put the rootfs file at the root of your usb stick & for DSL put the KNOPPIX file in a folder named KNOPPIX at the root of your usb stick) then this method will work. however, considering all that is in some of these iso files is a kernel, initrd & a filesystem it is somewhat pointless to even do it using this workaround.

======================================================================

EDIT: LOL DO NOT IMPLEMENT THIS!!! DO IT THIS WAY... YOU'LL HAVE TO MAKE CUSTOM INITIAL RAMDISKS FOR EACH DISTRO IN THE END.. & GO MAD!

INSTEAD FOLLOW THIS TUTORIAL I MADE: http://www.linuxquestions.org/questi...30#post4542230

======================================================================


Edit: it is prob. possible to point to the filesystem within the .img file using by appending something like BOOT_IMAGE=/dev/initrd/path/to/filesystem

That might conclude this thread once and for all.

Last edited by Linux_420; 12-05-2011 at 04:21 AM. Reason: workaround discovered
 
  


Reply

Tags
before, details, helpful


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
how to convert .img to .iso files Rory in Toronto Linux - Software 9 11-03-2013 09:54 AM
How do you convert ISO to img to access RPM files MandrivaUser Linux - General 6 10-18-2006 06:06 PM
How do you convert ISO to img to access RPM files MandrivaUser Linux - Software 1 10-18-2006 11:54 AM
convert DVD to ISO file paraiso Linux - Software 7 02-01-2006 02:04 AM


All times are GMT -5. The time now is 11:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration