An ISO image created from files is not exactly a copy of a collection of files that have been organized into a file structure that can be used as a virtual disk.

An ISO image is an exact copy of a file system. It contains all the data of the original file, including the file system, files, and data structures.

An ISO image is a file with a .iso extension that contains a bit-for-bit copy of the original file. This means that if you burn the ISO image to a new disc, the result will be identical to the original file.

An iso image is an exact copy.

ISO images were created in the 1980s as part of the ISO 9660 standard, which defines the file format for optical discs.

The goal was to create a format that would allow users to create discs that could be read by different operating systems, including MS-DOS, Macintosh, and Unix.

The ISO 9660 format is an open standard that defines the file format for optical discs.

If an error is found on the original disc, it is important to correct it before creating the ISO image. Otherwise, the error will be copied to the ISO image and may cause problems when it is used.

When an ISO image is created, errors and problems from the original file are also copied.

Copy

  • File copy: When you copy files, you are creating an exact copy of the individual files in a different location.
  • Structure not preserved: The file structure and metadata of the original are not preserved in the copy.
  • Disk data not included: Disk data, such as the partition table and file system, are not included in the copy.
  • Not a full disk: The copy is not a full disk, but just a collection of files.

ISO image

  • Disc copy: An ISO image is an exact copy of an entire disc, including the file structure, metadata, and disk data.
  • Structure preserved: The file structure and metadata of the original are preserved in the ISO image.
  • Includes disk data: The ISO image includes disk data, such as the partition table and file system.
  • Is a complete disc: The ISO image is a complete disc, which can be burned to an optical disc or used as a virtual disk.

Key differences between copying and having an ISO image:


Copying

  • File copying: When you copy files, you are creating an exact copy of the individual files in a different location.
  • Structure not preserved: The file structure and metadata of the original are not preserved in the copy.
  • Disk data not included: Disk data such as the partition table and file system are not included in the copy.
  • Not a complete disk: The copy is not a complete disk, but just a collection of files.


ISO image

  • Disk copy: An ISO image is an exact copy of an entire disk, including the file structure, metadata, and disk data.
  • Structure preserved: The file structure and metadata of the original are preserved in the ISO image.
  • Disk data included: The ISO image includes disk data such as the partition table and file system.
  • It is a complete disc: The ISO image is a complete disc, which can be burned to an optical disc or used as a virtual disc.

Advantages of the ISO image:

  • Disc integrity: The ISO image preserves the integrity of the original disc, including the file structure and metadata.
  • Portability: The ISO image is a file that can be easily stored and transported, making it ideal for sharing with others or using on different devices.
  • Compatibility: The ISO image is compatible with most operating systems and devices, making it a versatile option for distributing software and data.

Disadvantages of the copy:

  • It does not preserve the structure: The copy does not preserve the file structure and metadata of the original, which can cause compatibility and functionality issues.
  • It is not a complete disc: The copy is not a complete disc, which can limit its use and functionality.

An ISO image is an exact copy of an entire file, preserving the file structure, metadata and data of the file, while a copy is only a copy of individual files that does not preserve the structure and metadata of the original.

An ISO image is not created by simply copying files. Instead, it is created through a process called “disk imaging” or “disk cloning,” which involves reading the contents of the original file at the sector level and creating an exact copy of all the data.

This disk imaging process is performed at the sector level, meaning that every sector of the original file is read and written to the ISO image, regardless of whether the sector contains valid data or not. This ensures that the ISO image is an exact copy of the original file, including all errors and problems that may exist.

In contrast, copying files involves reading and writing only individual files, without considering the disk structure or file system metadata. This can lead to compatibility and functionality issues if you try to use file copy as a whole file.

An ISO image can be an additional option for distributing files and programs, in addition to copying them. An ISO image is an exact copy of a file, which can be burned to an optical disc or mounted on an operating system as if it were a real disk.

ISO images are easy to create and use, and can be mounted on an operating system with just a few clicks.

The name mkisofs comes from “Make ISO File System”

you just need to have the executable of our software.

