How to create custom linux ISO image?

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

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.

 
 
» You might also be interested in the following articles:
Create Linux user with password
Fully automated Fedora Linux installation manual (create custom installation cd)
Convert Nero image (.nrg) to ISO9660 (.iso)
Fedora Core remote installation howto
PCLinuxOS Magazine Latest Issue (Nov 2007)



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!


3 Responses to “How to create custom linux ISO image?”


  1. 1 Robert McMellen

    I installed Debian etch on my system. I followed the instructions above but when I type mkisosf, etch switches to genisoimage and refuses to use the command line options as shown. I have already invested nearly a week attempting to learn how to modify the official Debian/kde install image to my needs. Do you suppose you could duplicate your howto using genisoimage?

    :})

  2. 2 dejf

    Well, that’s the easy part. The hard one is to keep all the deppendencies consistent and that is where the problem rises…

  1. 1 fluffigt.com » Blog Archive » Create .deb or .rpm from .tar.gz with checkinstall

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››