How to make an ISO file, or ISO Image, or CD image with oscdimg

What is an ISO file or ISO image?

An ISO File or ISO Image very succinctly is a file that emulates a CD, DVD or blue ray. There are a few technical standards for the ISO image but those can be found online. The purpose of this post is to get you started working with an ISO image, not writing an essay about the ISO 9660 standard.

And I am talking about ISO files the *.ISO or file.ISO. Everyday each computer simple process becomes more and more complicated because that specific process can be customized with more options than before.

ISO files are becoming more and more necessary. Windows has its own command line tool OSCDIMG.exe to make ISO files. However not sure if it is the best tool to create bootable files for Linux. Maybe is not working period for Linux. And for that we can download the CDRtools suite, and that suite can help with creating Linux Bootable ISO.

The bad part is that both of these tools are command line so you have to type commands to make ISO files.

But ISO files are not only used for booting Operating Systems. The need arises more and more to use ISO files because the possibility to mount them in virtual machines, greatly easing the process of installing software onto a virtual machine. You just load the ISO file, into the virtual CD-ROM and install the necessary software. For that you need to know how to make an ISO file and also extract an ISO file.

ISO Extraction can be done with 7Zip which is a versatile tool.

Windows for windows

oscdimg -n -m -bc:\winfiles\boot\ c:\winfiles c:\windvd\winBoot.iso

c:\winfiles\boot\ – is the boot sector file which is loaded at boot time

c:\winfiles – location of the windows OS from which you want to make an ISO

c:\windvd\winBoot.iso – Location of the finished file.iso in this particular case winboot.iso

But sometimes we just need an ISO file from another file or a bunch of other files to load them into a virtual CD. And for that use:

oscdimg -n -m  c:\files c:\ISO\File.iso

c:\files – Location of files to be made into an ISO file

c:\ISO – Location of the ISO file to be created, in this case file.iso

-n – allows for long names of files to be incorporated into the ISO

-m – allow for the ISO file to be large size

Windows for Linux

But what if we want to modify a bootable Linux Image by adding something you need into the file to boot from. Then you can use the CDR tools.

mkisofs -R -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -o ubuntu.iso C:\Ubuntu

ubuntu.ISO – will be the ISO file resulting

another more complete command would be like this:

c:\cdrtools\mkisofs -R -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -o c:\ubuntu.iso C:\Ubuntu

isolinux.bin – is the boot sector file to make the iso bootable. It also have to be in the root folder of C:\Ubuntu in our case.

c:\cdrtools\ – the cdrtools folder

c:\Ubuntu is the location where you have extracted the Ubuntu.ISO in order to modify it

c:\ubuntu.iso – is the ISO file created for you

If you want to know all the options of mkisofs, use the –help parameter. You might need a few days to understand all the switches.