Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

While I prefer to use ISOMaster to edit ISO's, here is PMagics inhouse mkgriso Script.

#!/bin/sh

# mkgriso : make isolinux iso
# ===========================

# Copyright 2013 Patrick J. Verner, Waupaca, WI, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Written by Dick Burggraaff (burdi01)

# ------------------------------------------------------------------------------

# To remaster this ISO do the following:

# Copy the ISO to the current directory:
# # mkdir /tmp/cdrom
# # mount -o loop pmagic_2015_08_12.iso /tmp/cdrom
# # cp -a /tmp/cdrom .
# # umount /tmp/cdrom

# Apply your changes to cdrom/......

# Run this script:
# # sh cdrom/mkgriso

# ------------------------------------------------------------------------------

V=pmagic_2015_08_12T ; ISO=$(readlink -f $(dirname $0)/../$V.iso)
[ ".$1" != "." ]  &&  ISO="$1"                      # for pmagic_save_cd_session

B="-b boot/syslinux/isolinux.bin -c boot/syslinux/isolinux.boot"
B="$B -no-emul-boot -boot-load-size 4 -boot-info-table"

if [ -x "$(which genisoimage 2> /dev/null)" ]; then
   M=genisoimage
   E="-eltorito-alt-boot -e EFI/boot/efiboot.img -no-emul-boot"
else
   M=mkisofs
   E=""
fi

if ! $M -hide-rr-moved -l -v -d -N -R -J -V "Parted Magic" \
        $B $E -o $ISO $(dirname $0) ; then
   exit 1
fi

[ ".$E" = "." ]  &&  echo ">>> $M does not support efi booting"
echo ">>> $ISO created"
exit 0
  • No labels