example of a simple c program:

#include <stdio.h>
int main() {
printf("Hello World!\n");
return 0;
}

you can save it as software.c

How to make an executable of an algorithm in C:

gcc software.c -o executable

how to run it:

./executable

how to create a software.o object file that contains machine code:

gcc -c software.c -o software.o

mkisofs is a tool that exists on Linux and Macos.

You can install mkisofs on Linux using your distribution’s package manager.

For example, on Ubuntu, you can install it with the following command:


sudo apt-get install cdrtools

In Linux, mkisofs is a tool that is part of the cdrtools package. It is available on most Linux distributions.

On Mac, mkisofs is a tool that is part of the cdrtools package and is available on macOS. You can install mkisofs on Mac using the Homebrew package manager. First, you need to install Homebrew if you don’t have it already installed. Then, you can install mkisofs with the following command:

brew install cdrtools

mkisofs is a tool that exists on Linux and Mac, and can be installed using your distribution’s package manager or Homebrew. If you are unable to install mkisofs, there are alternatives available that you can use to create disk images.

no needed software.o

The volume name is an identifier used to identify the ISO image. It is used to display the volume name on the file system when the ISO image is mounted.

For example, if an ISO image is created with the volume name “MY_PROGRAMM”, when the ISO image is mounted on a file system, the volume name will be displayed as “MY_PROGRAMM”.

The volume name is important because it is used to identify the ISO image and to display information about the ISO image on the file system. It is recommended to use a volume name that is descriptive and unique for each ISO image.

must be located where the executable is.

you must be standing inside the directory where the executable is.

Create the ISO: Use the mkisofs tool to create the ISO.

mkisofs [options] -o output_image.iso [files or directories]
mkisofs -o software.iso .

view iso file information:

isoinfo -d -i software.iso

isoinfo -l -i software.iso

command options:

mkisofs -o software.iso -R -J temp/

in my case /isoexample is like /temp

see if R is lowercase r

The command equivalent to using the mkisofs.cfg file would be:

mkisofs -o software.iso -R -J -V "MY_PROGRAMM" temp/

where temp is a directory containing the executable

in my case /isoexample is like /temp

mkisofs.cfg is configuration file which is not necessary for this case

It is not necessary to use a mkisofs.cfg file to specify mkisofs options. Instead, you can pass the options directly on the command line. This can be more convenient and easier to use, especially for small or simple projects.

Using a mkisofs.cfg file can be useful if you need to create multiple ISOs with different settings. You can simply modify the mkisofs.cfg file and run the mkisofs command to create a new ISO with the updated settings.

Make sure the mkisofs.cfg file is in the same directory as the mkisofs command.

|- temp

    |- executable

    |- mkisofs.cfg

in my case /isoexample is like /temp

In the mkisofs.cfg file, the value of FILES should be the name of the file or directory you want to include in the ISO.

If you wanted to include all files in a directory, you could use an asterisk (*) as the value of FILES. For example:

FILES=*

Include the software file (the executable) in the ISO, the FILES value should simply be software.
It is not necessary to include the software.c file in the ISO, since it is the source code of the program and is not necessary to run the program.

This will create an ISO called software.iso that includes the software file (the executable) and has the options and settings specified in the mkisofs.cfg file:

mkisofs -r -o software.iso mkisofs.cfg
mkisofs -o software.iso .

The -r option is used to specify that an ISO should be created with read and execute permissions for all users.

create the iso from command line

mkisofs -r -J -V "HELADERA" -o software.iso executable

The volume will be called HELADERA and will contain executable if I mount it.

mkisofs.cfg is used to specify options and parameters to be applied to the ISO image creation, such as volume name, copyright, license, etc. It is possible to specify these options directly in the mkisofs command without the need to use a configuration file.

The mkisofs.cfg file is a useful tool for customizing ISO image creation, but it is not necessary to use it in all cases. You can specify options and parameters directly in the mkisofs command if you prefer.

mkisofs -r -J -V "hola" -copyright "Copyright 2023 My company" -license "free use license" -o software.iso executable