forked from OpenXT/openxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
do_installer_iso.sh
executable file
·50 lines (44 loc) · 1.1 KB
/
do_installer_iso.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
#
# Generates a XenClient installer iso image.
usage()
{
cat <<EOF >&2
Usage: $(basename $0) ISO_DIR ISO_IMAGE ISO_LABEL ISO_HDPFX
e.g. $(basename $0) installer installer.iso XC_installer isohdpfx.bin
Generates a XenClient installer iso image ISO_IMAGE from the contents of the
directory ISO_DIR.
EOF
}
die()
{
echo "$(basename $0): $*" >&2
exit 1
}
if [ $# -ne 4 ] ; then
usage
exit 1
fi
ISO_DIR="$1"
ISO_IMAGE="$2"
ISO_LABEL="$3"
ISO_HDPFX="$4"
xorriso -as mkisofs \
-o "${ISO_IMAGE}" \
-isohybrid-mbr "${ISO_HDPFX}" \
-c "isolinux/boot.cat" \
-b "isolinux/isolinux.bin" \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-eltorito-alt-boot \
-e "isolinux/efiboot.img" \
-no-emul-boot \
-isohybrid-gpt-basdat \
-r \
-J \
-l \
-V "${ISO_LABEL}" \
-f \
-quiet \
"${ISO_DIR}" || die "xorriso failed"