How to create custom linux ISO image?

It’s rather trivial task to make some changes into already burned installation or live CD. It may be performed to add some files to this CD or edit files on it. In any case it’s impossible to loop mount .iso file and then save it as iso9660 filesystem is read-only.

So, just mount your CD or iso image to some directory by commands:

sudo mkdir /mnt/image

sudo mount /dev/cdrom /mnt/image

or

sudo mount /path/to/your.iso /mnt/image -o loop

then copy it’s contents to some directory:

mkdir /tmp/newiso

cp -r /mnt/image /tmp/newiso

After this you can modify any files in /tmp/newiso, add files, delete them. After modifications are done, create new ISO image to be burned onto CD (or kept somewhere for a rainy day):

cd /tmp/newiso

and

sudo mkisofs -o /tmp/new.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V “new iso name” .

After mkisofs is finished new ISO file will be created at /tmp directory.
It works in any Linux distributions like Ubuntu, Debian or Fedora.

Information Improvisation: Our excellent online http:///300-101.htm training programs will lead you to success in the We also offer latest passguide and http://www.cisco.com/ with 100% success guarantee. Our http://www.test-king.com/exams/200-120.htm is rare in http://www.actualtests.com/exam-200-120.htm world.

SHARE:
nv-author-image

Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

3 thoughts on “How to create custom linux ISO image?”

  1. Hi,
    I have added a new kernel package and i want my new iso to boot with new kernel instead of older kernel.
    Can you please suggest the steps.

    Thanks,
    Pratt

Leave a Reply

Your email address will not be published. Required fields are marked *