Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-18-2013, 10:14 PM   #1
Registered: Sep 2002
Distribution: CentOS
Posts: 170

Rep: Reputation: 15
Adding file to ISO of Bootable Live Linux OS (Contains GRUB)

I would like to add a file to an ISO and still be able to boot the Live OS - I think it's a busybox with few custom kernel modules and scripts. I have tried using windows applications what would allow me to add the file but the ISO still gets modified in some way where it just freezes when GRUB is about to load.

I attempted to use ISO Master on linux but with the same results.

The structure of the ISO is as follows:

/BOOT/bzImage [2MB in size]
/BOOT/config-linux-kernel [44k in size]
/BOOT/initrd.cpio.gz [5MB in size]
/BOOT/modules [contains few ko modules]

The only addition above is the "NEW_DIR" and a file, but adding the file causes something to change and I don't understand what that is....

My latest attempt was to extract the ISO and use isolinux to rebuild the ISO. I attempted to also add isolinux directory into above structure. Inside I copied isolinux.bin, which is the "boot.catalog" file in the original ISO and the isolinux.cfg which is "menu.lst" from the original ISO . The ISO gets built, but when attempting to boot, now I get error messages basically saying every line in isolinux.cfg is "unknown keyword in configuration file" and kernel image cannot be found.

I don't know if the isolinux is even the proper way since the CD boots into GRUB.

Maybe GRUB needs to be reinstalled on the ISO somehow since the size has changed?

Would anyone have any suggestions as how to make this work?

Thank you!

Last edited by niteshadw; 01-18-2013 at 10:34 PM.
Old 01-19-2013, 07:37 PM   #2
LQ Guru
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,286

Rep: Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384
I'm not sure I understand what you mean by copying the isolinux.cfg file to menu.lst. If you compare the entries they are very different. To make a grub bootable CD you only need the menu.lst and stage2_eltorito file. You can create a grub bootable iso with the following command if your entries are correct in menu.lst:

mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso isoimages
This produces a file named grub.iso from the directory above isoimages so you can change the name of the iso and also change the name of the directory in which you have copied the files from the original iso after loop mounting them.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert bootable USB .img file to bootable CD .iso file Chris.Bristol Linux - Software 7 01-12-2013 01:00 PM
How to run a bootable .iso file in Linux(remote server) Pinglu General 4 02-28-2012 01:06 PM
How do I make bootable ISO (live CD) of a directory using mkisofs + grub2 ? Stevithen Linux - Software 3 06-24-2011 09:26 AM
Grub2 questions: need to know grub.cfg syntax for bootable grub_eltorito iso's?? linus72 Linux - General 11 02-11-2010 06:20 PM
how to make non bootable iso file and iso via linux command line?? npubudu Linux - Newbie 2 02-01-2009 11:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration