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 |
|
9 |
beyerle@PS |
8 |
CDLABEL="SL4LIVECD"
|
1 |
beyerle@PS |
9 |
|
|
|
10 |
if [ "$1" = "" -o "$1" = "--help" -o "$1" = "-h" ]; then
|
|
|
11 |
echo "This script will create bootable ISO from files in curent directory."
|
|
|
12 |
echo "Current directory must be writable."
|
|
|
13 |
echo "example: $0 /mnt/hda5/slax.iso"
|
|
|
14 |
exit
|
|
|
15 |
fi
|
|
|
16 |
|
|
|
17 |
# isolinux.bin is changed during the ISO creation,
|
|
|
18 |
# so we need to restore it from backup.
|
|
|
19 |
cp -f boot/isolinux.bi_ boot/isolinux.bin
|
|
|
20 |
if [ $? -ne 0 ]; then
|
|
|
21 |
echo "Can't recreate isolinux.bin, make sure your current directory is writable!"
|
|
|
22 |
exit 1
|
|
|
23 |
fi
|
|
|
24 |
|
|
|
25 |
mkisofs -o "$1" -v -J -R -D -A "$CDLABEL" -V "$CDLABEL" \
|
|
|
26 |
-no-emul-boot -boot-info-table -boot-load-size 4 \
|
|
|
27 |
-b boot/isolinux.bin -c boot/isolinux.boot .
|