LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to use mkisofs or genisoimage (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-use-mkisofs-or-genisoimage-753236/)

debinux 09-07-2009 03:04 AM

how to use mkisofs or genisoimage
 
I want to make a back up or livecd of my debian system and don't know how to use mkisofs
the command i used was mkisofs -b -o ../
but got this result:

image not written to terminal.

I need help???

fordeck 09-07-2009 09:09 AM

Here is a link that may be helpful:

http://www.bo.infn.it/alice/alice-do...ed/node25.html

Plus you might benefit from reading the manual:

Code:

man mkisofs
Regards,

Fordeck

linus72 09-07-2009 09:38 AM

here you go
I got a couple gifts for ya

this scitp is called make_iso.sh
it is found in linux-live-scripts, slax, and any slax dirivative

Code:

#!/bin/bash
# ---------------------------------------------------
# Script to create bootable ISO in Linux
# usage: make_iso.sh [ /tmp/slax.iso ]
# author: Tomas M. <http://www.linux-live.org>
# ---------------------------------------------------

if [ "$1" = "--help" -o "$1" = "-h" ]; then
  echo "This script will create bootable ISO from files in curent directory."
  echo "Current directory must be writable."
  echo "example: $0 /mnt/hda5/slax.iso"
  exit
fi

CDLABEL="SLAX"
ISONAME=$(readlink -f "$1")

cd $(dirname $0)

if [ "$ISONAME" = "" ]; then
  SUGGEST=$(readlink -f ../../$(basename $(pwd)).iso)
  echo -ne "Target ISO file name [ Hit enter for $SUGGEST ]: "
  read ISONAME
  if [ "$ISONAME" = "" ]; then ISONAME="$SUGGEST"; fi
fi

mkisofs -o "$ISONAME" -v -J -R -D -A "$CDLABEL" -V "$CDLABEL" \
-no-emul-boot -boot-info-table -boot-load-size 4 \
-b boot/isolinux/isolinux.bin -c boot/isolinux/isolinux.boot ../.

this will automate the iso creation:)
place that script in /boot folder, with a isolinux folder in there which must
contain isolinux.bin

either click or double-clcik it to invoke, choose run or run in terminal
remembere to make the name end in .iso like mycd.iso

u can also invoke in terminal,

Code:

./make_iso.sh
so, cd into boot folder and invoke


this script is to make a grub-bootable iso

Code:

#!/bin/bash
# ---------------------------------------------------
# Script to create bootable GRUB ISO in Linux
# usage: make_grubiso.sh
# author: Linus72 <http://multidistro.com/>
# ---------------------------------------------------
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso GRUB

NOTE: this script must be run in a folder where there is a folder named GRUB which contains your iso folders, ie boot and whatever
you can edit the name grub.iso to whatever and whatever folder you use instead of GRUB

basically, you need a boot/grub folder with at least stage2 in there
so, just copy all of grub to the boot/grub folder

cp -a /usr/lib/grub/i386-pc/* /wherever/boot/grub folder is


so, just copy and paste those 2 scripts to a new text file and save one as
make_iso.sh

and the grub one as

make_grubiso.sh

EDIT:
I always leave stuff out huh?
short-term memory problems Linus72?
LOL

OH,
uh...so, lets say you got a folder named "LAB"
on your desktop
inside that folder is your "GRUB" folder for making a grub-iso
this is what the folder LAB would conatin

GRUB
make_grubiso.sh

and then inside the GRUB folder would be
for example with DSL iso

boot
KNOPPIX

inside the boot folder would be a isolinux folder and a grub folder you put there
which must contain stage2_eltorito
(best just to copy everything from /usr/lib/grub/i386-pc to LAB/GRUB/boot/grub)


All times are GMT -5. The time now is 10:09 PM.