1 |
beyerle@PS |
1 |
#!/bin/bash
|
|
|
2 |
# ---------------------------------------------------
|
|
|
3 |
# Script to create bootable ISO in Linux
|
|
|
4 |
# usage: make_iso.sh /tmp/slax.iso
|
|
|
5 |
# author: Tomas M. <http://www.linux-live.org>
|
|
|
6 |
# ---------------------------------------------------
|
|
|
7 |
|
|
|
8 |
CDLABEL="LIVECD"
|
|
|
9 |
|
|
|
10 |
# source livecd.conf, if existing
|
|
|
11 |
[ -e livecd.conf ] && . livecd.conf
|
|
|
12 |
|
|
|
13 |
if [ "$1" = "" -o "$1" = "--help" -o "$1" = "-h" ]; then
|
|
|
14 |
echo "This script will create bootable ISO from files in curent directory."
|
|
|
15 |
echo "Current directory must be writable."
|
|
|
16 |
echo "example: $0 /mnt/hda5/slax.iso"
|
|
|
17 |
exit
|
|
|
18 |
fi
|
|
|
19 |
|
|
|
20 |
# isolinux.bin is changed during the ISO creation,
|
|
|
21 |
# so we need to restore it from backup.
|
|
|
22 |
cp -f boot/isolinux.bi_ boot/isolinux.bin
|
|
|
23 |
if [ $? -ne 0 ]; then
|
|
|
24 |
echo "Can't recreate isolinux.bin, make sure your current directory is writable!"
|
|
|
25 |
exit 1
|
|
|
26 |
fi
|
|
|
27 |
|
|
|
28 |
mkisofs -o "$1" -v -J -R -D -A "$CDLABEL" -V "$CDLABEL" \
|
|
|
29 |
-no-emul-boot -boot-info-table -boot-load-size 4 \
|
|
|
30 |
-b boot/isolinux.bin -c boot/isolinux.boot .
|