It is currently Tue Jul 22, 2014 9:26 am

All times are UTC - 8 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bash Script to make custom ISO image from Linux
PostPosted: Tue Oct 23, 2007 8:17 am 
Offline

Joined: Tue Oct 23, 2007 7:46 am
Posts: 1
Location: Vitoria-ES / Brazil
Hi,

I run just Linux on my computer, and make a 'ubcd2iso.sh' shell script based on 'ubcd2iso.bat' file to make an ISO image after custom new diskette images on custom directory. This file can be used into 'tools/ubcd2iso' directory.

The shell script file is here:

Code:
#!/bin/bash

# * Create a bootable UBCD ISO image
# *
# * Ultimate Boot CD (UBCD): http://www.ultimatebootcd.com/
# * syslinux: http://syslinux.zytor.com/

if [ -z "$1" -a -z "$2" ]; then
    echo
    echo 'ubcd2iso.sh: Create bootable UBCD ISO image'
    echo
    echo 'Usage:    ubcd2iso.sh (UBCD-path) (output-image)'
    echo
    echo "Example:  ubcd2iso.sh /tmp/ubcd /tmp/ubcd40.iso"
    echo "          (UBCD extracted in dir '/tmp/ubcd', ISO image written to '/tmp/ubcd40.iso')"
    echo
    echo "Required: Linux, mkisofs and UBCD extracted to local storage"
    echo
    exit 1
fi

echo "ubcd2iso.sh: Creating bootable UBCD ISO image ..."

[ ! -f "$1/isolinux/isolinux.bin" ] && echo "(ERROR) Missing file '$1/isolinux/isolinux.bin'" && exit 3

cd "$1"
mkisofs -N -J -joliet-long -D -V "UBCD40" -o "$2" -b "isolinux/isolinux.bin" -no-emul-boot -boot-load-size 4 -boot-info-table .

[ $? -gt 0 ] && echo "(ERROR) 'mkisofs' failed" && exit 4

echo "ubcd2iso.sh: Bootable UBCD ISO image has been created"
echo
exit 0


I hope this code are usefull to someone.

Thats all...

DJHook


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group