Friday 15 May 2009

Injecting Files into ISO Image

ISO images are read only files and one can't inject files into them. Hence to add some bits and pieces to my GParted.iso I need to extract the ISO into an ordinary folder and then inject, or rather add, extra files and folders to it. To be able to do that extraction Ther are two methods.
First, download a virtual drive software. This software instals a virtual CD/DVD driver on your computer similar to your real CD/DVD/Blu-ray driver. Only that instead of real CD/DVD/Blu-ray you put a an ISO image on it. Then you can open that image and copy the content of that image into your computer. Then add (inject) your additional files into the content. And at last create a second new ISO that includes the injected files. There are many virtual drivers out there, but the one that I have used is the free Daemon Tool Light When you are installing it be careful not to accept its optional features such as the toolbar if you do not agree with them. Only instal the virtual drive. Also download it from its official website; otherwise, you might end up downloading annoying bloated softwares and ad-wares. Also there are many other products are advertised in the page that you should carefully find Daemon download among them.
In second method, I downloaded WinImage tools from here. This tool is not free but you can use it for thirty days free and meanwhile sort out your projects. I created a new folder in "My Documents" named it with GParted ISO file, showing versions and everything similar to my GParted version. Only I deleted .iso from its name. The folder is empty. Then I opened WinImage tool. From the "File" menu item "Open" command, I opened the GParted.iso. All files and folders inside the image appears in explorer frame and navigation pane of WinImage. I notice that the CD image includes isolinux but GParted.zip for hard disk included syslinux as it is obvious from their application. Isolinux puts an ISO image of a CD on the memory, syslinux puts the image from a hard disk on the physical memory. Then I go to "Image" menu item "Extract" command and brows to GParted empty folder I have created in "My Documents" to extract all files and folders of ISO CD in this folder. Now contents of ISO are accessible for adding new items. I added "unzip" file to the root of folder to use it later on my "Debian" command line for unzipping GParted.zip. I also added file GParted.zip to the root. Now I can reconstruct the folder back to a new ISO image of mine, using free "ImgBurn: Image Burn" utility as I explain in the next post.
Update, 25 February 2014 : You might find these two wikis useful, too.
They include images and are step-by-step. Moreover, they are more recent than this post.
Note that in Windows 8/8.1 you do not need a virtual drive. Just right click on an ISO image, select "Open with" from the context menu and then from  the secondary menu, choose "Windows Explorer" to open the file. Windows promptly creates a Virtual DVD drives and opens ISO inside that drive. Please, "eject" that drive after finishing working with the ISO to release your resources. Nevertheless, you need to copy files from that location to other locations to be able to manipulate them. ISO images are "read-only" files.


No comments:

Post a Comment