Lines Matching +full:hfs +full:- +full:boot +full:. +full:bz2
3 # Module: mkisoimages.sh
9 # for a FreeBSD release. It is considered architecture dependent since each
10 # platform has a slightly unique way of making bootable CDs. This script
12 # publishing decision than anything else.
16 # mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
18 # Where -b is passed if the ISO image should be made "bootable" by
20 # image-label is the ISO image label, image-name is the filename of the
21 # resulting ISO image, base-bits-dir contains the image contents and
22 # extra-bits-dir, if provided, contains additional files to be merged
23 # into base-bits-dir as part of making the image.
25 set -e
27 if [ "$1" = "-b" ]; then
33 if [ -f ${MAKEFSARG} ]; then
36 elif [ -d ${MAKEFSARG} ]; then
44 if [ "$1" = "-b" ]; then
51 if [ $# -lt 3 ]; then
52 echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]"
61 if [ -n "${METALOG}" ]; then
62 metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
67 if [ -n "$bootable" ]; then
70 BOOTBLOCK=$(mktemp /tmp/hfs-boot-block.XXXXXX)
72 # Apple boot code
73 uudecode -p "`dirname "$0"`/hfs-boot.bz2.uu" | bunzip2 > $BOOTBLOCK
74 OFFSET=$(hd $BOOTBLOCK | grep 'Loader START' | cut -f 1 -d ' ')
76 dd if="$BASEBITSDIR/boot/loader" of=$BOOTBLOCK seek=$OFFSET conv=notrunc
78 bootable="-o bootimage=macppc;$BOOTBLOCK -o no-emul-boot"
80 # pSeries/PAPR boot code
81 mkdir -p "$BASEBITSDIR/ppc/chrp"
82 cp "$BASEBITSDIR/boot/loader" "$BASEBITSDIR/ppc/chrp"
83 cat > "$BASEBITSDIR/ppc/bootinfo.txt" << EOF
84 <chrp-boot>
86 <os-name>FreeBSD</os-name>
87 <boot-script>boot &device;:,\ppc\chrp\loader</boot-script>
88 </chrp-boot>
90 bootable="$bootable -o chrp-boot"
91 if [ -n "${METALOG}" ]; then
92 echo "./ppc type=dir uname=root gname=wheel mode=0755" >> ${metalogfilename}
93 echo "./ppc/chrp type=dir uname=root gname=wheel mode=0755" >> ${metalogfilename}
94 echo "./ppc/chrp/loader type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
95 echo "./ppc/bootinfo.txt type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
99 echo FreeBSD Install=\'/boot/kernel/kernel vfs.root.mountfrom=cd9660:/dev/iso9660/$LABEL\' > "$BASEBITSDIR/etc/kboot.conf"
100 if [ -n "${METALOG}" ]; then
101 echo "./etc/kboot.conf type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
105 publisher="The FreeBSD Project. https://www.FreeBSD.org/"
107 if [ -n "${METALOG}" ]; then
108 echo "./etc/fstab type=file uname=root gname=wheel mode=0644" >> ${metalogfilename}
110 makefs -D -N ${BASEBITSDIR}/etc -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$MAKEFSARG" "$@"
111 rm -f "$BASEBITSDIR/etc/fstab"
115 rm -rf "$BASEBITSDIR/ppc"
116 if [ -n "${METALOG}" ]; then