LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trying to make a bootable iso from folder contents (https://www.linuxquestions.org/questions/linux-software-2/trying-to-make-a-bootable-iso-from-folder-contents-644402/)

abecedarian 05-23-2008 08:15 PM

Trying to make a bootable iso from folder contents
 
EDIT: I've solved the problem. See the last post.

Hi,

I'm looking at running Damn Small Linux for a firewall/server box. I had to append some custom boot parameters for it to suit my taste, and as it will be a headless box, that meant editing the default in isolinux.cfg.

So that means I've copied the iso's contents out, edited isolinux.cfg, and I am now trying to burn it. Note that I did not enter the compressed filesystem.

I know how to use mkisofs, but for a cd to be bootable, I would think that there would have to be some special arguments thrown in. This guide uses the following command:
http://www.linuxforums.org/desktop/r..._preamble.html

# mkisofs -no-pad -l -r -J -no-emul-boot -boot-load-size 4 – boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o mydsl.iso newcd

The only thing I altered was the last word, which is the directory with the cd's contents in it, changed obviously to match my own directory. Otherwise all was kept same. As I copied straight from the CD, all the boot/isolinux contents are there.

When I try this, it returns:
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage: Missing boot image name, use -eltorito-boot option.

The first doesn't seem like a problem. The second, however, I have no idea what to do with. When I looked in the mkisofs man page, I saw:
-b eltorito_boot_image
Specifies the path and filename of the boot image to be used
when making an El Torito bootable CD for x86 PCs. The pathname
must be relative to the source path specified to genisoimage.

But I have no idea how to specify the source path for genisoimage.
Can anyone help? This seems infuriatingly simple.

bigrigdriver 05-23-2008 08:49 PM

Quote:

-o mydsl.iso newcd
You have the name for the iso (-o mydsl.iso), and, if I read things correctly, newcd is the folder you want to make into an iso. Try giving the full path to newcd (an absolute path) instead of the relative path now in use. Newcd is relative to the directory in which you run the mkisofs command. /path/to/newcd would be an absolute path from the root of the filesystem. Isolinux would need that absolute path in order to find it's own files for booting the cd/dvd.

abecedarian 05-23-2008 08:57 PM

Thanks for the reply, but no luck. I tried absolute paths for the target directory and then for the -b and -c options. Same error.

EDIT: Got it! I used the command from
http://nootech.wordpress.com/2007/12...-5-install-cd/
ignoring the -V -A and -p options. So it ended up:

mkisofs -r -R -J -T -v -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o $isofilename /home/tom/dsl

knudfl 05-24-2008 04:46 AM

This explanation seems to make things easy, it even works for me !!
http://www.asylumnation.com/blogs/am...post-2775.html
If not editing 'initrd' just takes a minute.
Code:

#!/bin/bash
 # make the new iso and put in root.
 mkisofs -o /new.iso -b isolinux/isolinux.bin \
 -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
 -boot-info-table -J -R -V disks .
 #

Good luck.


All times are GMT -5. The time now is 07:50 AM.